This repository will demonstrate how to set up a basic kernel in Rust using Limine.
Any make
command depends on GNU make (gmake
) and is expected to be run using it. This usually means using make
on most GNU/Linux distros, or gmake
on other non-GNU systems.
Additionally, building a HDD/USB image with make all-hdd
requires sgdisk
(usually from gdisk
or gptfdisk
packages) and mtools
.
The KARCH
make variable determines the target architecture to build the kernel and image for.
The default KARCH
is x86_64
. Other options include: aarch64
, riscv64
, and loongarch64
.
Other architectures will need to be enabled in kernel/rust-toolchain.toml
Running make all
will compile the kernel and then generate a raw image suitable to be flashed onto a USB stick or hard drive/SSD.
Running make run
will build the kernel and a raw HDD image (equivalent to make all-hdd) and then run it using qemu
(if installed).