A riscv operating system written in rust.
- rust
- qemu, especially
qemu-system-riscv64
. - riscv-gnu-toolchain (optional but recommended).
After installing rust, you need to switch to nightly and install the riscv64gc-unknown-none-elf
target:
rustup override set nightly # switch to nightly in this directory
rustup target add riscv64gc-unknown-none-elf
cargo install cargo-binutils
For MacOS users, you can install qemu and riscv-gnu-toolchain with homebrew.
brew install qemu
brew tap riscv/riscv
brew install riscv-gnu-toolchain
make fs # build the filesystem image, only need to run once
make run
Debugging with gdb:
make debug
riscv64-unknown-elf-gdb # in another terminal
- process manage and context switch
- system call like xv6's
- simple crash-free filesystem like xv6's
- simple bootstrap compiler running inside the os(so we have everything in principle)
- simple GUI
- xv6 An awesome teaching os written in C.
- Writing an OS in Rust A great blog about writing os in rust.
- rCore A rust os project with Chinese documents.