summaryrefslogtreecommitdiff
path: root/arch/x86/config.mk
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-07 08:47:15 -0700
committerAlexander Graf <agraf@suse.de>2016-11-14 23:24:04 +0100
commit5bd828b5329ed9b7c85beae1e532daa710f22168 (patch)
tree7a2bbba51e7b6c0a076753fec0d362ff82ff506f /arch/x86/config.mk
parent2dcd4e9ee1b6dc0f0ba1d89a7af3987ea47dda23 (diff)
efi: x86: Adjust EFI files support efi_loader
Add compiler flags and make a few minor adjustments to support the efi loader. Signed-off-by: Simon Glass <sjg@chromium.org> [agraf: Add Kconfig dep] Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/x86/config.mk')
-rw-r--r--arch/x86/config.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 12a8d73f87..03c71f7bae 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -65,3 +65,19 @@ PLATFORM_LDFLAGS += --emit-relocs
LDFLAGS_FINAL += --gc-sections -pie
endif
+
+ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO),)
+
+ifneq ($(CONFIG_EFI_STUB_64BIT),)
+EFI_LDS := elf_x86_64_efi.lds
+EFI_CRT0 := crt0_x86_64_efi.o
+EFI_RELOC := reloc_x86_64_efi.o
+EFI_TARGET := --target=efi-app-ia32
+else
+EFI_LDS := elf_ia32_efi.lds
+EFI_CRT0 := crt0_ia32_efi.o
+EFI_RELOC := reloc_ia32_efi.o
+EFI_TARGET := --target=efi-app-x86_64
+endif
+
+endif