Part XIV. The kernel
This part is for anyone who builds KDOS or rebuilds its kernel. It explains how the kernel is configured, compiled and put where a machine boots it.
The kernel phase, 60_kernel, builds the Linux kernel and its modules for the target root from KDOS’s own configuration. It installs two ports: dwarves, for the pahole tool that turns the kernel’s debug information into BTF (BPF Type Format, the kernel’s description of its own data types), and then linux itself. It is the last phase that builds ports; 70_image follows and packs the tree into the installation medium.
The kernel’s recipe has more to it than a package page can hold, so three chapters explain it before the package pages:
- Configuring the kernel covers
kdos.config, how the build resolves it and refuses a configuration that came out different, and the options the rest of KDOS needs. - Building the kernel covers the compile: the pinned build identity, the module-signing key, the panic-screen logo and what Rust and BTF need.
- Installing the kernel follows the port’s
postinstall.shfrom the module index to the ESP, the EFI system partition the machine boots from.
The package pages follow in chapters by shelf, in the shelves’ own order, and within a shelf in the order kpkgdepends builds them. Each port has a page or, when it has nothing unusual about it, a compact card.
See also
- Reading a package page: how the pages below are laid out
- The build system: phases and their package lists
- The kernel phase: the phase in the whole build, and how to change
kdos.config