Hasty Briefsbeta

Bilingual

R9: Plan 9 in Rust

a year ago
  • #Plan9
  • #Rust
  • #Kernel
  • R9 is a reimplementation of the Plan 9 kernel in Rust, derived from the original Plan 9 source code.
  • The kernel is built using Cargo and the xtask pattern.
  • To build for x86_64: `cargo xtask build --arch x86-64`.
  • To build for aarch64 (Raspberry Pi 3 supported): `cargo xtask build --arch aarch64`.
  • Use `cargo xtask help` to see available subcommands.
  • R9 is not yet self-hosting.
  • `cargo xtask dist` requires `llvm-objcopy`, installable via `rustup component add llvm-tools`.
  • If `llvm-objcopy` issues persist, install LLVM separately and set `OBJCOPY`.
  • Ensure `qemu` or `qemu-kvm` is installed for running R9 in QEMU.
  • Supported QEMU architectures include aarch64 (raspi3b/4b), x86-64 (q35), and riscv64 (virt).
  • R9 has been tested on Raspberry Pi 4 (prints 'r9' via miniuart).
  • For netboot, use `cargo xtask dist --arch aarch64 --verbose` and copy the binary to a TFTP server.
  • Raspberry Pi firmware uses `config.txt` to configure UART (e.g., `enable_uart=1`).