diff --git a/1009-configure-Add-GRUB_CPU_LOONGARCH64-support.patch b/1009-configure-Add-GRUB_CPU_LOONGARCH64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..a9094437c6297c550314fe0ed2ddc923025e157c --- /dev/null +++ b/1009-configure-Add-GRUB_CPU_LOONGARCH64-support.patch @@ -0,0 +1,28 @@ +From c49899e519259e9811dccba983ddfea98044fb4c Mon Sep 17 00:00:00 2001 +From: Fedora Ninjas +Date: Fri, 24 May 2024 02:25:14 +0800 +Subject: [PATCH] configure: Add GRUB_CPU_LOONGARCH64 support. + +Signed-off-by: Juxin Gao +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 85ba930..fe9ebae 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -149,7 +149,9 @@ case "$target_cpu" in + ;; + arm*) target_cpu=arm ;; + aarch64*) target_cpu=arm64 ;; +- loongarch64) target_cpu=loongarch64 ;; ++ loongarch64) target_cpu=loongarch64 ++ machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_LOONGARCH64=1" ++ ;; + riscv32*) target_cpu=riscv32 ;; + riscv64*) target_cpu=riscv64 ;; + esac +-- +2.41.0 + diff --git a/grub.patches b/grub.patches index ed0208bd6eeaa7545ae884784768e55b626c5929..3b94a745f459346429684be3ae1decfb2b8f761f 100644 --- a/grub.patches +++ b/grub.patches @@ -206,3 +206,4 @@ Patch1005: 1005-CVE-2024-1048-grub-set-bootflag-Conservative-partial-fix.patch Patch1006: 1006-CVE-2024-1048-grub-set-bootflag-More-complete-fix.patch Patch1007: 1007-CVE-2024-1048-grub-set-bootflag-Exit-calmly-when-not.patch Patch1008: 1008-loongarch-add-back-compatibility-for-linux-kernel.patch +Patch1009: 1009-configure-Add-GRUB_CPU_LOONGARCH64-support.patch diff --git a/grub2.spec b/grub2.spec index 247961f38b344acf73b5558ced15fe3da38d4b75..6b2cfaa217f7332322671820d1f35e979583512c 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1,4 +1,4 @@ -%define anolis_release 6 +%define anolis_release 7 %global _lto_cflags %{nil} %undefine _hardened_build @@ -506,7 +506,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog -* Wed May 23 2024 Xue Liu - 2.12-6 +* Fri May 24 2024 Juxin Gao - 2.12-7 +- Add GRUB_CPU_LOONGARCH64 for loongson platform + +* Thu May 23 2024 Xue Liu - 2.12-6 - Add back-compatibility for linux kernel * Wed May 15 2024 Kaiqiang Wang - 2.12-5