Project

9front

experimental

Personal Plan 9/9front ports to oddball ARM SBCs

Overview

A port of 9front — the community fork of Plan 9 from Bell Labs — to the Orange Pi 4 Pro (Allwinner A733, 8-core ARM64). Provides a QEMU-based development workflow and SD card image builder for bringing up 9front on new hardware.

Motivation

I needed a refresher on uboot as a stepping stone to get Haiku running that board, and Plan9/9front is a kernel simple enough to wrap my head around while doing hardware bringup. And being who I am, I decided to be systematic about it.

How it works

I've set things up so that a cross-compilation harness builds the kernel inside a running 9front QEMU instance (which also acts as a control to trace the vanilla ARM kernel, even though I am still very much stuck on uboot).

The harness talks to it via automated expect scripts so that port files in port/a733/ are packed into a FAT image, mounted inside the VM, compiled against the 9front kernel tree, and the resulting kernel is then extracted and placed into a bootable SD card image into which I've (also mostly automatically) packed the Allwinner SPL and uboot.

It's hard going since a) there is a lot of SD card swapping involved and b) most of the process is setting markers to get some sort of progress out of the board via a serial console, and there isn't really a lot of documentation about how to do this kind of thing (or if there is, it is locked away in some obscure mailing list). And, as extra fun, the order in which things like the MMU and interrupts are set up is all over the place (possibly because of uboot Linux-centric assumptions).

Features
🔧
QEMU-first development

Port files are edited on the host and injected into a live 9front QEMU session via a FAT portdisk image. make kernel automates the full compile-extract cycle.

🗂️
Arm64 code reuse

Reuses the 9front sys/src/9/arm64/ shared kernel code — GICv3, ARM timer, MMU, trap, FPU — and adds only A733-specific drivers.

📟
UART driver

Custom uartaw.c — Allwinner UART (8250-compatible MMIO) at 0x02500000 for early console output.

📦
SD card image builder

Produces a 64 MB bootable image with Allwinner SPL at 8 KiB, U-Boot at 16.8 MiB, and a FAT32 partition containing the kernel and boot script.

🧩
Pinned bootstrap blobs

Board bootstrap binaries (SPL, U-Boot, DTB) are checked in under bootstrap/orangepi4pro/ so the build is fully reproducible without a BSP toolchain.

Architecture
Host make sdcard QEMU 9front → 9a733.u SD Card Image + boot.scr 4 Pro 9front kernel QEMU flash dd →
Posts