An operating system that targets RISC-V, specifically QEMU's virt
board.
-
Set up a GCC cross-compiler for RISC-V ELF/Newlib. See this for instructions.
-
Run
make
.
- GCC 11.1.0
- GNU Binutils 2.37
- GNU gdb 10.1
- GNU Make 4.2.1
- QEMU 4.2.1
See this for instructions on how to create a Debian disk image for RISC-V and run it on QEMU using OpenSBI and U-Boot.
The following were very useful resources and references:
Unofficial:
- OS Dev Wiki
- SOS: Targets ARMv7-A but was a useful reference when starting for basic organization and build processes.
- Stephen Marz's Blog: Lots of good explanations about RISC-V arch/asm, even though I'm not using Rust.
Official:
- Linux
- QEMU mirror
- RISC-V Specifications
- SiFive FU540-C000 Manual: QEMU's VIRTIO board emulates the same PLIC as the SiFive Freedom U540's. This was very helpful when implementing interrupt handlers.