From 9def2c14e5ceb278dc0907d3885202f6123fc8da Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Wed, 30 Jul 2025 09:26:13 +0800 Subject: [PATCH] add uefi boot on loongarch64 (cherry picked from commit 907699f0ad6a8979dce79acbebf29f2a27d9f07c) --- anaconda.spec | 9 +++++- bugfix-add-uefi-boot-on-loongarch64.patch | 36 +++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 bugfix-add-uefi-boot-on-loongarch64.patch diff --git a/anaconda.spec b/anaconda.spec index 3944d1a..f7b7c61 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,6 +1,6 @@ Name: anaconda Version: 36.16.5 -Release: 50 +Release: 51 Summary: Graphical system installer License: GPL-2.0-or-later and MIT URL: https://fedoraproject.org/wiki/Anaconda @@ -73,6 +73,7 @@ Patch9029: bugfix-Fix-abnormal-display-of-network-configuration-interface.pat Patch9030: bugfix-fix-duplicate-alt-D-accelerator-on-root-account-screen.patch Patch9031: backport-Fix-wrong-dracut-timeout-message.patch +Patch9032: bugfix-add-uefi-boot-on-loongarch64.patch %define dasbusver 1.3 %define dbusver 1.2.3 @@ -329,6 +330,12 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Mon Jul 28 2025 Wenlong Zhang - 36.16.5-51 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add uefi boot on loongarch64 + * Wed Jul 30 2025 Funda Wang - 36.16.5-50 - Type:bugfix - ID:NA diff --git a/bugfix-add-uefi-boot-on-loongarch64.patch b/bugfix-add-uefi-boot-on-loongarch64.patch new file mode 100644 index 0000000..e909040 --- /dev/null +++ b/bugfix-add-uefi-boot-on-loongarch64.patch @@ -0,0 +1,36 @@ +From 0e97f3a67fa25900e0875de25969d54b9d12aafd Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Tue, 29 Jul 2025 11:09:43 +0800 +Subject: [PATCH] add uefi boot on loongarch64 + +--- + pyanaconda/modules/storage/bootloader/efi.py | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py +index f0a9aca..cf0e54f 100644 +--- a/pyanaconda/modules/storage/bootloader/efi.py ++++ b/pyanaconda/modules/storage/bootloader/efi.py +@@ -188,11 +188,16 @@ class LOONGARCHEFIGRUB(EFIGRUB): + + rc = util.execInSysroot("cp", ["-a", "/boot/efi/EFI/openEuler/" + self._efi_binary, "/boot/efi/EFI/BOOT/" + "BOOTLOONGARCH64.EFI"]) + if rc: +- raise BootLoaderError("Failed to set new efi boot target. This is most " +- "likely a kernel or firmware bug.") ++ raise BootLoaderError("Failed to cp BOOTLOONGARCH64.EFI on loongarch64") + rc = util.execInSysroot("cp", ["-a", "/boot/efi/EFI/openEuler/" + self._efi_binary, "/boot/efi/EFI/BOOT/" + "BOOTLOONGARCH.EFI"]) + if rc: +- raise BootLoaderError("Failed to set new efi boot target for new BIOS. This is most " ++ raise BootLoaderError("Failed to cp BOOTLOONGARCH.EFI on loongarch64") ++ rc = util.execInSysroot( ++ "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.") + + def add_efi_boot_target(self): +-- +2.43.0 + -- Gitee