From: Jan Kiszka <[email protected]>

This simplifies the addition of ARM by make x86 special, rather than
arm64.

Signed-off-by: Jan Kiszka <[email protected]>
---
 Makefile.am  | 15 ++++++++-------
 configure.ac |  1 +
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7398b85..ad0bfac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -147,9 +147,8 @@ bin_SCRIPTS = tools/bg_gen_unified_kernel
 efi_loadername = efibootguard$(MACHINE_TYPE_NAME).efi
 
 if BOOTLOADER
-if ARCH_AARCH64
-efi_sources_watchdogs =
-else
+
+if ARCH_IS_X86
 # NOTE: wdat.c is placed first so it is tried before any other drivers
 # NOTE: ipc4x7e_wdt.c must be *before* itco.c
 efi_sources_watchdogs = \
@@ -160,6 +159,8 @@ efi_sources_watchdogs = \
        drivers/watchdog/ipc4x7e_wdt.c \
        drivers/watchdog/itco.c \
        drivers/watchdog/hpwdt.c
+else
+efi_sources_watchdogs =
 endif
 
 efi_sources = \
@@ -220,13 +221,13 @@ efi_ldflags = \
        -L $(GNUEFI_LIB_DIR) \
        $(GNUEFI_LIB_DIR)/crt0-efi-$(ARCH).o
 
-if ARCH_AARCH64
-# aarch64's objcopy doesn't understand --target efi-[app|bsdrv|rtdrv],
+if ARCH_IS_X86
+objcopy_format = --target=efi-app-$(ARCH)
+else
+# aarch64's and arm's objcopy don't understand --target efi-[app|bsdrv|rtdrv],
 # hence set subsystem 0xa (EFI application) and binary format.
 objcopy_format = -O binary
 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
-else
-objcopy_format = --target=efi-app-$(ARCH)
 endif
 
 efi_objects_pre1 = $(efi_sources:.c=.o)
diff --git a/configure.ac b/configure.ac
index 371fc9b..0f079bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,6 +101,7 @@ AM_COND_IF(ARCH_AARCH64, [
 
 AC_SUBST([ARCH])
 AC_SUBST([MACHINE_TYPE_NAME])
+AM_CONDITIONAL([ARCH_IS_X86], [test "$ARCH" = "ia32" -o "$ARCH" = "x86_64"])
 
 # Checks from autoscan:
 AC_CHECK_FUNCS([getmntent])
-- 
2.35.3

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/ebb036e5652dd340ad101c59d4cf1bb589c53b61.1655731805.git.jan.kiszka%40siemens.com.

Reply via email to