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>
This commit is contained in:
parent
2dcd4e9ee1
commit
5bd828b532
|
@ -65,3 +65,19 @@ PLATFORM_LDFLAGS += --emit-relocs
|
||||||
LDFLAGS_FINAL += --gc-sections -pie
|
LDFLAGS_FINAL += --gc-sections -pie
|
||||||
|
|
||||||
endif
|
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
|
||||||
|
|
|
@ -61,4 +61,9 @@ AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
|
||||||
|
|
||||||
extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
|
extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
|
||||||
extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
|
extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_EFI_STUB)$(CONFIG_CMD_BOOTEFI_HELLO),)
|
||||||
|
extra-y += $(EFI_CRT0) $(EFI_RELOC)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
* Modified from usr/lib32/elf_ia32_efi.lds in gnu-efi
|
* Modified from usr/lib32/elf_ia32_efi.lds in gnu-efi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||||
OUTPUT_ARCH(i386)
|
OUTPUT_ARCH(i386)
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
* Modified from usr/lib32/elf_x86_64_efi.lds in gnu-efi
|
* Modified from usr/lib32/elf_x86_64_efi.lds in gnu-efi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
|
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
|
||||||
OUTPUT_ARCH(i386:x86-64)
|
OUTPUT_ARCH(i386:x86-64)
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
|
|
|
@ -183,7 +183,7 @@ config CMD_BOOTEFI
|
||||||
|
|
||||||
config CMD_BOOTEFI_HELLO
|
config CMD_BOOTEFI_HELLO
|
||||||
bool "Allow booting a standard EFI hello world for testing"
|
bool "Allow booting a standard EFI hello world for testing"
|
||||||
depends on CMD_BOOTEFI && ARM
|
depends on CMD_BOOTEFI && (ARM || X86)
|
||||||
help
|
help
|
||||||
This adds a standard EFI hello world application to U-Boot so that
|
This adds a standard EFI hello world application to U-Boot so that
|
||||||
it can be used with the 'bootefi hello' command. This is useful
|
it can be used with the 'bootefi hello' command. This is useful
|
||||||
|
|
Loading…
Reference in New Issue