diff --git a/1010-add-uefi-boot-on-loongarch64.patch b/1010-add-uefi-boot-on-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..5b404814a1757dc9c338908c97872337362b83d1 --- /dev/null +++ b/1010-add-uefi-boot-on-loongarch64.patch @@ -0,0 +1,33 @@ +From 440fb16e7e23679846d6e09bfbb6acfd38b4b1b8 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Wed, 30 Jul 2025 10:03:12 +0800 +Subject: [PATCH] add uefi boot on loongarch64 + +--- + pyanaconda/modules/storage/bootloader/efi.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py +index 22ceefb..993dd02 100644 +--- a/pyanaconda/modules/storage/bootloader/efi.py ++++ b/pyanaconda/modules/storage/bootloader/efi.py +@@ -219,8 +219,16 @@ class LOONGARCHEFIGRUB(EFIGRUB): + + rc = util.execWithRedirect("/usr/bin/cp", ["-a", "/boot/efi/EFI/anolis/grubloongarch64.efi", "/boot/efi/EFI/BOOT/" + "BOOTLOONGARCH.EFI"], + root=conf.target.system_root) ++ if rc: ++ raise BootLoaderError("Failed to cp BOOTLOONGARCH.EFI on loongarch64") + rc = util.execWithRedirect("/usr/bin/cp", ["-a", "/boot/efi/EFI/anolis/grubloongarch64.efi", "/boot/efi/EFI/BOOT/" + "BOOTLOONGARCH64.EFI"], + root=conf.target.system_root) ++ if rc: ++ raise BootLoaderError("Failed to cp BOOTLOONGARCH64.EFI on loongarch64") ++ rc = util.execWithRedirect( ++ "efibootmgr", ++ ["-c", "-d", boot_disk.path, "-p", boot_part_num, "-L", productName.split("-")[0], "-l", "/EFI/BOOT/" + "BOOTLOONGARCH64.EFI"] ++ ) + if rc: + raise BootLoaderError("Failed to set new efi boot target. This is most " + "likely a kernel or firmware bug.") +-- +2.43.0 + diff --git a/anaconda.spec b/anaconda.spec index a18d37bd1aef6587f676ba8bb83c0053620353a1..e65fa8856cb3bb7dc2bf868be5b7c97b2c1ee69c 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,4 +1,4 @@ -%define anolis_release 8 +%define anolis_release 9 Summary: Graphical system installer Name: anaconda @@ -34,6 +34,7 @@ Patch1007: 1007-Remove-nvdimm-support.patch Patch1008: 1008-Do-not-use-stringize-and-unicodeize-from-Blivet.patch # Refer to https://github.com/rhinstaller/anaconda/commit/fed051f660c06ce9c3566b8fb12864a5c2737423 Patch1009: 1009-backport-a-riscv64-enablement-patch-from-upstream.patch +Patch1010: 1010-add-uefi-boot-on-loongarch64.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -455,6 +456,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d %{_prefix}/libexec/anaconda/dd_* %changelog +* Wed Jul 30 2025 Wenlong Zhang - 38.23-9 +- add uefi boot on loongarch64 + * Fri Jun 13 2025 Yihao Yan - 38.23-8 - add riscv64 support