Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/lib/src/discoverable_partition_specification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,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
Comment on lines +524 to +525
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding riscv64 support here is correct, it appears that riscv64 also needs to be added to the ARCH_USES_EFI constant in crates/lib/src/install.rs to ensure full support for this architecture.

On RISC-V 64-bit systems, UEFI is the standard boot environment for modern Linux distributions. Without updating ARCH_USES_EFI, the installation process (specifically clean_boot_directories) will skip essential EFI-related steps like mounting and cleaning the ESP, which will likely lead to a broken installation on RISC-V hardware.

Please consider updating crates/lib/src/install.rs as well:

pub(crate) const ARCH_USES_EFI: bool = cfg!(any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "riscv64"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be valid and

} else if cfg!(any(target_arch = "aarch64", target_arch = "s390x")) {

might need to be modified too.

If you have riscv64 hardware it might be worth a smoke test.

} else {
compile_error!("Unsupported architecture")
}
Expand Down