Assembly is zombie, monokernel is shit.
A monokernel written in pure rv64gc assembly
Change to src/
and run make
. The kernel is compiled into an ELF file.
CROSS_PREFIX
: The prefix of ld and gccCC
: C compiler used to compile assembly code and handle C macrosLD
: The linkerBOARD
: The targeted RISC-V hardware, see Supported Boards
After building the kernel, run ./qemu-run.sh
. Make sure qemu-system-riscv64
is installed.
Debug infomation is attached to the ELF file by default. After a successful
build of the kernel, run ./qemu-debug.sh
to start debugging. You could
make gdb
attach to QEMU by using target remote localhost:1234
.
Note that gdb-multiarch instead of native gdb may be needed.
include/
: Headerssrc/
: Source of the kernelboards
: BSP
virt
: QEMU virtual machine
Authored by Ziyao and distributed under MIT License.