Skip to content
Projekte

popovicu/zig-time-sharing-kernel

Auf GitHub ansehen

Über uns

Minimale Implementierung eines Time-Sharing-Kernels für RISC-V, in Zig auf Basis von OpenSBI

Systeme und Infrastruktur

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
0
in 7 days
+1
in 15 days
+3
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

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

Ähnliche Projekte entdecken

Wird geladen…