This repository will demonstrate how to set up a basic portable 64-bit kernel in C using Limine.
It is recommended to cross reference the contents of this repository with the Limine Bare Bones OSDev wiki page.
It is recommended to build this project using a standard Linux distro, using a Clang/LLVM toolchain capable of cross compilation (the default unless KCC
and/or KLD
are explicitly set).
The KARCH
make variable determines the target architecture to build the kernel and image for. The all
target (the default one) builds the kernel for the given architecture, and a bootable .iso
image containing it. The all-hdd
target builds a flat hard disk/USB image instead.
For example, to build for aarch64
run:
make KARCH=aarch64
The image can then be tested with the one of the run
or run-hdd
targets.
make KARCH=aarch64 run