]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
efi: Support building a u-boot-app.efi executable
authorSimon Glass <sjg@chromium.org>
Tue, 4 Aug 2015 18:33:43 +0000 (12:33 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:55 +0000 (08:00 +0200)
Add support for building U-Boot as an EFI application with a .efi suffix.
This can be loaded by EFI provided that EFI has the same bit width (32-
or 64-bit) as U-Boot. This unfortunate limitation is imposed by EFI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Makefile

index 7b13470de5898d494fcb389879afacbf55e20b2b..397242465dc4f43d691bbc022fcf4d6cc44f6d14 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -754,6 +754,7 @@ ifneq ($(CONFIG_SPL_TARGET),)
 ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
 endif
 ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf
+ALL-$(CONFIG_EFI_APP) += u-boot-app.efi
 
 ifneq ($(BUILD_ROM),)
 ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
@@ -1085,6 +1086,10 @@ u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE
 endif
 endif
 
+OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
+u-boot-app.efi: u-boot FORCE
+       $(call if_changed,zobjcopy)
+
 u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE
        $(call if_changed,cat)