efi_selftest: allow building on ARMv7-M
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 30 Dec 2018 09:52:41 +0000 (10:52 +0100)
committerAlexander Graf <agraf@suse.de>
Wed, 13 Feb 2019 08:40:05 +0000 (09:40 +0100)
ARMv7-M only supports the Thumb instruction set. Our current crt0 code does
not support it. With the patch we can build all unit tests of the EFI
subsystem that do not require crt0.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/arm/lib/Makefile
lib/efi_selftest/Makefile

index 655727f..48ee6c3 100644 (file)
@@ -106,5 +106,9 @@ CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
 CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
 
 extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC)
-extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC)
+# TODO: As of v2019.01 the relocation code for the EFI application cannot
+# be built on ARMv7-M.
+ifndef CONFIG_CPU_V7M
+#extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC)
+endif
 extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC)
index 743b482..5b80469 100644 (file)
@@ -45,9 +45,9 @@ ifeq ($(CONFIG_BLK)$(CONFIG_PARTITIONS),yy)
 obj-y += efi_selftest_block_device.o
 endif
 
-# TODO: As of v2018.01 the relocation code for the EFI application cannot
-# be built on x86_64.
-ifeq ($(CONFIG_X86_64)$(CONFIG_SANDBOX),)
+# TODO: As of v2019.01 the relocation code for the EFI application cannot
+# be built on ARMv7-M, Sandbox, and x86_64.
+ifeq ($(CONFIG_SANDBOX)$(CONFIG_CPU_V7M)$(CONFIG_X86_64),)
 
 obj-y += \
 efi_selftest_startimage_exit.o \