[haiku-development] Re: Need help with UEFI and Jam

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 17 Aug 2013 15:28:38 +0200

Am 15/08/2013 20:44, schrieb Fredrik Holmqvist:
My problems:
1: We probably want to build a 64 bit version as most computers run 64
bit UEFI. This is just for the bootloader UEFI app. I'm not really
sure how TARGET_BOOT_PLATFORM in boot/platform/Jamfile works, so not
sure what needs to be done there or elsewhere for this.

x86 would be the architecture, efi the platform. Since I'm pretty rusty when it comes to the build system, I don't know how exactly you would do this just for the boot loader. In any case, you are supposed to specify HAIKU_BOOT_PLATFORM=efi when building either when calling jam or in your user build config.
There is (AFAIK) no way to use the "configure" script to do this yet.

2: Building the UEFI app needs quite specific compile and linking
flags for the objects, and then an objcopy to the EFI format. These
flags will be needed for all objects in the EFI app, which will
probably include platform/generic.
Here[1] is the Makefile I use under Linux.

My guesswork is that it may be something like this[2], but I have a
hard time to figure out Jam and the boot targets. I think I'm stuck.

It looks good so far, it would certainly help to know where you are stuck in the first place.
For example, the BIOS IA-32 boot loader also uses objcopy like this:
http://cgit.haiku-os.org/haiku/tree/src/system/boot/Jamfile#n87

Bye,
   Axel.


Other related posts: