Why This Matters
A developer has published the full source for a from-scratch RISC-V (rv32ima) emulator capable of booting Linux, along with the kernel configs and a WebAssembly build path, paired with a companion blog post explaining the bring-up process. It's a practical, readable reference for how a CPU emulator and a minimal Linux system fit together, and a useful teaching artifact as RISC-V adoption grows.
Key Takeaways
- Complete rv32ima instruction set emulator plus minimal emulated devices live in /lib, with machine config in /main.
- WebAssembly bindings mean the emulated Linux system can be exposed to run in a browser context.
- Kernel build configs are included in /boot, making the Linux bring-up reproducible for learners.
RISC-V Emulator and Linux System from Scratch
This repo contains all the source code required to follow the blog post at https://werwolv.net/posts/linux_bringup/
Source Code
/lib contains the entire rv32ima instruction set emulator code as well as a minimal set of emulated devices
contains the entire rv32ima instruction set emulator code as well as a minimal set of emulated devices /main contains the configuration for our machine and functions exposed for WebAssembly use
Configuration
All the config files required to build Linux can be found in /boot . The main executable also expects all the built binaries to be in the boot folder.