gevico/machina

project: broaden OS compatibility — Linux distros, FreeBSD, and RTOS targets

Open

#43 ouverte le 10 avr. 2026

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Rust (24 forks)github user discovery
documentationenhancementhelp wanted

Métriques du dépôt

Stars
 (31 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

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 raw file backend; distro images often use ext4 with 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 in SbiBackend

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 riscv64 image end-to-end (extend the linux-smoke-tests workflow with a second matrix row)
  • Boot openEuler riscv64 qcow2 disk 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 riscv64 sdcard image end-to-end
  • Boot OpenHarmony riscv64 (LiteOS-M kernel first, then the standard system) with -bios builtin
  • Boot BlueOS riscv64 Rust kernel on the virt-riscv64 profile 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 riscv64 release image
  • Boot RT-Thread riscv64 kernel with -bios builtin
  • Boot Zephyr hello_world sample 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 poweroff exit code — buildroot-driven linux-smoke-tests workflow added by PR #149

References


Guide contributeur