Chapter 13 of 16 · Deutschnullos.de

Toolchain

What NULLos is built with today – until it builds itself.

What you need

WhatWhat forVersion¹
Apple clang (Xcode / Command Line Tools)Build the tools for the Mac (make host), the compiler cc and the libc, GNU make21.0.0, make 3.81
llvm (Homebrew)clang for the kernel (ELF) and bootloader (PE/UEFI)23.1.4
lldld.lld (kernel, programs for NULLos), lld-link (bootloader)23.1.4
qemuRun NULLos; brings the UEFI firmware along (edk2/OVMF, edk2-x86_64-code.fd)11.1.2
coreutilstimeout for the boot test make check9.12
Rosetta 2Run cc's x86_64 test programs on the ARM Mac–
bash 5 (Homebrew)Cross-check for the shell tests (without it: stored results)5.3.20
python3Abgleich (status of all tools), checksum in the boot test3.15.2
mtoolsFAT32 for the download images and the disk boot test (mformat, mcopy) – until fs takes over4.0.49
xorrisothe live ISO1.5.8
nasmis in the install list, not used anywhere yet3.02

¹ As installed on Max's Mac (macOS 27.0.1, Apple Silicon), checked with brew info and --version on 28.10.2026. Other versions probably work too – only these are tested.

Fresh Mac – from zero to prompt

xcode-select --install                 # Apple clang, make, git
softwareupdate --install-rosetta       # for the cc tests
# install Homebrew from brew.sh, then:
brew install llvm lld qemu nasm mtools xorriso coreutils bash
git clone … nullos && cd nullos         # the repo is still private
make nullos-tools && make run

The paths are at the top of the Makefile (LLVM, LLD, QEMU, OVMF) and can be overridden, e.g. make run LLVM=/pfad/zu/llvm/bin, if Homebrew lives somewhere else.

All make targets

TargetWhat
make nullos-toolstools against the NULLos libc, end up in /bin
make osbootloader + kernel + init.img, boot partition in the build folder
make runbuild + start in QEMU (window + serial console in the terminal)
make checkboot without a window, type commands, check the answers
make hostall tools for the Mac
make testall tool tests
make cleandelete the build folder
make -C cc …test stage2 stage3 tools as-cmp kernel test-arm64 stage3-arm64 test-qemu-arm64 test-qemu-riscv64 fuzz test-clang check clean
make -C libc …tools test-tools, with TARGET=nullos for NULLos

Later: only our own tools

Our own compiler cc has a built-in assembler and ELF linker and already builds all of NULLos by itself – kernel, libc, 280 tools (make -C cc kernel). It even runs on NULLos and compiles itself there. Only archives (.a) are still written by llvm-ar. Our own mk already understands the Makefile (mk -n host = make -n host). Goal: NULLos builds itself on NULLos. coming soon