Skip to content

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-elf target
  • QEMU with qemu-system-riscv64
  • a shell capable of running the project commands
  • Node and npm for this Starlight site

From the repository root:

Terminal window
cargo build --release
cargo run --release

The 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.

From tutorial/:

Terminal window
npm install
npm run dev
npm run build

The 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.