wm: doc

ref: b4bebeaccd1ac571f2070671db4f7fec28e34df3
dir: /rpi-p9.ms/

View raw version
Plan 9 Installation for Raspberry Pi Zero WH

First, download Richard Miller's Plan 9 image:

https://9p.io/sources/contrib/miller/9pi.img.gz

gunzip the file to get 9pi.img, then use dd to copy this image onto a microSD card.

Next, we need to configure config.txt and cmdline.txt to specify the proper boot
settings. For reference, see
https://www.raspberrypi.com/documentation/computers/config_txt.html.

Mount the microSD card and make a few edits.

In cmdline.txt, add the definition console='0 b115200' to the end of the line.
NOTE: everything must be on a single command line. Multiple lines will not be parsed
correctly in cmdline.txt.

If you do not have a display, you may want to remove the default boot user of glenda
so you get a normal rc prompt. To do so, remove user=glenda from cmdline.txt.

In config.txt, the block for the pi zero (or the [all] block) should include the lines:

enable_uart=1
core_freq=250

You will need a USB to TTL serial cable (see https://www.adafruit.com/product/954).
It must be attached to the correct pins (see https://learn.adafruit.com/raspberry-pi-zero-creation/give-it-life)

Afterwards, if the machine to which the USB cable is connected is running Linux,
you might run a command such as:

$ sudo screen /dev/ttyUSB0 115200

Afterwards, you should see output like the following:

Plan 9 from Bell Labs
board rev: 0x9000c1 firmware rev: 1648128071
vcore reports memory = 0x1f000000
cpu0: 1000MHz ARM 1176JZF-S
clocks: CPU 1000000000 core 250000000 UART 48000000 EMMC 200000000
fp: 16 registers,  simd
fp: arm arch VFPv2; rev 5
#l0: usb: 100Mbps port 0x0 irq -1: 000000000000
#u/usb/ep1.0: dwcotg: port 0X0 irq 9
496M memory: 52M kernel data, 444M user, 1926M swap
user[none]: bootes
time...
fossil(#S/sdM0/fossil)...version...
init: starting /bin/rc
Can't cd /usr/bootes: '/usr/bootes' does not exist
lib/profile: rc: .: can't open: '/bin/lib' file does not exist
init: rc exit status: rc 31: error

init: starting /bin/rc
%