On 02/19/2014 02:12 PM, Bill Paul wrote:
> Of all the gin joints in all the towns in all the world, Stephen Polkowski had
> to walk into mine at 10:30:41 on Wednesday 19 February 2014 and say:
>
>> Rats.  Thanks Andrew.
>
> Note that this does not mean you can't use the EDKII to build an EFI
> application which will run on the Apple EFI firmware. (Not sure about EFI
> drivers though.) EFI 1.10 still uses the same executable format (PE32/PE32+)
> and many of the protocols are the same. You can write hello world programs
> that will run on both Apple machines and newer UEFI-based systems. It may not
> be officially supported, but it works. You just need to be careful to
> constrain yourself to protocols that are supported in EFI 1.10.

You're absolutely right. In fact, you can build EFI 1.x-compatible 
drivers with the current EDK2. For an example, look at the filesystem 
drivers that come with rEFInd (http://www.rodsbooks.com/refind/). My own 
build system is more Unix-like, but I've got some files in there that 
should help one build in a more EDKII-like manner, if you prefer.

> EFI 1.10 uses the UgaDraw protocol. Apparently it makes a distinction between
...
> By contast, with the GraphicsOutput protocol in UEFI, you can do both at the
> same time.

IIRC, some recent Apple EFIs use the Grapics Output Protocol (GOP), just 
like UEFIs.

> I've found that the simplest way to run a UEFI app on a Mac is to do the
> following:
>
> - Format a USB thumb drive with a FAT32 filesystem on it.
> - Create a \EFI\BOOT directory on it
> - Copy your app to \EFI\BOOT\BOOTIA32.EFI (or BOOTX64.EFI, if you have a 64-
> bit build) on the drive
> - Plug the thumb drive into the Mac
> - Reboot it
> - Hold down the left ALT key on the keyboard as the machine starts up (try to
> hit it before or as soon as you hear the chime)
> - You should see a boot selection screen appear. There should be a yellow USB
> device icon labeled "EFI Boot" or something to that effect on the right side
> of the screen
> - Use the mouse to click on it, or use the arrow keys to select it and hit
> enter
>
> Your program should run. If you used the ConsoleControl example to switch the
> sceen mode, you should see the grey screen turn black and your console output
> should appear.

For a one-time run of a program, this should be fine. A boot manager 
like rEFIt or rEFInd will enable launching an EFI shell, which will be 
more flexible than this procedure in the long run, should you need to 
launch arbitrary EFI applications on a regular basis.

-- 
Rod Smith
rodsm...@rodsbooks.com
http://www.rodsbooks.com

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to