Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikeboss

macrumors 68000
Aug 13, 2009
1,546
862
switzerland
From the https://github.com/Piker-Alpha/macosxbootloader source here now the compiled Boot.efi:

Boot.efi (Mega.co.nz)

It seems to work on my MBP2,2 (late 2006, EFI32). I can see a text for approx. 1 second - then remains the grey Apple boot logo. I guess we need a verbose version first ....

cool, thanks for compiling the stuff! I just tried it on my MacPro2,1 (flashed to 2,1, was 1,1 out of the factory). I dont see the grey apple logo when trying to boot. looks like verbose mode but there's nothing on the screen (black screen with one single _ visible). after a few seconds the machine reboots.
 

atvusr

macrumors 6502
Apr 5, 2010
442
39
I just tried it on my MacPro2,1 (flashed to 2,1, was 1,1 out of the factory). I dont see the grey apple logo when trying to boot. looks like verbose mode but there's nothing on the screen (black screen with one single _ visible). after a few seconds the machine reboots.


I hope Pike can help us. I'm unfortunately not an developer / programmer - but was at least able to compile it :)

On his site Pike wrote: "The source code is not yet compatible with Yosemite, but good to hear that compiling worked for you [...]".
 
Last edited by a moderator:

GuitarNut

macrumors newbie
Sep 15, 2012
18
6
I have a Mac Pro 1,1 flashed to 2,1 ready to try this thing out.

Let me know if there is anything I can do to help.

I don't really know how to compile source code, but I'd be welling on trying an already compiled boot.efi.

Currently booting Yosemite GM Candidate with Clover.

Thanks ahead of time.
 

666sheep

macrumors 68040
Dec 7, 2009
3,686
292
Poland
I hope Pike can help us. I'm unfortunately not an developer / programmer - but was at least able to compile it :)

This is a lot more than most of us here is able to do. Kudos to you sir!
If Pike will provide all needed patches and you'll compile Yosemited boot.efi, whole MP 1,1/2,1 world will praise you both.
 

Hennesie2000

macrumors 68000
Sep 29, 2007
1,514
42
Maryland
I hope Pike can help us. I'm unfortunately not an developer / programmer - but was at least able to compile it :)

On his site he wrote: "The source code is not yet compatible with Yosemite, but good to hear that compiling worked for you [...]".

what format did you compile the file as?

I tried this command
Code:
nasm -f efi /Users/Mike/Desktop/lzvn.c -o boot.efi

And it doesn't work because efi is not a valid output format. When trying valid formats like bin or elf I get a couple hundred lines of errors. I am not using the MS tools though and just trying to use NASM in terminal.
 

PeterHolbrook

macrumors 68000
Sep 23, 2009
1,625
441
what format did you compile the file as?

I tried this command
Code:
nasm -f efi /Users/Mike/Desktop/lzvn.c -o boot.efi

And it doesn't work because efi is not a valid output format. When trying valid formats like bin or elf I get a couple hundred lines of errors. I am not using the MS tools though and just trying to use NASM in terminal.

That would never work. Files with extension .c (and others) contain source code in C/C++ ("sentences" in pseudo-English like if, for, case, etc.), but an assembler doesn't understand pseudo-English, pseudo-German, pseudo-Spanish or anything like that, but only assembly instructions such as mov, jmp, etc. NASM has to be used as an extension of the C compiler (in this case, Microsoft's), so that the compiler will include the sections written in assembly language.
 

Hennesie2000

macrumors 68000
Sep 29, 2007
1,514
42
Maryland
That would never work. Files with extension .c (and others) contain source code in C/C++ ("sentences" in pseudo-English like if, for, case, etc.), but an assembler doesn't understand pseudo-English, pseudo-German, pseudo-Spanish or anything like that, but only assembly instructions such as mov, jmp, etc. NASM has to be used as an extension of the C compiler (in this case, Microsoft's), so that the compiler will include the sections written in assembly language.

Excellent, that is what I needed to know. I am a web developer and only took a few classes of Visual Basic in college 10 years ago so C/C++ are not languages I know and not something I am familiar with. I love reading and figuring things out though.
 

atvusr

macrumors 6502
Apr 5, 2010
442
39
what format did you compile the file as?

It's compiled within Visual Studio. While VS compiles the C++ files it calls the NASM automatically for the Assembler parts. Try to comprehend the example from this Guide with Visual Studio.

If the compiling of the NASM example project was successful (1 succeeded, 0 failed, 0 skipped), you get a NASM.exe which looks like that:

qsl2eh.jpg


