main/efitools: fix build on aarch64 with gnu-efi >= 3.0.17

Fails to build with: "Invalid DOS header magic". This fix was suggested
in https://github.com/ncroxon/gnu-efi/issues/7#issuecomment-2122741592.

> Removing the aarch64 section will fix the issue as it defaults to
> objcopy
This commit is contained in:
Kevin Daudt 2024-10-16 18:56:10 +00:00
parent 48c4918f8a
commit c20e819e70
2 changed files with 23 additions and 1 deletions

View file

@ -3,7 +3,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=efitools
pkgver=1.9.2
pkgrel=10
pkgrel=11
pkgdesc="EFI tools"
url="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git"
# others: limited by sbsigntool
@ -20,6 +20,7 @@ source="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapsh
003-fix-wchar_t.patch
004-typo.patch
005-riscv64.patch
fix-build-on-aarch64.patch
"
prepare() {
@ -43,4 +44,5 @@ cd72161a99b26472909a8da834c08a1f88b54d35291a6646562b03a6616fa5fb61e49d4fb3c78086
dafe620f7eb3cbfe9538659da0936d704b11e176dbf544d12233c04c4d0edc7e46ebd4388edf886e907da7ba68dbd98828001369149b9fe3dfc7cba3f41ebea6 003-fix-wchar_t.patch
e34d4d8f420a29cfc50a9f98dcbb048016f2fc535ddb3e39482e58f44b37db672410ffab24392751818d72b1e914d77644cae8f7a92bb9af7fe2a9f726a230e9 004-typo.patch
630587b00bee4e65e9258f56d0e66677e36063c83659f394c5fcb766683d704f63e8e2acf72f69f6bfef77dd84471c28ab21ef15f10389d8c2151fa2e46229c4 005-riscv64.patch
92527e22ba385b0485508eb528d7338f202f2fc3174ef285a9fc7dfb339162bc95f98dbad0593043f0970034e99e8d027424e5a6924ea0a8c10e0c5b524e8f32 fix-build-on-aarch64.patch
"

View file

@ -0,0 +1,20 @@
Description: build fails on aarch64 with: "Invalid DOS header magic". Project is
not maintained anymore, but this fix was suggested in
https://github.com/ncroxon/gnu-efi/issues/7#issuecomment-2122741592
Upstream: no
diff --git a/Make.rules b/Make.rules
index c8a3ddc..2711cc6 100644
--- a/Make.rules
+++ b/Make.rules
@@ -53,11 +53,6 @@ ifeq ($(ARCH),arm)
FORMAT = -O binary
endif
-ifeq ($(ARCH),aarch64)
- LDFLAGS += --defsym=EFI_SUBSYSTEM=0x0a
- FORMAT = -O binary
-endif
-
ifeq ($(ARCH),riscv64)
LDFLAGS += --defsym=EFI_SUBSYSTEM=0x0a
FORMAT = -O binary