Oberon 系统移植 RISC-V 复活
推荐指数 39.0 NO. 016 · 2026.08.10
发布2026/08/09Score79Comments16
为什么值得看
将 Niklaus Wirth 设计的经典 Oberon 操作系统从专用 RISC-5 指令集移植到标准 RISC-V (RV32),保留原始内存映射使核心模块无需修改。对研究极简操作系统设计和编译器后端的人是一份活教材。
编辑判断
Wirth 的 Oberon 系统是现代极简 OS 设计的源头之一,但原版绑死在自研 RISC-5 上,硬件几乎绝迹,导致这代系统沦为文献考古。这次移植的关键是换用了 ETH 的 OP2 编译器并自研 RISC-V 后端,而非简单重写,保留了完整的工具链自举能力。
对于做嵌入式 OS 或想理解「为什么现代操作系统如此复杂」的工程师,这是比 MINIX 更干净的参考实现。尤其值得对比 seL4 的微内核路径:Oberon 用单体内核做到了 10 万行以内的全系统代码,包括编译器和 GUI。如果你在做 RISC-V 生态的裸机运行时或教学用途,这个 VM 的裁剪程度比 QEMU 更适合快速迭代。
社区反馈
正面 15 条评论
核心争论:经典极简系统移植到现代硬件的价值与可行性路径
> The whole system runs on a low-cost development board (Xilinx Spartan-3 by Digilent, with 1 MB of static RAM) If somebody wants their FPGA work to be available, they better choose MiSTer FPGA from the beginning. Costlier, but way more likely to be found around.
The availability of the board to run Wirt's system was an issue pretty soon. There were even people who offered their own boards to fill the gap (e.g. https://web.archive.org/web/20160831063355/http://oberonstat...). My system version instead runs on RISC-V, so no
> they better choose MiSTer FPGA from the beginning. Well, the MiSTer project was yet 4 years from being launched back in 2013 when the RISC-5 was implemented in FPGA, so I hope you'd excuse Wirth from not choosing it.