For the Boot.efi:

I’ve installed MS Visual Studio 2013 (Ultimate*, 90-days-trial), installed also NASM, added the 3 Config-files from the Guide, added the path to NASM to the PATH-Variable from Windows, rebooted and opened the ‘boot.sln’ for the project. Left the Debugger in Win32 mode. Then clicked simply ‘Build’ (result: 2 succeeded, 0 failed, 0 skipped). No error messages, warnings or similar. Output file is Boot.efi (461.312 bytes). It took overall several attempts – but compiling works now flawless.


*) probably overkill - but seemingly it has helped ;)
 
Last edited:

Hennesie2000

macrumors 68000
Sep 29, 2007
1,514
42
Maryland
It's compiled within Visual Studio. While VS compiles the C++ files it calls the NASM automatically for the Assembler parts. Try to comprehend the example from this Guide with Visual Studio.

If the compiling of the NASM example project was successful (1 succeeded, 0 failed, 0 skipped), you get a NASM.exe which looks like that:

Image

For the Boot.efi:

I’ve installed MS Visual Studio 2013 (Ultimate*, 90-days-trial), installed also NASM, added the path to NASM to the PATH-Variable from Windows (rebooted after that) and opened the ‘boot.sln’ for the project. Left the Debugger in Win32 mode. Then clicked simply ‘Build’ (result: 2 succeeded, 0 failed, 0 skipped). No error messages, warnings or similar. Output file is Boot.efi (461.312 bytes). It took overall several attempts – but compiling works now flawless.


*) probably overkill - but seemingly it has helped ;)

Ok, so I finally booted up windows and set everything up. I tried to follow that guide and was able to get the sample to build. I downloaded Tiamo's source using Slik SVN and I opened the boot.sln. When I press build I get this:

Code:
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And this error:

Code:
Error	1	error MSB6006: "cmd.exe" exited with code 9009.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets	170	5	boot

If it matters I went the route of adding nasm.exe to the System32 folder instead of adding the path.
 

PeterHolbrook

macrumors 68000
Sep 23, 2009
1,625
441
If it matters I went the route of adding nasm.exe to the System32 folder instead of adding the path.

I don't know this for a fact in this case, but chances are nasm.exe has dependences with other files. For instance (for the DOS version of NASM), there might be calls to executables in the rdoff folder. If you simply move nasm.exe to a folder in your automatic search path, nasm will be unable to find external components of itself. You'll be better off leaving the entire NASM folder somewhere like C:\NASM and then editing your search PATH. If you are using Windows 7, go to Computer > Properties > Advanced System Settings > Advanced > Environment Variables. Then edit PATH by adding a semicolon followed (for instance) by C:\NASM and click OK. That should do it. If you have a different version of Windows, the procedure might be slightly different, but that's the idea. In earlier versions, you might need to reboot.
 

Hennesie2000

macrumors 68000
Sep 29, 2007
1,514
42
Maryland
I don't know this for a fact in this case, but chances are nasm.exe has dependences with other files. For instance (for the DOS version of NASM), there might be calls to executables in the rdoff folder. If you simply move nasm.exe to a folder in your automatic search path, nasm will be unable to find external components of itself. You'll be better off leaving the entire NASM folder somewhere like C:\NASM and then editing your search PATH. If you are using Windows 7, go to Computer > Properties > Advanced System Settings > Advanced > Environment Variables. Then edit PATH by adding a semicolon followed (for instance) by C:\NASM and click OK. That should do it. If you have a different version of Windows, the procedure might be slightly different, but that's the idea. In earlier versions, you might need to reboot.

The guide on using NASM with VS said you could do it either way and I did copy the NASM targets, xml and props files into the VS installation. Editing the path or putting it in System32 just makes it so you can type nasm in the command prompt with out having to specify a path to the exe. I'll give a try the other way though and see if the works.
 

mikeboss

macrumors 68000
Aug 13, 2009
1,546
862
switzerland
I think I got it working too :eek: I installed VS2013/NASM and afterwards was able to compile boot.efi using the sourcecode provided by Piker-Alpha. unfortunately I will be away for the whole next week so I can't do any testing on the MacPro2,1.

----------

From the https://github.com/Piker-Alpha/macosxbootloader source here now the compiled Boot.efi:

Boot.efi (Mega.co.nz)

It seems to work on my MBP2,2 (late 2006, EFI32). A verbose boot with Command+V shows that the Boot.efi initially loads but hangs then at the Kernel cache:

Image

