// chapter 02a
build
makefile targets for building kernel, userspace, rootfs, and iso. all targets are .PHONY (always rebuild).
build pipeline (in order)
make kernel # build kernel/bzImage (reads kernel/config.fragment)
make userspace # build static busybox (userspace/busybox)
make rootfs # stage rootfs tree to build/rootfs/
make initramfs # pack build/rootfs → build/praxis-initramfs.cpio.gz
make iso # build build/praxis.iso (limine bootable)validation
make check # shell syntax + rootfs staging sanity
make check-owned # verify no host tools in default rootfs
make check-pax # validate PAX language specs
make v1-check # full release check (check-owned + sanity + smoke)cleanup
make clean # rm -rf build/build artifacts
| Makefile variable | Default path | Purpose |
|---|---|---|
BUILD_DIR | build/ | root build directory |
KERNEL_IMAGE | kernel/bzImage | compiled kernel |
BUSYBOX | userspace/busybox | static busybox binary |
ROOTFS_STAGE | build/rootfs | staged filesystem tree |
INITRAMFS | build/praxis-initramfs.cpio.gz | compressed cpio archive |
ISO_STAGE | build/iso | iso build staging |
ISO_FILE | build/praxis.iso | final iso image |
build control flags
PRAXIS_ALLOW_HOST_TOOLS=1 # vendor host tools into rootfs
PRAXIS_ALLOW_HOST_KERNEL=1 # use host kernel fallback
PRAXIS_SKIP_BOOTCTL=1 # skip bootctl installrootfs staging (build-rootfs.sh)
the most complex build step. it:
- creates complete directory tree from scratch
- copies rootfs skeleton
- installs static busybox and symlinks all applets
- copies 20+ installer tools from installer/
- copies all Documentation/ and pax/ docs
- copies kernel to /usr/share/praxis/vmlinuz
- installs limine uefi stub
- writes /etc/praxis/build-info with build metadata
- optionally vendors host tools and pacman (with PRAXIS_ALLOW_HOST_TOOLS=1)
initramfs packing (build-initramfs.sh)
# pack rootfs to newc cpio format, gzip -9 compression
cpio -H newc -R 0:0 -o < file-list | gzip -n -9 > praxis-initramfs.cpio.gziso construction (build-iso.sh)
builds iso stage with:
vmlinuz,initramfs.cpio.gz- limine bios/uefi stubs
limine.confin all 4 search paths- uses
xorriso -as mkisofswith limine bios-install
next: qemu - makefile targets for testing.