From 3ee298c70c7b2b3179911f1c3fb55df7fa97fd6c Mon Sep 17 00:00:00 2001 From: yueyuankun Date: Thu, 23 May 2024 14:10:01 +0800 Subject: [PATCH] fix patch10000 cannot be applied on loongarch64 --- 0001-add-loongarch-support-for-anaconda.patch | 25 +++++++++++-------- anaconda.spec | 10 +++++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/0001-add-loongarch-support-for-anaconda.patch b/0001-add-loongarch-support-for-anaconda.patch index 15d7a8d..a5dfe3f 100644 --- a/0001-add-loongarch-support-for-anaconda.patch +++ b/0001-add-loongarch-support-for-anaconda.patch @@ -3,13 +3,14 @@ From: Huang Yang Date: Thu, 25 Apr 2024 12:14:01 +0000 Subject: [PATCH] add loongarch support for anaconda +Signed-off-by: yueyuankun --- pyanaconda/modules/storage/bootloader/base.py | 9 +++-- - pyanaconda/modules/storage/bootloader/efi.py | 33 ++++++++++++++++++- + pyanaconda/modules/storage/bootloader/efi.py | 35 ++++++++++++++++++- .../modules/storage/bootloader/factory.py | 4 +++ .../modules/storage/devicetree/fsset.py | 6 +++- pyanaconda/modules/storage/platform.py | 10 ++++++ - 5 files changed, 57 insertions(+), 5 deletions(-) + 5 files changed, 59 insertions(+), 5 deletions(-) diff --git a/pyanaconda/modules/storage/bootloader/base.py b/pyanaconda/modules/storage/bootloader/base.py index d40086d..191b8af 100644 @@ -34,7 +35,7 @@ index d40086d..191b8af 100644 # Does /usr have its own device? If so, we need to tell dracut usr_device = storage.mountpoints.get("/usr") diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py -index 6135699..96450dc 100644 +index 5a28676..d2fffd2 100644 --- a/pyanaconda/modules/storage/bootloader/efi.py +++ b/pyanaconda/modules/storage/bootloader/efi.py @@ -28,7 +28,7 @@ from pyanaconda.product import productName @@ -46,10 +47,10 @@ index 6135699..96450dc 100644 class EFIBase(object): -@@ -169,6 +169,37 @@ class Aarch64EFIGRUB(EFIGRUB): - super().__init__() +@@ -170,6 +170,39 @@ class Aarch64EFIGRUB(EFIGRUB): self._packages64 = ["grub2-efi-aa64", "shim-aa64"] + +class LOONGARCHEFIGRUB(EFIGRUB): + _efi_binary = "grubloongarch64.efi" + stage2_is_valid_stage1 = False @@ -81,11 +82,13 @@ index 6135699..96450dc 100644 + elif self.stage1_device.type == "mdarray": # pylint: disable=no-member + for parent in self.stage1_device.parents: # pylint: disable=no-member + self._add_single_efi_boot_target(parent) - ++ ++ class ArmEFIGRUB(EFIGRUB): _serial_consoles = ["ttyAMA", "ttyS"] + _efi_binary = "\\grubarm.efi" diff --git a/pyanaconda/modules/storage/bootloader/factory.py b/pyanaconda/modules/storage/bootloader/factory.py -index 8aa3afb..2fb9993 100644 +index 4815685..643f633 100644 --- a/pyanaconda/modules/storage/bootloader/factory.py +++ b/pyanaconda/modules/storage/bootloader/factory.py @@ -114,6 +114,10 @@ class BootLoaderFactory(object): @@ -124,7 +127,7 @@ index 4db3759..6f85a37 100644 if device.format.check and mountpoint == "/": passno = 1 diff --git a/pyanaconda/modules/storage/platform.py b/pyanaconda/modules/storage/platform.py -index d0aa7ca..3a238f9 100644 +index 20f2c4d..2bb8e41 100644 --- a/pyanaconda/modules/storage/platform.py +++ b/pyanaconda/modules/storage/platform.py @@ -287,6 +287,14 @@ class Aarch64EFI(EFI): @@ -142,10 +145,10 @@ index d0aa7ca..3a238f9 100644 class ArmEFI(EFI): @property -@@ -486,6 +494,8 @@ def get_platform(): - return Aarch64EFI() - elif arch.is_arm(): +@@ -522,6 +530,8 @@ def get_platform(): return ArmEFI() + elif arch.is_riscv64(): + return RISCV64EFI() + elif arch.is_loongarch(): + return LOONGARCHEFI() else: diff --git a/anaconda.spec b/anaconda.spec index befef22..a8f0f9d 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 36.16.5 -Release: 33 +Release: 34 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -58,9 +58,7 @@ Patch9024: bugfix-revert-Set-default-entry-to-the-BLS-id-instead-of-the-entry Patch9025: bugfix-import-new-BlockDev.patch Patch9026: bugfix-fix-custom-storage-chinese-tip.patch -%ifarch loongarch64 Patch10000: 0001-add-loongarch-support-for-anaconda.patch -%endif %define dasbusver 1.3 @@ -317,6 +315,12 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Thu May 23 2024 yueyuankun - 36.16.5-34 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix patch10000 cannot be applied on loongarch64 + * Thu May 09 2024 jchzhou - 36.16.5-33 - Type:feature - ID:NA