代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From: U2FsdGVkX1 <U2FsdGVkX1@gmail.com>
Signed-off-by: Songsong Zhang <U2FsdGVkX1@gmail.com>
Reviewed-by: Wei Fu <wefu@redhat.com>
Subject: [PATCH] Backport a riscv64 enablement patch from upstream
Signed-off-by: jchzhou <zhoujiacheng@iscas.ac.cn>
---
pyanaconda/modules/storage/bootloader/efi.py | 8 ++++
.../modules/storage/bootloader/factory.py | 8 ++++
pyanaconda/modules/storage/platform.py | 38 +++++++++++++++++++
3 files changed, 54 insertions(+)
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
index 1b47e24..6743717 100644
--- a/pyanaconda/modules/storage/bootloader/efi.py
+++ b/pyanaconda/modules/storage/bootloader/efi.py
@@ -214,6 +214,14 @@ class ArmEFIGRUB(EFIGRUB):
self._is_32bit_firmware = True
+class RISCV64EFIGRUB(EFIGRUB):
+ _serial_consoles = ["ttyS"]
+ _efi_binary = "\\grubriscv64.efi"
+
+ def __init__(self):
+ super().__init__()
+ self._packages64 = ["grub2-efi-riscv64"]
+
class MacEFIGRUB(EFIGRUB):
def __init__(self):
super().__init__()
diff --git a/pyanaconda/modules/storage/bootloader/factory.py b/pyanaconda/modules/storage/bootloader/factory.py
index 8aa3afb..4815685 100644
--- a/pyanaconda/modules/storage/bootloader/factory.py
+++ b/pyanaconda/modules/storage/bootloader/factory.py
@@ -146,4 +146,12 @@ class BootLoaderFactory(object):
from pyanaconda.modules.storage.bootloader.efi import ArmEFIGRUB
return ArmEFIGRUB
+ if platform_class is platform.RISCV64:
+ from pyanaconda.modules.storage.bootloader.extlinux import EXTLINUX
+ return EXTLINUX
+
+ if platform_class is platform.RISCV64EFI:
+ from pyanaconda.modules.storage.bootloader.efi import RISCV64EFIGRUB
+ return RISCV64EFIGRUB
+
return None
diff --git a/pyanaconda/modules/storage/platform.py b/pyanaconda/modules/storage/platform.py
index d0aa7ca..20f2c4d 100644
--- a/pyanaconda/modules/storage/platform.py
+++ b/pyanaconda/modules/storage/platform.py
@@ -459,6 +459,40 @@ class ARM(Platform):
}
return dict(super().stage1_constraints, **constraints)
+class RISCV64(Platform):
+
+ @property
+ def stage1_suggestion(self):
+ """The platform-specific suggestion about the stage1 device."""
+ return _(
+ "You must include at least one MBR-formatted "
+ "disk as an install target."
+ )
+
+ @property
+ def stage1_descriptions(self):
+ """The platform-specific descriptions of the stage1 device."""
+ return {
+ "disk": _(MBR_DESCRIPTION),
+ "partition": _(PARTITION_DESCRIPTION)
+ }
+
+ @property
+ def stage1_constraints(self):
+ """The platform-specific constraints for the stage1 device."""
+ constraints = {
+ PLATFORM_DEVICE_TYPES: ["disk"]
+ }
+ return dict(super().stage1_constraints, **constraints)
+
+
+class RISCV64EFI(EFI):
+
+ @property
+ def non_linux_format_types(self):
+ """Format types of devices with non-linux operating systems."""
+ return ["vfat", "ntfs"]
+
def get_platform():
"""Check the architecture of the system and return an instance of a
@@ -486,12 +520,16 @@ def get_platform():
return Aarch64EFI()
elif arch.is_arm():
return ArmEFI()
+ elif arch.is_riscv64():
+ return RISCV64EFI()
else:
return EFI()
elif arch.is_x86():
return X86()
elif arch.is_arm():
return ARM()
+ elif arch.is_riscv64():
+ return RISCV64()
else:
raise SystemError("Could not determine system architecture.")
--
2.44.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。