[haiku-development] Re: EFI and GPT

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 9 Apr 2013 16:57:44 +0200

2013/4/9 Philippe Houdoin <philippe.houdoin@xxxxxxxxx>:
> Regarding EFI boot mode, I'm following your branch, Fredrik, but I
> understand that it's not ready and, there, needs to add boot_loader EFI
> platform support, which will interface with the EFI system.

I've investigated what needs to be done and experimented a bit with the linking,
but so far I havn't had time to sit down and code on anything more
(and atm it's only second
on my todo list).

If anyone is interested to help out I recommend FreeBSD's code[1]
approach for EFI API's
as it seems simplest. GNU-EFI[2] is also similar but with a lot of
special casing and macros
I don't think we need (uefi_call_wrapper).

TODO for EFI boot loader:
First is writing a boot loader platform for EFI along the lines of the
others[3] using the EFI API's.
It should be compiled (ELF) as a special EFI app target that uses a
special linker to a real EFI  app (PE).
The linking can be done with objcpy and linker script, or a special
tool like tianocore[4] does.
Personally I think a special tool for EFI might be better but I havn't
investigated that approach, so far I've failed (a lot)
    at getting binutils to add an additional PE output target.

The EFI app needs to be installed on the system EFI partiton and needs
to be added to the computers boot options.
These can be done manually, so I'm not writing about it here,  but in
the end we need a tool for that as well.

[1] http://fxr.watson.org/fxr/source/boot/efi/
[2] http://sourceforge.net/projects/gnu-efi/
[3] http://cgit.haiku-os.org/haiku/tree/src/system/boot/platform
[4] 
//www.freelists.org/post/haiku-development/UEFI-boot-loader-for-Haiku,24

For some UEFI related posts take a look at http://uefi.blogspot.com/
and I also have a small working(?) test app in
https://github.com/tqh/haiku.efi

/Fredrik Holmqvist, TQH

Other related posts: