Bring back support for RISC-V (riscv64)

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2019-03-25 21:33:49 +01:00
parent 19a885878a
commit 722a31df4b
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
3 changed files with 45 additions and 27 deletions

View File

@ -0,0 +1,39 @@
diff --git a/Makefile b/Makefile
index 7d56eae..221c46d 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ override EFI_ESP_ROOT=/boot/efi
endif
EFI_ARCHES ?= $(call get-config,arches)
ifeq ($(EFI_ARCHES),)
-override EFI_ARCHES="x86_64 aarch64 %{arm} %{ix86}"
+override EFI_ARCHES="x86_64 aarch64 %{arm} %{ix86} riscv64"
endif
EFI_VENDOR ?= $(call get-config,vendor)
diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in
index a9aaf6d..d36a8d5 100644
--- a/efi-rpm-macros.spec.in
+++ b/efi-rpm-macros.spec.in
@@ -39,7 +39,7 @@ machine bootloaders and tools.
%autosetup -S git -n %{name}-@@EFI_SOURCE_VERSION@@
git config --local --add efi.vendor "%{_efi_vendor_}"
git config --local --add efi.esp-root /boot/efi
-git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
+git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86} riscv64"
%build
%make_build clean all
diff --git a/macros.efi-srpm.in b/macros.efi-srpm.in
index 00503f1..7f258c7 100644
--- a/macros.efi-srpm.in
+++ b/macros.efi-srpm.in
@@ -37,6 +37,8 @@
return("aa64")
elseif arch("%{arm}") then
return("arm")
+ elseif arch("riscv64") then
+ return("riscv64")
else
return("none")
end

View File

@ -1,26 +0,0 @@
diff --git a/Makefile b/Makefile
index a3e20ec..39a1278 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ $(error rpm macro directory could not be found)
endif
EFI_ESP_ROOT ?= /boot/efi
-EFI_ARCHES ?= x86_64 aarch64 %{arm} %{ix86}
+EFI_ARCHES ?= x86_64 aarch64 %{arm} %{ix86} riscv64
EFI_VENDOR ?=
# TARGETS = macros.efi macros.efi-srpm efi-rpm-macros.spec
diff --git a/macros.efi-srpm.in b/macros.efi-srpm.in
index f3b4c68..fb2ccba 100644
--- a/macros.efi-srpm.in
+++ b/macros.efi-srpm.in
@@ -37,6 +37,8 @@
return("aa64")
elseif arch("%{arm}") then
return("arm")
+ elseif arch("riscv64") then
+ return("rv64")
else
return("none")
end

View File

@ -9,6 +9,8 @@ BuildArch: noarch
Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-4.tar.bz2
Patch10: efi-rpm-macros-4-riscv64.patch
%global debug_package %{nil}
%global _efi_vendor_ %(eval echo $(sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release))
@ -36,7 +38,7 @@ machine bootloaders and tools.
%autosetup -S git -n %{name}-4
git config --local --add efi.vendor "%{_efi_vendor_}"
git config --local --add efi.esp-root /boot/efi
git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86} riscv64"
%build
%make_build clean all
@ -65,6 +67,9 @@ git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
%dir /boot/efi/EFI/%{_efi_vendor_}
%changelog
* Mon Mar 25 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> - 4-2.0.riscv64
- Add support for RISC-V (riscv64)
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild