Jump to content

-Archive- Macefix86 2006 -Archive-


bofors
 Share

443 posts in this topic

Recommended Posts

To really develop EFI for OSx86 we need to be striving for an advanced technical understanding and ability. This means being able to write, compile, load and execute simple EFI programs to do things like extract all the .efi modules in a few seconds (or at least dumping them in a hex-only format). Again, the actually writing of such programs should be very easy. The major issue is setting up the development environment in Windows to compile EFI programs.

 

you are right but i was just thinking of simplfying things for Urby in what he is doing at the moment.

Link to comment
Share on other sites

you are right but i was just thinking of simplfying things for Urby in what he is doing at the moment.

 

And it would be much welcome!

If you could do it, it would make things a lot easier for the remainder of modules for example.

I would recommend you write the program.

Would it be a program for use within efi or in mac or windows?

If it's within efi, i may still be able to use it, and if it is for an OS i will definitely use it.

 

Also, don't forget that we'll probably have to do all this over again when we get ahold of the Mac Pros after AWDC. And then again when leopard is released, most probably, and after every firmware update!!

 

I really appreciate the support from all of you!

Link to comment
Share on other sites

i think that would be really great!

IMO, better (much much better) than an efi thing.

I think the less we can work in EFI, the better.

It gets painful staring at a black and white and yellow screen all day. And you can't multitask.

 

I say go for it, i'm behind you 100%. Just do me one favor: make it capable of editing them in batch (WAYYY faster)!

 

 

-Urby

 

_____________________________

 

Status Update: 81 text files dumped.

Link to comment
Share on other sites

