Developer builds minimal RISC-V emulator in C++ to bootstrap Linux kernel
A developer documented the process of bringing up the Linux kernel on a new platform by writing a lightweight emulator for a RISC-V CPU rather than using real hardware. The emulator, built in roughly 2000 lines of C++ and implementing the RV32IMA instruction set, provides just enough hardware simulation—MMU support, RAM, an SBI interface, a system timer, and a WD8250-based UART—for Linux to boot. The full source is published on GitHub under WerWolv/riscv-emulator.
GoKawiil's interpretation of the reporting above, not reported fact.
This project strips Linux kernel bring-up down to its bare essentials, showing embedded developers exactly what hardware primitives are truly required before drivers and peripherals come into play. Emulating the platform instead of using physical silicon makes kernel porting work accessible, reproducible, and easier to debug for anyone designing custom hardware.
- Linux kernel bring-up only strictly requires an MMU-equipped CPU, sufficient RAM, and a periodic timer.
- The emulator implements the RV32IMA RISC-V instruction set plus SBI, RAM, and UART peripherals in about 2000 lines of C++.
- The full emulator code is open-sourced on GitHub as WerWolv/riscv-emulator for others to study or reuse.
Source: werwolv.net, 2026-09-03
Published there as: “How to bring up the Linux Kernel on a new platform”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.