aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2021-07-24 18:36:23 -0300
committerLeo <thinkabit.ukim@gmail.com>2021-07-24 18:36:48 -0300
commit5d735f3262bc7896910ac72157407141ddb2d952 (patch)
tree2eb922508bf5d93ff500c4aa0e468d3325df0ccf
parentaac76f1d25935a2b3fdf6572185727840039e49c (diff)
downloadaports-5d735f3262bc7896910ac72157407141ddb2d952.tar.gz
aports-5d735f3262bc7896910ac72157407141ddb2d952.tar.bz2
aports-5d735f3262bc7896910ac72157407141ddb2d952.tar.xz
main/efitools: fix on riscv64
-rw-r--r--main/efitools/005-riscv64.patch45
-rw-r--r--main/efitools/APKBUILD8
2 files changed, 51 insertions, 2 deletions
diff --git a/main/efitools/005-riscv64.patch b/main/efitools/005-riscv64.patch
new file mode 100644
index 0000000000..b98c138c10
--- /dev/null
+++ b/main/efitools/005-riscv64.patch
@@ -0,0 +1,45 @@
+We can use just the same flags as for aarch64.
+
+Signed-off-by: Heinrich Schuchardt <xypron.glpk@xxxxxx>
+---
+RISC-V patches for gnu-efi are not yet accepted in upstream. Cf.
+
+[Gnu-efi-discuss] [PATCH 1/1] Initial support for RISCV64
+https://sourceforge.net/p/gnu-efi/mailman/gnu-efi-discuss/thread/20210401153553.103286-1-xypron.glpk%40gmx.de/#msg37253360
+[Gnu-efi-discuss] [PATCH 1/1] Undefined Status in LibGetVariableAndSize()
+https://sourceforge.net/p/gnu-efi/mailman/gnu-efi-discuss/thread/20210319162557.334645-1-xypron.glpk%40gmx.de/#msg37243995
+
+You can use
+https://github.com/xypron/gnu-efi/releases/tag/riscv64-2021-04-01 for
+building sbsigntools and efitools.
+---
+ Make.rules | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/Make.rules b/Make.rules
+index 903a5a4..69bd3bd 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -10,6 +10,8 @@ else ifeq ($(ARCH),aarch64)
+ ARCH3264 =
+ else ifeq ($(ARCH),arm)
+ ARCH3264 =
++else ifeq ($(ARCH),riscv64)
++ARCH3264 =
+ else
+ $(error unknown architecture $(ARCH))
+ endif
+@@ -56,6 +58,11 @@ ifeq ($(ARCH),aarch64)
+ FORMAT = -O binary
+ endif
+
++ifeq ($(ARCH),riscv64)
++ 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* \
+--
+2.30.2
diff --git a/main/efitools/APKBUILD b/main/efitools/APKBUILD
index 637ce82db4..9fe306cf61 100644
--- a/main/efitools/APKBUILD
+++ b/main/efitools/APKBUILD
@@ -15,6 +15,7 @@ source="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapsh
002-fix-parallel-make.patch
003-fix-wchar_t.patch
004-typo.patch
+ 005-riscv64.patch
"
prepare() {
@@ -31,8 +32,11 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="77e0ad7e865814ed388ff6daabe0f4b49ba51672bf2cbb98b7905e209cbd28f9ede2f73213ce45af8a978c1e67dba24ec88a1188661317cc22317b47e575cde8 efitools-1.9.2.tar.gz
+sha512sums="
+77e0ad7e865814ed388ff6daabe0f4b49ba51672bf2cbb98b7905e209cbd28f9ede2f73213ce45af8a978c1e67dba24ec88a1188661317cc22317b47e575cde8 efitools-1.9.2.tar.gz
cd72161a99b26472909a8da834c08a1f88b54d35291a6646562b03a6616fa5fb61e49d4fb3c780861689d23823c101709890dd245dd8aa9f51dca40ac1b2d369 001-datatypes.patch
7afe87e9b44ed3e10200770d3079e4e14b6d39c54c05538031e93d021631427fed47781b016b46f58b8fe6d21f1f3c78667b2b502aa20b99516aa980303aa2ad 002-fix-parallel-make.patch
bd31e51c6d80ab3fdfe0e7abea1cd6f982d63a96a345c0e75f438f6a219bf64b1510f0dabdcc49d24cc788c06ff4ccfbccde0c1aead9c00b65eaf2977e87e742 003-fix-wchar_t.patch
-e34d4d8f420a29cfc50a9f98dcbb048016f2fc535ddb3e39482e58f44b37db672410ffab24392751818d72b1e914d77644cae8f7a92bb9af7fe2a9f726a230e9 004-typo.patch"
+e34d4d8f420a29cfc50a9f98dcbb048016f2fc535ddb3e39482e58f44b37db672410ffab24392751818d72b1e914d77644cae8f7a92bb9af7fe2a9f726a230e9 004-typo.patch
+630587b00bee4e65e9258f56d0e66677e36063c83659f394c5fcb766683d704f63e8e2acf72f69f6bfef77dd84471c28ab21ef15f10389d8c2151fa2e46229c4 005-riscv64.patch
+"