From 7b6e1b9e85e71be3891a9142c7d8c543d6456b2e Mon Sep 17 00:00:00 2001 From: ouuleilei Date: Sat, 11 May 2024 14:47:18 +0800 Subject: [PATCH] add riscv64 support (cherry picked from commit 78a60c75b5f39d743184ea7607f8294e100625e5) --- 0001-add-riscv64-support.patch | 25 +++++++++++++++++++++++++ grubby.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0001-add-riscv64-support.patch diff --git a/0001-add-riscv64-support.patch b/0001-add-riscv64-support.patch new file mode 100644 index 0000000..8feddea --- /dev/null +++ b/0001-add-riscv64-support.patch @@ -0,0 +1,25 @@ +From 7f09aab493a7b74c4cac9a2f7c51f0da2945a7fb Mon Sep 17 00:00:00 2001 +From: ouuleilei +Date: Sat, 11 May 2024 14:31:01 +0800 +Subject: [PATCH] add riscv64 support + +--- + grubby.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/grubby.c b/grubby.c +index 12db06d..a96eb42 100644 +--- a/grubby.c ++++ b/grubby.c +@@ -62,6 +62,8 @@ int isEfi = 0; + + #if defined(__aarch64__) || (__loongarch64) + #define isEfiOnly 1 ++#elif (defined(__riscv) && (__riscv_xlen == 64)) ++#define isEfiOnly 1 + #else + #define isEfiOnly 0 + #endif +-- +2.41.0 + diff --git a/grubby.spec b/grubby.spec index 5b8922a..63ca13d 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 32 +Release: 33 Summary: Update and display information about the configuration files License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -37,6 +37,7 @@ Patch9001: fix-make-test-fail-when-no-boot-partition.patch Patch9002: 0001-add-loongarch-support-for-grubby.patch Patch9003: grubby-aarch64-skip-test-grub2.15.patch Patch9004: support-specify-cc.patch +Patch9005: 0001-add-riscv64-support.patch BuildRequires: gcc pkgconfig glib2-devel popt-devel BuildRequires: libblkid-devel git-core sed make @@ -115,6 +116,9 @@ sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE3} > %{buildroo %{_mandir}/man8/*.8* %changelog +* Fri May 10 2024 ouuleilei - 8.40-33 +- add riscv64 support + * Fri Apr 14 2023 jammyjellyfish - 8.40-32 - Support build with clang