Add support for Fedora riscv64 - #4450
Open
xjamesmorris wants to merge 6 commits into
Open
Conversation
xjamesmorris
commented
Sep 7, 2026
Contributor
- dnf: Only read repositories and variables from the sandbox tree
- qemu: Configure the network device explicitly on riscv64
- qemu: Enable SMBIOS and fw_cfg support on riscv64
- fedora: Add support for riscv64
- mkosi-tools: Install qemu and edk2 for riscv64 on Fedora
- Support building the default image for riscv64 on Fedora
behrmann
reviewed
Sep 8, 2026
keszybz
approved these changes
Sep 8, 2026
keszybz
left a comment
Member
There was a problem hiding this comment.
Looks all reasonable. Some of the choices could be bikeshedded, but I think it makes sense to trust the folks actually working on this.
|
|
||
| url = f"baseurl={join_mirror(mirror, f'repos-dist/{tag}/latest')}" | ||
| yield RpmRepository( | ||
| "fedora", f"{url}/$basearch", (), gpgcheck=False, repo_gpgcheck=False, priority=99 |
Member
There was a problem hiding this comment.
Please make this follow the same structure as the two four below.
Member
|
Please rebase. |
xjamesmorris
force-pushed
the
fedora-44-riscv64-vm
branch
from
September 8, 2026 15:23
e7e0528 to
0808f37
Compare
Contributor
Author
|
Rebased on main; added riscv64 as a column to the mirror table; reformatted the RpmRepository call to match the others (both squashed into the fedora commit). |
The riscv64 virt machine does not instantiate network devices from the -nic shorthand: qemu-system-riscv64: warning: requested NIC (anonymous, model virtio-net-pci) was not created (not supported by this machine?) Configure the network backend and the device explicitly on riscv64 so that virtual machines get a network interface.
The riscv64 virt machine has a fw_cfg device and exposes SMBIOS tables, which edk2's RiscVVirtQemu firmware publishes to the operating system, so credentials and the extra kernel command line can be passed the same way as on arm64 when booting via UEFI. Verified with Fedora 44 riscv64 by passing credentials via both SMBIOS type 11 and fw_cfg and extending the kernel command line via SMBIOS type 11.
riscv64 is not a primary Fedora architecture yet. Its packages are built by the Fedora RISC-V SIG on its own Koji instance and are not published to the Fedora mirror network, so the metalink based repositories mkosi configures by default cannot be used: Failed to download metadata (metalink: "https://mirrors.fedoraproject.org/metalink?repo=fedora-44&arch=riscv64") for repository "fedora" Use the repositories from the fedora-repos package shipped by Fedora RISC-V instead when building for riscv64. As these packages are not signed, add a gpgcheck field to RpmRepository so that signature verification can be disabled for individual repositories instead of having to disable it globally with RepositoryKeyCheck=no, which also affects the tools tree. Log a warning when building for riscv64 to make this visible. Snapshot= is not supported as the RISC-V Koji instance does not provide composes.
Install qemu-system-riscv-core and edk2-riscv64 in Fedora tools trees so that riscv64 images can be booted via UEFI with mkosi vm.
Fedora does not ship a signed shim for riscv64, so only install the shim package on x86-64 and arm64 and boot systemd-boot directly on riscv64. Fedora's riscv64 kernel is an EFI zboot image which qemu cannot boot directly via -kernel, which is how directory images are booted, so build a disk image on riscv64 and boot it via UEFI instead. Finally, riscv64 virtual machines are emulated on other architectures, which is slow enough for the root device to not show up within Fedora's default 45s device timeout, so give the virtual machine a few cores and bump systemd's default timeouts via the kernel command line.
xjamesmorris
added a commit
to xjamesmorris/particleos
that referenced
this pull request
Sep 9, 2026
Fedora's RISC-V repositories currently target Fedora 44 rather than rawhide, so select that release for riscv64 builds and extend timeouts for emulated guests. Fedora's RISC-V EDK2 firmware does not expose QEMU's TPM through ACPI or initialize measured-boot PCRs. Attach the TPM through the device tree and disable expected-PCR signing while retaining TPM-backed root and swap encryption. Require the current systemd/mkosi#4450 head, which provides Fedora riscv64 repository, firmware, and VM support. AI assistance: GitHub Copilot was used to develop and validate this change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.