tinyboot is a kexec-based bootloader
Make a directory (e.g. /tmp/tboot
) and fill it with Boot Loader Spec compatible files.
nix develop
zig build run -- -drive if=virtio,format=raw,file=fat:rw:/tmp/tboot
The Linux kernel used by tinyboot can be as big or as small as you like, though in many environments (e.g. firmware on SPI flash) the amount of space is quite small, so it is often in your best interest to minimize the size of the kernel. A good starting place, if you are starting from scratch, is the tinyconfig
kernel defconfig.
After that, there are a set of kernel options required by tinyboot, listed here. For more information, see the documentation.