YAY! Progress, i aint gonna have that much time on my hands anymore (Women, Work, College, Women) but when i ahve the sapre time i will work on it. I am waitign for WWDC so i can see what motherboard the Mac Pro uses, hoipefully it will be a 975 based one. I am mainly going to be focusing on flashing Intel motherboards, i have spoken to Intel about a efi shell but no reply as of yet :(

Link to comment
Share on other sites

Step 1 is complete. Some modules were duplicated along the way, so the total count is now 106.

I'm not sure why my count is 106 and the originals were 107, but i don't think it means much.

Anyways, there are some i can't wait to get into modular form, like AppleBootBeep.efi!

I'll do that quickly and post it just cuz if it works of the test environment, it would be sooo cool!

 

-Urby

 

[update] apple boot beep ain't gonna make a sound. : (

 

__________________________

 

Step 1 complete, step 2 starting soon.

Link to comment
Share on other sites

I have an Asus motherboard as my main PC (i.e. I'm not going to be messing around with it) and it has an audio feature that can alert you to system boot problems with a WAV file rather than a complex series of beeps. I have a utility that lets me change the WAV files from the boring female voice that says things like "System completed power-on self check" and "System now booting from operating system". Both of those audio snippets are heard every boot so it would be quite easy to replace one with an Apple chime to be played on boot. This is of course if I put OS X on here, but I've got files I can't risk losing unfortunately.

 

EDIT: Motherboard is an Asus P4S533-E

Link to comment
Share on other sites

Last work done on: Monday, 7:30 PM EST.

 

Status update:

- Step 1 Complete.

- Step 2: 60 stripped text files left to be produced of 106.

* Step 3 has not yet begun *

 

Total percentage: 47.8% Completion.

Link to comment
Share on other sites

hey guys just found this!

 

 

How to Redirect Console Output to a File

------------------------------------------

In the EFI Shell environment, output from an EFI application can be redirected to a file.

The following is an example of a sample EFI application to show how any application can redirect its output to another file. To redirect output from a console application to a file, type the following in green at the EFI Shell prompt:

fs0:>xxxx.efi 1>a output.txt

The following table describes the options that are available for this command.

 

Options for Redirecting Output

Option Description

xxxx.efi Example EFI application.

1 There are two possible values for this number:

* 1 indicates the standard console output the user

would have seen.

* 2 means the error output from the program.

>a output.txt Sends the console output in ASCII to a file called output.txt

at which the current file system is pointed. The Shell needs

to have a valid FATxx file system for this command to work.

>u output.txt Sends the console output in Unicode to a file called output.txt.

Several systems are aware of Unicode in Windows*- and Linux*-based

systems. All programs will understand ASCII but some will not be

able to parse the Unicode strings. Default is Unicode.

Link to comment
Share on other sites

Hey all,

 

that command that sbeehre found is how i get the efi hex from memory printed to a text file. That's step 1. That has been completed already.

Currently, i am formatting the text files to only contain the hex, something this command cannot do.

Now you understand why it was so hard to get the efi file: it never gave me a clear output that i could use untill i figured out a way to format it.

 

I am going to get back to work now.

Oh, kiko, that 55% thing was a calculation error!

 

I am hoping to get to 66% today. Then the rest is smooth sailing.

I didn't work on anything yesterday because I was inspecting efi sources. That is to say, i am primarily looking at the tianocore implementation. Unfortunately, for it to compile, you need visual studio 2003, 2005 won't to because there are pointers to paths that don't exist.

 

I have otherwise been reading about it, and I think it would be possible to create a script to load all the extracted module to memory of a non-apple system. I'm also looking at bootloader applications and inspecting how mac os x works with efi to boot.

 

I understand now why we would have to create custom efi firmwares for our computers. There is no support for regular "dektop" ram, for example, only laptop so-dimms, there are drivers missing for many of the hardware we currently use mac with, too. In short, we need to load more than just mac drivers that come with an imac. I expect this will change next week, with the Mac Pro.

 

This is why we wouldn't be able to just flash an apple firmware upgrade to our whitebox pcs.

 

Anyways, i could go on and on, but i have modules to make!

 

In short, i've learned and am learning a whole lot about EFI and how mac interacts with it. I can't wait to load the modules on tianocore to see what happens...that sould get done hopefully by friday. And eventually i'lll make a tutorial on how to extract the firmware.

 

Just know this: these modules alone will not enable us to boot mac that easily. We really have to dig down and get dirty with tianocore to check out how far we can push the info we have. Also, i'm not sure if i can work the modules into the firmware easily because i don't have their source code.

 

Anyways, i'm off.

 

-Urby

Link to comment
Share on other sites

I am hoping to get to 66% today. Then the rest is smooth sailing.

I didn't work on anything yesterday because I was inspecting efi sources. That is to say, i am primarily looking at the tianocore implementation. Unfortunately, for it to compile, you need visual studio 2003, 2005 won't to because there are pointers to paths that don't exist.

 

What are the primary differences between tianocore and intels implementation?

Link to comment
Share on other sites

From what I can tell, Tianocore is much more complete and capable than the intel one.

 

____________________

 

Last work done on: Wednesday, 7:00 PM EST.

 

Status update:

- Step 1 Complete.

- Step 2 Complete.

* Step 3 has not yet begun *

 

Total percentage: 66% Completion.

Link to comment
Share on other sites

Here is the first release of my hex dump converter :) I did run into a few problems which i hope to fix later on... for one the hex dump you get by using dmem 67 > output.txt is in Unicode UT-16 format which C doesnt like, so I had to change the file to the Western (ISO Latin 1) format. To do this i just opened up the original dump file in Smultron, went to Text ---> Text Encoding and changed it to Western (ISO Latin 1) then re-saved the file. I think from within the EFI environment you can edit the original dump file with the editor app and change the text encoding with F9.

 

Also wanted to add a bit into the program which asks you for the file name to be processed and the name you want for the processed file but i had a bit of trouble getting that to work correctly. My idea was to have 2 char buffers called infile and outfile which i set to infile[8] etc then do the following

 

printf("enter the name of the file to be processed: ",infile);
gets(infile);
fopen=textfile(infile,"r");

printf("enter the name of the processed file: ",outfile);
gets(outfile);
fopen=outtxtfile(outfile,"w");

 

When i did this however i got some weird symbols in the modified text file so i scrapped the idea :offtopic: if any C coders can help out that would be awesome!

 

Here is the code which you should be able to compile on any platform, when you run it you will need to call the input file to hexdump.txt.

 

/********************************************************
*  hexmod.c											 *
*  EFI Module Hex Dump updater v1.0 					*
********************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{

 char instring[200];
 char output[200];
 char * ptr;  // position of ":" in the string
 FILE *textfile,*outtxtfile;

 // Process file
 textfile=fopen("hexdump.txt","r");
 // open the destination file
 outtxtfile=fopen("hexout.txt","w");

// process file
 while( fgets( instring, sizeof(instring), textfile ) != NULL )
 {
	if( (ptr = strstr( instring, ": " )) )
		{
			strncpy( output, ptr + 1, 48 );
			output[ 24 ] = ' ';
			output[ 48 ] = '\n';
			fputs( output, outtxtfile );
		}
}

 fclose(textfile);
 fclose(outtxtfile);

 return 0;
}

Link to comment
Share on other sites

Urby, i am a msdn member, iw ill look through my dvd's to get u a copy of Visual Studio 2003, i will compile the tianocore and release it on rapidshare.

 

Simon, i will compile your text stripper and test it too.

Link to comment
Share on other sites

You guys are the greatest!

This little team of people is exactly what we need to get our goals set and accomplished!

Thank you for all the help and dedication you've all put into this project!

 

I'll compile the text stripper tonight (i'm at work).

I'm downloading the binary of tianocore now.

 

I have more to tell you regarding this new "team" of ours, but i'll leave that for tonight!

 

Thanks!

 

Erhnam, i need you to do one more thing. The compiled binary is great, but i need an advanced shell.

Could you pretty please download this and compile it with the source code of the edk following these instructions?

Thank you! The reason for this is the shell is just much better and will work with more modules than the standard shell, which basically does nothing! Merci again!!

 

Also, i still am gonna need visual studio 2003...it's downloading but i'm not sure how long it'll take...

 

I'm in montreal. Kiko, how long would it take you to mail me a cd or dvd of the program, and would it be possible?

 

-Urby

 

PS i'm really excited at the possibilites that we now hold! We're finally getting there. This, all of it, is more than any one person can do alone.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...