On Thu, 11 Jan 2018 03:27:47 -0700 arn...@skeeve.com wrote:
arn...@skeeve.com writes:
> Hi.
> 
> Is there a document somewhere that describes how to bring up an RPI
> with Plan 9, that assumes the reader knows absolutely nothing?
> E.g., where to buy it, what case and power supply to buy, what accessories
> if any. Where to download the image and what kind of SD card to put
> it on.  How to boot Plan 9 and set it up as a standalone system. Etc.

Some quick notes [from memory]:

Hardware:
Get a $35 RPi3. Or $10 RPi0W. RPi0W is probably underpowered
but adequate as a terminal.  RPi0 can be for fun projects.

Get a 5V 2.4Amp or greater supply. Or a powered USB hub that
can supply 2.4A per port.

For RPi0 or RPi0W you will need a miniDHMI to HDMI cable.

Get a USB keyboard & mouse (in my experience fancy ones don't
work well).  Some Logitech mouse+keyboard that wirelessly
connect to a USB dongle work well. Handy with a RPI0 or RPI0W
as they have only one USB port.

You can go to Adafruit or other pi vedors to find the right
power supply, microSDHC card, cases, adapters etc.

Software:

Download http://9p.io/sources/contrib/miller/9pi.img.gz
and copy to a microSD card. Make sure you do an image
copy (i.e. make sure it is not automounted as a filesystem).

Plug in the keyboard, mouse and the microSD card.  Connect to
a monitor or TV with an HDMI port. Turn on the TV and make
sure you are on the right HDMI port. Connect the microUSB
cable to the power brick or hub and then to the RPi and it
should just come up in standalone mode in seconds.

Then start up a terminal window under acme or rio and

% c:
% cd /n/c:

to poke around the FAT partition. Key files:

config.txt -- this decides what kernel gets run. There are
sections such as [pi0] [pi1] for device specific differences.
I believe Richard has put the right kernel names in there but
this is something you should know in you decide to build
kernels locally.

cmdline.txt -- this file contains the boot params given to plan9.

Files with variations of this name contain examples of what is
needed for various choices.

Debugging:

You can hook up a FTDI or RP2101 USB to serial adapter and connect
to GPIO ports for the serial console. I can't remember the port number
but you can look that up on the RPI website.

IIRC for the pi3 you will need to 

enable_uart=1

to the config.txt file.

Rebuilding the kernel:

% cd /sys/src/9/bcm
...
% mk 'CONF=pi2'

Now copy 9pi2 to /n/c: and edit config.txt to reflect any name changes.
fshalt and reboot.

The above is for the standalone case.  You will probably want
to netboot the kernel [someone else can add notes for this]

Accessories:

I have only used a GPS device (connected via uart). It worked fine
with the gpsfs program. 

We probably should have 9pi github "project" where people can put
any io device related code, notes etc.

Reply via email to