Skip to content
Tech News
← Back to articles

RISC-V Emulator and Linux System from Scratch

read original more articles
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

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.