项目
在 GitHub 查看
popovicu/zig-time-sharing-kernel
关于
基于 OpenSBI、使用 Zig 实现的 RISC-V 最小化分时内核
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +3
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Zig time sharing OS kernel
This repo is meant to accompany the article at https://popovicu.com/posts/writing-an-operating-system-kernel-from-scratch/
Building
This should be as simple as:
zig build
To build the kernel in an extremely verbose mode, build like this:
zig build -Ddebug-logs=true
Run the kernel in RISC-V QEMU like this:
qemu-system-riscv64 -machine virt -nographic -bios /tmp/opensbi/build/platform/generic/firmware/fw_dynamic.bin -kernel zig-out/bin/kernel
The -bios path to OpenSBI should point where you built it on your machine. Building OpenSBI from source is highly encouraged. Please check the article for more pointers on building OpenSBI.
The output should be something like this:
Booting the kernel...
Printing from thread ID: 0
Printing from thread ID: 0
Printing from thread ID: 0
Printing from thread ID: 1
Printing from thread ID: 1
Printing from thread ID: 1
Printing from thread ID: 2
Printing from thread ID: 2
Printing from thread ID: 2
Printing from thread ID: 0
Printing from thread ID: 0
Printing from thread ID: 1
Printing from thread ID: 1
Printing from thread ID: 2
Printing from thread ID: 2
Printing from thread ID: 0
Printing from thread ID: 0
Printing from thread ID: 0
Printing from thread ID: 1
Printing from thread ID: 1
Printing from thread ID: 1
Printing from thread ID: 2
Printing from thread ID: 2
Printing from thread ID: 2
探索相关项目
加载中…