journal 2026-05-05

BusyBox initramfs start

After P79 proved host input into Linux, the next layer is BusyBox. The first useful correction was architectural: do not run BusyBox on the older P66-derived core just because P79 used it for the transport proof. P80 uses the P78 core so the RV32C and F/D work comes along.

The obvious cached BusyBox was not suitable:

So the project is set up around a static musl BusyBox build for rv32ima/ilp32, generated by Nix, with a tiny /init script that execs console_sh.

One small but important packaging miss: BusyBox had ls and touch compiled in, but the initramfs only carried a few manual symlinks. /init now runs busybox --install -s /bin, and the smoke tests use bare applet names so that mistake is covered.

console_sh exists because hvc input was not enough for live interaction. Prequeued input could reach BusyBox, but a real screen /tmp/p80-busybox 115200 attach sent bytes into the PTY bridge while Linux stayed asleep. The helper keeps output on hvc0, polls the chip host-input MMIO FIFO for input, and yields between empty polls so the child shell still runs.

The FIFO smoke is a real shell session:

echo P80-BUSYBOX-SMOKE
uname -a
ls /bin
touch /tmp/p80-smoke-file
cat /tmp/p80-smoke-file

There is also a screen-smoke target now. It starts the PTY bridge, attaches a detached screen session, sends commands with screen -X stuff, and verifies BusyBox output including P80-SCREEN-FILE-OK.

Passing runs:

The line from here is straightforward: more applets, then a less toy init script, then eventually a block-backed rootfs.