gevico/machina
在 GitHub 查看project: broaden OS compatibility — Linux distros, FreeBSD, and RTOS targets
Open
#43 建立於 2026年4月10日
documentationenhancementhelp wanted
倉庫指標
- Star
- (31 star)
- PR 合併指標
- (PR 指標待抓取)
描述
Background
Machina can currently boot rCore (ch1–ch8) on the riscv64-ref machine. The recently added -bios builtin mode removes the firmware dependency and should make it easier to boot upstream kernels directly. However, no systematic effort has been made to verify compatibility with mainstream operating systems.
Goal
Establish a compatibility matrix and fix the gaps needed to boot a representative set of OS targets.
Target Matrix
| OS | Image | Boot mode | Status |
|---|---|---|---|
Linux (buildroot qemu_riscv64_virt_defconfig) |
buildroot 6.12.x Image + rootfs.cpio |
-bios builtin (default RustSBI) |
passing (linux-smoke-tests CI, PR #149) |
Linux (virtio root) |
upstream vmlinux |
-bios builtin |
untested |
Linux (ext4 SD card) |
upstream vmlinux |
-bios none (RustSBI) |
untested |
OpenRuyi (riscv64) |
OpenRuyi Image + rootfs |
-bios builtin |
untested (planned, see linux-smoke-tests for the CI scaffold) |
openEuler riscv64 |
openEuler RISC-V qcow2 disk image |
-bios builtin |
untested |
EulixOS riscv64 |
EulixOS Image + rootfs (openEuler-based, ISCAS) |
-bios builtin |
untested |
Debian riscv64 |
Debian riscv64 disk image |
-bios builtin |
untested |
Ubuntu riscv64 |
Ubuntu riscv64 preinstalled image |
-bios builtin |
untested |
Fedora riscv64 |
Fedora riscv64 disk image |
-bios builtin |
untested |
openSUSE riscv64 |
openSUSE Tumbleweed/Leap riscv64 image |
-bios builtin |
untested |
Alpine riscv64 |
Alpine riscv64 rootfs / disk image |
-bios builtin |
untested |
Arch riscv64 |
Arch Linux RISC-V disk image | -bios builtin |
untested |
Kylin riscv64 |
Ubuntu Kylin riscv64 image |
-bios builtin |
untested |
deepin riscv64 |
deepin riscv64 image |
-bios builtin |
untested |
UOS riscv64 |
UnionTech OS riscv64 image |
-bios builtin |
untested |
Anolis riscv64 |
Anolis OS riscv64 image |
-bios builtin |
untested |
OpenWrt riscv64 |
OpenWrt ext4 sdcard image |
-bios builtin |
untested |
OpenHarmony riscv64 |
kernel_liteos image, then standard system |
-bios builtin |
untested |
BlueOS riscv64 |
blueos.elf (Rust kernel, virt-riscv64) |
-bios builtin |
untested |
ArceOS riscv64 |
arceos.elf (modular Rust OS framework) |
-bios builtin |
untested |
StarryOS riscv64 |
starry.elf (Linux-compatible macrokernel on ArceOS) |
-bios builtin |
untested |
FreeBSD riscv64 |
release image | -bios none |
untested |
RT-Thread riscv64 |
rtthread.elf |
-bios builtin |
untested |
| Zephyr RTOS | zephyr.elf |
-bios builtin |
untested |
| seL4 | sel4test |
-bios builtin |
untested |
| rCore tutorial ch1–ch8 | in-tree | -bios none |
passing |
Known Gaps to Investigate
- VirtIO block: currently only
rawfile backend; distro images often useext4with journaling — verify no block-layer issues - PLIC / interrupt routing: upstream Linux uses a different PLIC context layout than rCore; confirm multi-context correctness
- FDT completeness: upstream kernels are stricter about required DT nodes (
/cpus/cpu/mmu-type,#interrupt-cells, etc.) - Timer accuracy: wall-clock mtime drift under heavy JIT load may cause watchdog timeouts in production kernels
- SBI HSM extension (
EID 0x48534D): required by SMP Linux; currently unimplemented inSbiBackend
Work Breakdown
- Boot upstream Linux
vmlinux(NOMMU or with Sv39) with-bios builtin; document required kernel config — covered by buildroot row above (PR #149) - Boot OpenRuyi
riscv64image end-to-end (extend the linux-smoke-tests workflow with a second matrix row) - Boot openEuler
riscv64qcow2disk image end-to-end (mature distro port; exercises ext4, SMP, PLIC multi-context) - Boot EulixOS
riscv64— openEuler-based RISC-V distro from ISCAS — with-bios builtin
International distributions:
- Boot Debian
riscv64— rock-solid general-purpose distro known for free software and stability; the base many other distros build on - Boot Ubuntu
riscv64— one of the most popular desktop distros, Debian-based, beginner-friendly with a mature ecosystem - Boot Fedora
riscv64— cutting-edge distro sponsored by Red Hat, the proving ground for technology later landing in RHEL - Boot openSUSE
riscv64— long-established German distro with rolling (Tumbleweed) and stable (Leap) releases and the powerful YaST tool - Boot Alpine
riscv64— ultra-lightweight distro built for containers and security, ubiquitous in Docker images - Boot Arch
riscv64— rolling-release distro for advanced users, known for simplicity, customizability, and its Wiki
Domestic distributions:
- Boot Kylin
riscv64— Ubuntu Kylin, a desktop system from the MIIT–Ubuntu collaboration with strong Chinese-language support - Boot deepin
riscv64— developed by Wuhan Deepin Technology, known for its polished desktop environment and local application ecosystem - Boot UOS
riscv64— UnionTech OS, a commercial distro built on deepin technology and a mainstay of domestic-substitution efforts - Boot Anolis
riscv64— OpenAnolis, led by Alibaba and others for cloud/server scenarios, one of the CentOS replacements after EOL
Other targets:
- Boot OpenWrt
riscv64sdcard image end-to-end - Boot OpenHarmony
riscv64(LiteOS-M kernel first, then the standard system) with-bios builtin - Boot BlueOS
riscv64Rust kernel on thevirt-riscv64profile with-bios builtin - Boot ArceOS
riscv64— component-based modular Rust OS framework from the rCore community — with-bios builtin - Boot StarryOS
riscv64— Linux-syscall-compatible macrokernel built on ArceOS — with-bios builtin - Boot FreeBSD
riscv64release image - Boot RT-Thread
riscv64kernel with-bios builtin - Boot Zephyr
hello_worldsample with-bios builtin - Add SBI HSM extension stub to unblock SMP boot
- Extend FDT generator to include nodes required by upstream kernels
- Add a CI job that fetches a known-good kernel image and checks for a clean
poweroffexit code — buildroot-drivenlinux-smoke-testsworkflow added by PR #149
References
-bios builtinimplementation: PR #40- Linux smoke CI (buildroot): PR #149
hw/riscv/src/sbi.rs— current SBI backend (Extensions missing: HSM, PMU, NACL)- Linux
arch/riscv/— upstream kernel boot requirements - RISC-V SBI spec v2.0 — HSM chapter
- RTT
libcpu/risc-v— RISC-V port boot requirements - OpenRuyi project: https://gitee.com/openruyi (
riscv64target reference) - openEuler RISC-V: https://www.openeuler.org/en/ (
riscv64QEMU images) - EulixOS: https://eulixos.com/ (openEuler-based RISC-V distro, ISCAS)
- Debian RISC-V: https://wiki.debian.org/RISC-V
- Ubuntu RISC-V: https://ubuntu.com/download/risc-v
- Fedora RISC-V: https://fedoraproject.org/wiki/Architectures/RISC-V
- openSUSE RISC-V: https://en.opensuse.org/openSUSE:RISC-V
- Alpine RISC-V: https://alpinelinux.org/ (
riscv64port) - Arch Linux RISC-V: https://archriscv.felixc.at/
- Ubuntu Kylin: https://www.ubuntukylin.com/
- deepin: https://www.deepin.org/
- UOS / UnionTech: https://www.uniontech.com/
- Anolis OS: https://openanolis.cn/
- OpenWrt RISC-V: https://openwrt.org/ (
riscv64target, sifive_u / StarFive) - OpenHarmony: https://gitee.com/openharmony (
device_qemu,kernel_liteos_mRISC-V port) - BlueOS kernel: https://github.com/vivoblueos/kernel (Rust kernel,
virt-riscv64) - ArceOS: https://github.com/arceos-org/arceos (modular Rust OS framework,
riscv64) - StarryOS: https://github.com/oscomp/starry-next (Linux-compatible macrokernel on ArceOS)