summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-11-17 12:49:17 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2021-11-17 08:42:37 +0100
commitcbe94d33fe10a069b66b2ce558db3b7acffe6e5a (patch)
treec2227a591aae5f2e60ca827f686afb9de40af70f
parent22c565ae385d4f1e1028e278977c3e03bdef4c26 (diff)
downloadbarebox-cbe94d33fe10a069b66b2ce558db3b7acffe6e5a.tar.gz
barebox-cbe94d33fe10a069b66b2ce558db3b7acffe6e5a.tar.xz
x86: reuse cmd_objcopy to generate barebox.efi
The objcopy rule is defined in scripts/Makefile.lib Reuse it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.barebox.org/20211117034918.1226358-5-masahiroy@kernel.org Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/x86/Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 5623b2cea5..53cbd50881 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -54,17 +54,16 @@ common-y += arch/x86/lib/
lds-$(CONFIG_X86_32) := arch/x86/mach-efi/elf_ia32_efi.lds
lds-$(CONFIG_X86_64) := arch/x86/mach-efi/elf_x86_64_efi.lds
-quiet_cmd_efi_image = EFI-IMG $@
- cmd_efi_image = $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
- -j .dynsym -j .rel -j .rela -j .reloc \
- -j .bbenv.* -j .bblogo.* --target=$(TARGET) $< $@
-
KBUILD_BINARY := barebox
KBUILD_LDFLAGS := --no-undefined
+OBJCOPYFLAGS_barebox.efi = \
+ -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela \
+ -j .reloc -j .bbenv.* -j .bblogo.* --target=$(TARGET)
+
barebox.efi: $(KBUILD_BINARY) FORCE
- $(call if_changed,efi_image)
+ $(call if_changed,objcopy)
KBUILD_IMAGE := barebox.efi