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:
/initusedmkdirbefore BusyBox applet symlinks existed. It now calls/bin/busybox mkdirand/bin/busybox mountuntilbusybox --install -s /binhas run.- The Verilator UART path escaped ANSI bytes for readable logs. That
was wrong for a live terminal;
tty-screenandscreen-smokenow run the harness with+uart_raw. - The host-input handshake popped bytes based on
host_input_readyafter the clock edge. When the chip FIFO was full and the guest read one byte, that post-edge value could make the host discard a byte the chip never accepted. The harness now samples the handshake before the edge.
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:
make tty-smoke ...: PASS, stopped afterP81-FILE-OKat 179,472,594 post-load cycles with 268 input bytes read and delivered.make screen-smoke ...: PASS, provedP81-SCREEN-INPUT-OK,P81-SCREEN-UNAME-OK,P81-SCREEN-BACKSPACE-OK,P81-SCREEN-TOUCH-OK,screen-file-ok, andP81-SCREEN-FILE-OK.
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.