Tackling RISC-V as a beginner at osdev
Posted: Thu Jul 03, 2025 7:28 am
Hello and thank you in advance to anyone reading my post 
To preface, I am an employed junior programmer, not a complete beginner.
I've read through the code of xv6-riscv and I've been wondering how I could approach making a basic OS for RISC-V that would run on qemu's "virt" machine.
My goals are to implement a simple OS with drivers for PS/2 keyboards and mice, video output (not just serial console) and disk storage. My timeframe is about 13 months to do this.
I've investigated the boot process and it seems pretty straightforward, but there aren't any "wiki-like" examples and sources that I could find in regards to OSDev.
My questions are as follows:
Should I do without U-Boot? Loading my kernel using `-kernel mykernel.elf` is very straightforward and I am sure I have access to all OpenSBI BIOS-like functions.
On the contrary, should I use the U-Boot SPL -> OpenSBI -> U-Boot sequence? As I understand, it implements a subset of UEFI. Is this a big advantage?
I greatly appreciate all advice.

To preface, I am an employed junior programmer, not a complete beginner.
I've read through the code of xv6-riscv and I've been wondering how I could approach making a basic OS for RISC-V that would run on qemu's "virt" machine.
My goals are to implement a simple OS with drivers for PS/2 keyboards and mice, video output (not just serial console) and disk storage. My timeframe is about 13 months to do this.
I've investigated the boot process and it seems pretty straightforward, but there aren't any "wiki-like" examples and sources that I could find in regards to OSDev.
My questions are as follows:
Should I do without U-Boot? Loading my kernel using `-kernel mykernel.elf` is very straightforward and I am sure I have access to all OpenSBI BIOS-like functions.
On the contrary, should I use the U-Boot SPL -> OpenSBI -> U-Boot sequence? As I understand, it implements a subset of UEFI. Is this a big advantage?
I greatly appreciate all advice.