Chapter 4 of 16 · Deutschnullos.de

Try it in QEMU

On the Mac, at your own prompt in two minutes – no USB stick needed.

1. Get the tools

brew install llvm lld qemu nasm mtools xorriso coreutils

What all of that is and what it's for: Toolchain.

2. Start

make nullos-tools   # once: build the tools for NULLos
make run

Builds bootloader and kernel and starts NULLos in QEMU. A window opens, and the serial console shows up right in the terminal. Type h for help.

CommandWhat happens
make nullos-toolsbuild all tools for NULLos (they end up in /bin)
make osjust build (boot partition in the build folder)
make runbuild + start in QEMU
make checkboot without a window, check the prompt automatically
make hostbuild all tools for the Mac
make testrun all tool tests
make -C ccbuild our own C compiler

3. What you'll see

The kernel reports in with version, timer, free memory and disk – and starts the shell s right away. Give it a try:

l /bin                      what's all there
pr hallo | tr a-z A-Z       pipes work
ca 2^100                    math with long numbers
e notiz.txt                 the editor
sys                         who am I, what have I got
h cp                        help – old names work too
py -c 'print(6*7)'          Python

The keyboard has a German layout with umlauts; kb load us switches to US, kb load de-mac to a Mac keyboard (Option key like AltGr).

exit takes you to the small built-in kernel shell (prompt >) with h, ls, cat, ps, up, mem, rb (reboot), off (power off) and a few more.

To get the tools included, run make nullos-tools once beforehand (builds them against the NULLos libc, takes a few minutes). Without it, NULLos boots straight into the kernel shell. After make clean the folder build is missing, and make nullos-tools then builds nothing – run mkdir -p build first.

Connect over SSH

Start NULLos without a window and get in from the Mac with ssh, step by step and checked in QEMU: Try NULLos in QEMU and connect over SSH (user docs).

On real hardware

USB stick, hard disk, Raspberry Pi, ESP32: see Installing. coming soon