从零构建 RISC-V 模拟器并启动 Linux

RISC-V Emulator and Linux System from Scratch

这个开源项目展示了如何从零开始构建一个完整的 RISC-V rv32ima 指令集模拟器,并成功在其中引导 Linux 系统。代码库包含了模拟器核心、最小化设备模拟以及构建 Linux 所需的全套配置文件,包括 crosstool-ng 工具链、内核配置、设备树和 initramfs 生成脚本。通过这个项目,开发者可以深入理解从硬件抽象到操作系统启动的完整链路,体验亲手打造计算环境的乐趣。

这是一个能够引导 Linux 系统的 RISC-V rv32ima 模拟器。
  1. kvemkon

    对应博客文章的讨论:https://news.ycombinator.com/item?id=49553988

  2. Flex247A

    稍微跑题一下:我做过一个类似但更简单的项目,在自定义的 RISC-V 模拟器上运行 DOOM:https://github.com/lalitshankarch/rvcore

  3. westurner

    RISC-V 的软件模拟:

    container2wasm 有一个用于 RISC-V 的 TinyEmu。

    dearchap/tinyemu: https://github.com/dearchap/tinyemu

    Qemu 也支持 32 位和 64 位 RISC-V:"RISC-V System emulator — QEMU documentation" https://www.qemu.org/docs/master/system/target-riscv.html

    Emu86 用 Python 模拟 RISC-V,据我所知现在也支持 WASM:

    https://news.ycombinator.com/item?id=41899475 ..

    https://github.com/gcallah/Emu86/blob/master/assembler/virtu... :

    class RISCVMachine(VirtualMachine):

    还有:

    (Box96/Box64 在 ARM64 和 RISC-V 上模拟 x86;例如 Portal)

    来自

    https://news.ycombinator.com/item?id=44979868 :

    > openhwgroup 提供了从 2 级到 6 级的 RISC-V 内核的开源 Verilog 实现,这些内核可以启动 Linux:https://github.com/openhwgroup

同日更多故事

2026-09-11