[U-Boot] EFI Stub compilation errors

Simon Glass sjg at chromium.org
Wed Apr 6 20:32:34 CEST 2016


Hi Nicolae,

On 5 April 2016 at 02:02, Nicolae Rosia <nicolae.rosia at gmail.com> wrote:
>
> Hello,
>
> I'm trying to build U-Boot as an UEFI Payload, head
> 4ed6ed3c27a069a00c8a557d606a05276cc4653e, branch master.
> I did the following:
> make qemu-x86_defconfig
> make menuconfig
> Enable the following:
> CONFIG_EFI=y
> EFI_STUB=y
> EFI_STUB_64BIT=y

I assume you mean:

CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_STUB_64BIT=y

> make

>
> I gets lots of warnings ([0]) and the following error:
> /home/user/workspace/u-boot/lib/efi/efi_stub.c:357: undefined
> reference to `_binary_u_boot_dtb_bin_start'
> /home/user/workspace/u-boot/lib/efi/efi_stub.c:357: undefined
> reference to `_binary_u_boot_dtb_bin_end'
>
> Any idea what I'm doing wrong?

There are a few problems - I've sent a patch to show how to correct it
in general, but it needs a bit of work.

The error is simply that u-boot-dtb.bin is now called u-boot.bin - a
recent change.

But the warnings are due to BITS_PER_LONG being 64-bit. This value of
this define should be 32 for U-Boot, and 64 for the payload files
only:

./lib/efi/efi.c
./lib/efi/efi_stub.c

If you fix this, it would be good to add a new qemu-x86-efi target to
avoid this breaking in the future.

>
> Best regards,
> Nicolae
>
> [0] make log http://pastebin.com/geb5RqTW
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Regards,
Simon


More information about the U-Boot mailing list