From c5d7a81dc663c3f23bd7a89e512811e46ad808f6 Mon Sep 17 00:00:00 2001 From: ouuleilei Date: Fri, 24 May 2024 19:38:29 +0800 Subject: [PATCH] Add sophgo's patch to support risc-v machine SG2042 --- grub.patches | 1 + grub2.spec | 5 ++++- modify-efi_max_usable-addr.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 modify-efi_max_usable-addr.patch diff --git a/grub.patches b/grub.patches index ecb025b..8e92f9f 100644 --- a/grub.patches +++ b/grub.patches @@ -229,3 +229,4 @@ Patch228: 0002-Revert-templates-Properly-disable-the-os-prober-by-d.patch Patch229: 0003-Revert-templates-Disable-the-os-prober-by-default.patch Patch230: Handle-non-continuous-data-blocks-in-directory-exten.patch Patch231: loongarch64-fix-GRUB_EFI_MAX_ALLOCATION_ADDRESS-unde.patch +Patch232: modify-efi_max_usable-addr.patch diff --git a/grub2.spec b/grub2.spec index 4a31c73..8b3e155 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,7 +14,7 @@ Name: grub2 Epoch: 1 Version: 2.12 -Release: 11 +Release: 12 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -447,6 +447,9 @@ fi %{_datadir}/man/man* %changelog +* Fri May 24 2024 Ouuleilei - 1:2.12-12 +- Add sophgo's patch to support risc-v machine SG2042 + * Sat May 11 2024 zhangqiumiao - 1:2.12-11 - Type:bugfix - CVE:NA diff --git a/modify-efi_max_usable-addr.patch b/modify-efi_max_usable-addr.patch new file mode 100644 index 0000000..4b0c31d --- /dev/null +++ b/modify-efi_max_usable-addr.patch @@ -0,0 +1,26 @@ +From 7ab0dc548f8221a9c336a1682df9f729b975c7ff Mon Sep 17 00:00:00 2001 +From: "jingyu.li01" +Date: Tue, 2 Jan 2024 10:09:53 +0800 +Subject: [PATCH] include/grub/riscv64: modify efi_max_usable addr + +This is a temporary solution for relocation overflow on a segmented memory +layout. + +Signed-off-by: jingyu.li01 +--- + include/grub/riscv64/efi/memory.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/grub/riscv64/efi/memory.h b/include/grub/riscv64/efi/memory.h +index c6cb32417..eb6f1bb83 100644 +--- a/include/grub/riscv64/efi/memory.h ++++ b/include/grub/riscv64/efi/memory.h +@@ -1,7 +1,7 @@ + #ifndef GRUB_MEMORY_CPU_HEADER + #include + +-#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffffffffULL ++#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffffULL + #define GRUB_EFI_MAX_ALLOCATION_ADDRESS GRUB_EFI_MAX_USABLE_ADDRESS + + #endif /* ! GRUB_MEMORY_CPU_HEADER */ -- Gitee