]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: correct ARM32 GNU EFI boot binary build
authorMatt Clarkson <mattyclarkson@gmail.com>
Thu, 6 Apr 2017 13:12:15 +0000 (14:12 +0100)
committerMatt Clarkson <mattyclarkson@gmail.com>
Thu, 6 Apr 2017 13:33:02 +0000 (14:33 +0100)
Due to ARM not having an EFI capable objcopy we need to use the binary
output argument. This is correctly set up for AArch64 but is missed
when building for ARM32. This patch adds the ARCH_ARM automake define
which can then be used in the makefile to determine if to use the
correct linker flags.

The addition of the ARM32 flags is a copy and paste from the AArch64 to
create a logical OR for the ARCH_AARCH64 and ARCH_ARM variables. I
couldn't figure out a better way to create the conditional with basic
Make language constructs.

Makefile.am
configure.ac

index 2a5610740ee084308fbbc57ea1e8cce03e84b0c4..5cd38d991bb85fa94333a99e3458413abacc4df3 100644 (file)
@@ -2978,10 +2978,15 @@ if ARCH_AARCH64
 efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
 EFI_FORMAT = -O binary
 else
+if ARCH_ARM
+efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
+EFI_FORMAT = -O binary
+else
 EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
 endif
 endif
 endif
+endif
 
 # ------------------------------------------------------------------------------
 systemd_boot_headers = \
index a95e98437507cb4f5e723c91a71febeea30c3919..b5868f4be788fe782f528be7c9bd55b0979ed244 100644 (file)
@@ -57,6 +57,7 @@ AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is
 SET_ARCH(X86_64, x86_64*)
 SET_ARCH(IA32, i*86*)
 SET_ARCH(MIPS, mips*)
+SET_ARCH(ARM, arm*)
 SET_ARCH(AARCH64, aarch64*)
 
 # i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise
@@ -1297,6 +1298,9 @@ AM_COND_IF(ARCH_IA32, [
 AM_COND_IF(ARCH_X86_64, [
         EFI_MACHINE_TYPE_NAME=x64])
 
+AM_COND_IF(ARCH_ARM, [
+        EFI_MACHINE_TYPE_NAME=arm])
+
 AM_COND_IF(ARCH_AARCH64, [
         EFI_MACHINE_TYPE_NAME=aa64])