ref: aaeb28aa8e5cf5a9fb58b4525d724ad4661f5abd
dir: /rpi-p9.ms/
Plan 9 Installation for Raspberry Pi Zero WH WARNING: Make sure to purchase a raspberry pi with GPIO headers pre-soldered. For the Pi Zero W, it is marked as the Pi Zero WH. If your board does not have headers, you will need to buy headers and solder them on, or else you will be unable to connect to the UART for serial debug console. 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' ether1=type=4330 to the end of the line. This will accomplish two things: first it will configure the serial console and it will also enable the wifi device in the kernel. 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, put these lines in the [all] block: 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]: pi At this point, it's recommended to continue configuration as pi, since pi is hostowner: time... fossil(#S/sdM0/fossil)...version... init: starting /bin/rc Can't cd /usr/pi: '/usr/pi' 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 %