efitools: add patch for gnu-efi 3.0.18

This commit is contained in:
Weijia Wang 2024-05-21 18:13:44 +02:00
parent 695505d580
commit 72a4891639
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff --git a/Make.rules b/Make.rules
index 903a5a4..59eca2f 100644
--- a/Make.rules
+++ b/Make.rules
@@ -51,11 +51,6 @@ ifeq ($(ARCH),arm)
FORMAT = -O binary
endif
-ifeq ($(ARCH),aarch64)
- LDFLAGS += --defsym=EFI_SUBSYSTEM=0x0a
- FORMAT = -O binary
-endif
-
%.efi: %.so
$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \

View File

@ -21,6 +21,11 @@ stdenv.mkDerivation rec {
sha256 = "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i";
};
# https://github.com/ncroxon/gnu-efi/issues/7#issuecomment-2122741592
patches = [
./aarch64.patch
];
postPatch = ''
sed -i -e 's#/usr/include/efi#${gnu-efi}/include/efi/#g' Make.rules
sed -i -e 's#/usr/lib64/gnuefi#${gnu-efi}/lib/#g' Make.rules