diff --git a/SOURCES/efitools-riscv64.patch b/SOURCES/efitools-riscv64.patch new file mode 100644 index 0000000..b98c138 --- /dev/null +++ b/SOURCES/efitools-riscv64.patch @@ -0,0 +1,45 @@ +We can use just the same flags as for aarch64. + +Signed-off-by: Heinrich Schuchardt +--- +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/SPECS/efitools.spec b/SPECS/efitools.spec index d774249..ddc2aea 100644 --- a/SPECS/efitools.spec +++ b/SPECS/efitools.spec @@ -10,6 +10,7 @@ URL: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.gi Source0: %{url}/snapshot/%{name}-%{version}.tar.gz Patch1: efitools-c99-1.patch Patch2: efitools-c99-2.patch +Patch3: efitools-riscv64.patch # same as gnu-efi ExclusiveArch: %{efi}