journal 2026-05-05

BusyBox gets a real PTY

P80 could run BusyBox, but the shell was not really sitting on a tty. That showed up exactly where expected: no job control, awkward erase behavior, and live screen input that was too easy to confuse with the helper’s pipe-fed path.

P81 changes the shape. The initramfs now carries /dev/ptmx, mounts devpts, and runs console_sh. That helper opens a PTY master, makes the slave the controlling terminal for /bin/sh -i, then bridges the chip’s host-input MMIO FIFO into the PTY master. Output comes back from the PTY master to /dev/console/hvc0.

The bring-up found three useful bugs:

The passing tty-smoke waits for the prompt, then proves uname, applet symlinks, Backspace erase behavior, file creation, and file readback. The passing screen-smoke does the same through a detached screen session attached to /tmp/p81-busybox.

Passing runs:

The remaining terminal work is quality, not proof: better interactive latency, less noisy harness progress during live sessions, and a longer timeout or explicit “run forever” mode for manual shell sessions.