I have already deleted the Kernel cache (/System/Library/Caches/com.apple.kext.caches/Startup/) - still the same result ....

maybe it'll work if you delete the kextcache and switch the compression method back to LZSS? there's a plist file /usr/standalone/BootCaches.plist where the compression algorythm is configured. Yosemite uses LZVN and boot.efi doesn't support it yet.
 

ProfDrLuigi

macrumors member
Jun 19, 2010
71
1
Tested the boot.efi above on my MacPro 2,1 aka 1,1. See only an underscore and some seconds later the mac is restarting.

Changed the Compression to LZSS too. No chance. :(
 

mikeboss

macrumors 68000
Aug 13, 2009
1,546
862
switzerland
Tested the boot.efi above on my MacPro 2,1 aka 1,1. See only an underscore and some seconds later the mac is restarting.

Changed the Compression to LZSS too. No chance. :(

yup, same here. Pike posted about how to edit a source file called "BootArgs.cpp". unfortunately I have no clue what he's talking about :(

excerpt from here -> https://pikeralpha.wordpress.com/2014/10/02/yosemite-support-for-old-macpro/

quote:

Open BootArgs.cpp and look for BlInitializeBootArgs. Add the seedBuffer declaration and call to DevTreeAddProperty () above the line with:

*bootArgsP = bootArgs;

You may need to change it a little, but I am past my bed time already so this exercise is yours my friends
 

atvusr

macrumors 6502
Apr 5, 2010
442
39
And this error:

Code:
Error	1	error MSB6006: "cmd.exe" exited with code 9009.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets	170	5	boot


As Pike wrote, the error occurs when the path to the NASM executable is not correct. Install the NASM into the Windows programs directory and add the path to the Windows PATH-variable.

Instead of the 'cmd' error I got in the beginning the error that NASM was not found although the path was set and I could start NASM from the Windows command prompt. After a reboot it has finally worked then ....
 
Last edited:

atvusr

macrumors 6502
Apr 5, 2010
442
39
Pike posted about how to edit a source file called "BootArgs.cpp". unfortunately I have no clue what he's talking about :(

I've tried to patch the BootArgs.cpp (see the picture below).

While compiling I got "only" 3 errors: 'chosenNode not declared' , 'static_cast const UINT8 [64] cannot be converted into UINT8 *' and 'bootArgs not declared'.

Maybe it's better to wait until Pike has patched the source code completely ....
 
Last edited by a moderator:

FireArse

macrumors 6502a
Oct 29, 2004
900
110
yes, I just successfully booted OS X 10.10 build 14A379b on my MacPro2,1 :D

Hold on - have you managed to do this in a similar manner to the Mac Pro 2,1 Mavericks boot methodology with Tiamo EFI??

From a very excited FireArse with his flashed Mac Pro 1,1->2,1
 

mikeboss

macrumors 68000
Aug 13, 2009
1,546
862
switzerland
yes, just with the boot.efi replaced (okay, and without kernelcaches, I think).
 

Attachments

  • yose.png
    yose.png
    580.6 KB · Views: 207

mikeboss

macrumors 68000
Aug 13, 2009
1,546
862
switzerland
something to play with for anybody feeling adventurous...

not sure if it will boot with kernel cache enabled. I didn't reboot yet :p I deleted the kernel cache before my first (successful) attempt to boot.
 

Attachments

  • boot.efi.zip
    252.5 KB · Views: 401

FireArse

macrumors 6502a
Oct 29, 2004
900
110
something to play with for anybody feeling adventurous...

not sure if it will boot with kernel cache enabled. I didn't reboot yet :p I deleted the kernel cache before my first (successful) attempt to boot.

Please excuse my ignorance - what are the kernel caches?

A few questions if I may:

  1. Did you get a grey screen throughout? i.e can you press ALT on Chime and have option for boot drive?
  2. I know its early days, but did all your hardware work?
  3. Does iMessage work?

Will try testing this at the weekend :D :D :D
 
Last edited:

mikeboss

macrumors 68000
Aug 13, 2009
1,546
862
switzerland
Please excuse my ignorance - what are the kernel caches?

A few questions if I may:

  1. Did you get a grey screen throughout? i.e can you press ALT on Chime and have option for boot drive?
  2. I know its early days, but did all your hardware work?
  3. Does iMessage work?

Will try testing this at the weekend :D :D :D

the possibility to choose the OS by pressing OPTION during power-on has nothing to do with boot.efi or the operating system installed on the machine.

it looks like all hardware is recognized properly.

I don't know about iMessage. I'm not using it on my Macs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.