A toy RISC-V kernel built with Zig for OS exploration (WIP).
- Zig 97.5%
- Linker Script 1.6%
- Assembly 0.9%
| assets | ||
| bootloader | ||
| docs | ||
| os | ||
| .gitattributes | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| mise.toml | ||
| Onlyfile | ||
| README.md | ||
🌱 KrcyOS
A toy RISC-V kernel built with Zig for OS exploration.
The main repository is on kercycode.
Read only mirror exists on github.
Motivation
Just for fun.
Prerequisites
- Zig (pinned to
0.16.0) - QEMU (>=11.0.0, if you don't have a real board)
- Only (task runner if you like)
Skill issue? Click here.
Getting Started
Clone
git clone https://code.kercy666.com/Kercy/krcyos.git
# if you prefer github:
# git clone https://github.com/KercyDing/krcyos.git
cd krcyos
# ...
Run
Note that it is supervisor-test.
zig build run
# or:
# only qemu r
Build for real board:
zig build run -Dboard=real_board
# or:
# only real r
Press
Ctrl+A+Xto exit qemu.
More
For user-test:
zig build run -Dmode=user
# or:
# only qemu r user
Run unit tests:
zig build test
# or:
# only test
Why not C/Rust?
No reason. Zig worth.