rust riscv xv6 implementation
- Use rustup to install the target
riscv64imac-unknown-none-elf
rustup target install riscv64imac-unknown-none-elf
- Install the riscv64 gcc:
riscv64-unknown-elf-gcc
using your linux package manager - cargo build
- Install qemu-system-riscv.
- Execute:
qemu-system-riscv64 -machine virt -bios none -m 128M -smp 1 -nographic -s -kernel target/riscv64imac-unknown-none-elf/debug/rrxv6
You should see output Hello World
- Install
riscv64-elf-gdb
- Execute:
qemu-system-riscv64 -machine virt -bios none -m 128M -smp 1 -nographic -S -s -kernel target/riscv64imac-unknown-none-elf/debug/rrxv6
- In another terminal, execute:
riscv64-elf-gdb -q target/riscv64imac-unknown-none-elf/debug/rrxv6