Because your $5 microcontroller needed to run UNIX
I recently discovered Fuzix while falling down a rabbit hole of reading about people’s hobby operating systems. Since I had some supported hardware (a Raspberry Pi Pico) laying around, I figured I’d try it out for myself.
Fuzix is a descendant of UZI (with some other forks merged in), which itself is effectively a port of UNIX to the Zilog Z80. I thought this was particularly interesting because I’ve long been on a quest to find a way to get an extremely stripped-down build of Linux (or perhaps a BSD) to run on one of my microcontrollers.
Compiling
I found that the most sensible OS to use as a host for compiling Fuzix is Debian Bookworm due to requirements on old-ish versions of various dependencies. Since I do not have any systems running Bookworm, I opted to throw together this little Dockerfile to set up my build environment:
FROM debian:bookworm
RUN apt-get update
RUN apt-get install -y \
git make cmake build-essential \
gcc-arm-none-eabi libnewlib-arm-none-eabi \
binutils-arm-none-eabi byacc python3
I then checked out Git tag v0.4, and patched out the “2048” game from the default applications directory, as this game cannot compile for the Pi Pico.
git clone https://github.com/EtchedPixels/FUZIX
git reset --hard tags/v0.4
git submodule update --init --recursive
echo "all::" > ./Applications/games/2048/Makefile.armm0
Finally, I compiled Fuzix with the following command:
make TARGET=rpipico SUBTARGET=pico diskimage
Installation
Compilation produces fuzix.uf2 and filesystem.uf2, the first of which being the Fuxiz kernel.
This file can be “flashed” onto a Pi Pico like any other uf2 file. For the uninitiated, this means holding the “BOOTSEL” button while plugging a Pi Pico into your computer, and copying the file onto the virtual storage device that appears in your file explorer.
Fuzix supports external flash for storage, but since I have none, I opted to flash the additional filesystem.uf2 file to my Pi, writing a familiar UNIX filesystem to a dedicated area in the Pi’s onboard flash.
Exploring the system
With these files written, the only remaining step is to connect to the Pi Pico over Serial.
FUZIX version 0.5
Copyright (c) 1988-2002 by H.F.Bower, D.Braun, S.Nitschke, H.Peraza
Copyright (c) 1997-2001 by Arcady Schekochikhin, Adriano C. R. da Cunha
Copyright (c) 2013-2015 Will Sowerbutts <[email protected]>
Copyright (c) 2014-2025 Alan Cox <[email protected]>
Devboot
264KiB total RAM, 160KiB available to processes (15 processes max)
Enabling interrupts ... ok.
NAND flash, 1952kB physical 1296kB logical at 0x13018000: hda:
SD drive 0: no card found
bootdev: █
The bootloader prompts for a boot drive. I enter hda here to select onboard flash.
Mounting root fs (root_dev=0, ro): OK
Starting /init
init version 0.9.1
Checking root file system.
login: root
Welcome to FUZIX
# █
And just like that, I’m dropped into a simple shell, with access to many common utilities.
# env
CTTY=/dev/tty1
HOME=/root
LOGNAME=root
PATH=/bin:/usr/bin
SHELL=/bin/sh
TERM=vt52
# ls /bin | wc -l
122
From my cursory exploration, the system seems to come pre-loaded with everything required to manipulate GPIO as well as write and run some simple scripts on-device.
My thoughts
I’m honestly quite impressed to see a UNIX descendant running on my little Pi Pico.
Of course, I can sense my Father preparing some kind of “back in my day” line to remind me that my Pi out-powers his first computer, but its still pretty impressive to actually play with this system after spending my day working with, uh, much more powerful hardware.