AlmaLinux changes: Add RISC-V support
This commit is contained in:
parent
eddf250cbf
commit
7d9b7cde2a
@ -20,38 +20,43 @@ Signed-off-by: Andrew Lukoshko <alukoshko@almalinux.org>
|
||||
3 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/crates/lib/src/discoverable_partition_specification.rs b/crates/lib/src/discoverable_partition_specification.rs
|
||||
index 1111111..2222222 100644
|
||||
index d5432e7..344b232 100644
|
||||
--- a/crates/lib/src/discoverable_partition_specification.rs
|
||||
+++ b/crates/lib/src/discoverable_partition_specification.rs
|
||||
@@ -454,6 +454,8 @@ pub const fn this_arch_root() -> &'static str {
|
||||
ROOT_PPC64
|
||||
} else if #[cfg(all(target_arch = "powerpc64", target_endian = "little"))] {
|
||||
ROOT_PPC64_LE
|
||||
+ } else if #[cfg(target_arch = "riscv64")] {
|
||||
+ ROOT_RISCV64
|
||||
} else {
|
||||
compile_error!("Unsupported architecture")
|
||||
}
|
||||
@@ -457,6 +457,8 @@ pub const fn this_arch_root() -> &'static str {
|
||||
ROOT_PPC64
|
||||
} else if #[cfg(all(target_arch = "powerpc64", target_endian = "little"))] {
|
||||
ROOT_PPC64_LE
|
||||
+ } else if #[cfg(target_arch = "riscv64")] {
|
||||
+ ROOT_RISCV64
|
||||
} else {
|
||||
compile_error!("Unsupported architecture")
|
||||
}
|
||||
diff --git a/crates/lib/src/install.rs b/crates/lib/src/install.rs
|
||||
index 1111111..2222222 100644
|
||||
index 105e2b3..052b208 100644
|
||||
--- a/crates/lib/src/install.rs
|
||||
+++ b/crates/lib/src/install.rs
|
||||
@@ -68,7 +68,7 @@ pub(crate) const EFIVARFS: &str = "/sys/firmware/efi/efivars";
|
||||
@@ -87,7 +87,7 @@ const OSTREE_COMPOSEFS_SUPER: &str = ".ostree.cfs";
|
||||
const SELINUXFS: &str = "/sys/fs/selinux";
|
||||
/// The mount path for uefi
|
||||
pub(crate) const EFIVARFS: &str = "/sys/firmware/efi/efivars";
|
||||
-pub(crate) const ARCH_USES_EFI: bool = cfg!(any(target_arch = "x86_64", target_arch = "aarch64"));
|
||||
+pub(crate) const ARCH_USES_EFI: bool = cfg!(any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "riscv64"));
|
||||
|
||||
pub(crate) const EFI_LOADER_INFO: &str = "LoaderInfo-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f";
|
||||
|
||||
diff --git a/crates/lib/src/install/baseline.rs b/crates/lib/src/install/baseline.rs
|
||||
index 1111111..2222222 100644
|
||||
index d05604e..34d3187 100644
|
||||
--- a/crates/lib/src/install/baseline.rs
|
||||
+++ b/crates/lib/src/install/baseline.rs
|
||||
@@ -168,7 +168,7 @@ pub(crate) fn install_create_rootfs(
|
||||
r#"size=4MiB, bootable, type={uuid}, name="{label}""#
|
||||
)?;
|
||||
- } else if cfg!(any(target_arch = "aarch64", target_arch = "s390x")) {
|
||||
+ } else if cfg!(any(target_arch = "aarch64", target_arch = "s390x", target_arch = "riscv64")) {
|
||||
// No bootloader partition is necessary
|
||||
} else {
|
||||
anyhow::bail!("Unsupported architecture: {}", std::env::consts::ARCH);
|
||||
@@ -272,7 +272,7 @@ pub(crate) fn install_create_rootfs(
|
||||
&mut partitioning_buf,
|
||||
r#"size=4MiB, bootable, type={uuid}, name="{label}""#
|
||||
)?;
|
||||
- } else if cfg!(any(target_arch = "aarch64", target_arch = "s390x")) {
|
||||
+ } else if cfg!(any(target_arch = "aarch64", target_arch = "s390x", target_arch = "riscv64")) {
|
||||
// No bootloader partition is necessary
|
||||
} else {
|
||||
anyhow::bail!("Unsupported architecture: {}", std::env::consts::ARCH);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user