commit 6f05eeedc5cefe971d642aa89a67d18cc672be1d Author: Andrew Lukoshko Date: Fri Feb 20 11:41:34 2026 +0000 Add riscv64 architecture support for bootc diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..85c6344 --- /dev/null +++ b/config.yaml @@ -0,0 +1,15 @@ +actions: + - modify_release: + - suffix: ".alma.1" + enabled: true + + - changelog_entry: + - name: "Andrew Lukoshko" + email: "alukoshko@almalinux.org" + line: + - "Add RISC-V support" + + - add_files: + - type: "patch" + name: "0001-Add-riscv64-architecture-support.patch" + number: 1001 diff --git a/files/0001-Add-riscv64-architecture-support.patch b/files/0001-Add-riscv64-architecture-support.patch new file mode 100644 index 0000000..a0e320c --- /dev/null +++ b/files/0001-Add-riscv64-architecture-support.patch @@ -0,0 +1,57 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Andrew Lukoshko +Date: Thu, 20 Feb 2026 00:00:00 +0000 +Subject: [PATCH] Add riscv64 architecture support + +Add RISC-V 64-bit (riscv64) to the set of supported architectures. +RISC-V uses UEFI boot like aarch64, so no special bootloader partition +is needed. + +Changes: +- discoverable_partition_specification: add riscv64 to this_arch_root() +- install: add riscv64 to ARCH_USES_EFI +- install/baseline: add riscv64 to partitioning arch checks + +Signed-off-by: Andrew Lukoshko +--- + crates/lib/src/discoverable_partition_specification.rs | 2 ++ + crates/lib/src/install.rs | 2 +- + crates/lib/src/install/baseline.rs | 2 +- + 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 +--- 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") + } +diff --git a/crates/lib/src/install.rs b/crates/lib/src/install.rs +index 1111111..2222222 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"; +-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 +--- 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); +-- +2.43.0