Toolchain
The tutorial targets QEMU’s RISC-V virt machine.
Chapter 1 runs with -bios none, so the kernel image is the first code QEMU enters. Chapter 2 moves the kernel under OpenSBI, and the rest of the tutorial stays in supervisor mode.
You need:
- Rust with the
riscv64gc-unknown-none-elftarget - QEMU with
qemu-system-riscv64 - a shell capable of running the project commands
- Node and npm for this Starlight site
Kernel Commands
Section titled “Kernel Commands”From the repository root:
cargo build --releasecargo run --releaseThe repository is a Cargo workspace. The root Cargo.lock pins the kernel dependencies, and .cargo/config.toml selects the RISC-V target, linker script, and QEMU runner.
Tutorial Site Commands
Section titled “Tutorial Site Commands”From tutorial/:
npm installnpm run devnpm run buildThe Starlight quick start uses npm create astro@latest -- --template starlight. This repository keeps the generated site in tutorial/ so the kernel and tutorial can evolve together.