Zesty means we embrace new technology!
Zesty begins with ‘Z’, which implies we are using Zig
Zesty-Core is a RISC-V kernel written in Zig, aiming to be compatible with POSIX (may not be accomplished).
Currently can only run on QEMU with -machine virt
It currently only have kernel, and only print out some naive strings every second.
It currently don’t have any syscall support, and also no userspace development support.
It just don’t have userspace!
Hopefully by the time some of the system call is implemented, userspace development can simply use any libc implemention.
Require Zig 0.9.0 Exactly!
Since Zig is still under development, the API of std library is not stablized, so the exact same version of Zig is required.
Since 2021-12-21, Zesty-Core
had migrated to Zig 0.9.0.
Some SBI feature used in the kernel is in SBI v0.3, So OpenSBI v0.9 and above is required.
If you have installed QEMU 6.0.0+, OpenSBI v0.3 is already included.
Currently, this project is tested against:
zig build // Will build the project into build/
zig build run // Will run the kernel with qemu, must have qemu-system-riscv64 installed
Tools required:
Clone
$ git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
Install
$ cd riscv-gnu-toolchain
$ sudo ./configure --prefix=/usr/local
$ sudo make
notice: this will install the toolchain into /usr/local, you can change to install location as you wish, but you will need to add it to you $PATH
mannually.
Download, at least QEMU 6.0.0 is required
$ wget https://download.qemu.org/qemu-6.2.0.tar.xz
$ tar xf qemu-6.2.0.tar.xz
Install
$ cd qemu-6.2.0
$ sudo ./configure --disable-kvm --disable-werror --prefix=/usr/local --target-list="riscv64-softmmu"
$ sudo make
$ sudo make install
$ riscv64-unknown-elf-gcc --version
riscv64-unknown-elf-gcc (GCC) 10.2.0
...
$ qemu-system-riscv64 --version
QEMU emulator version 6.2.0
Ctrl+A and then x, this will terminate QEMU.
Pretty much anything else related to system.
src/dtb
is a project from @kivikakk, by the time the code was copied in, the project is licensed under MIT license. All right reserved for @kivikakk.
All other files in this project are licensed under the AGPL-3.0 license.