code: fqa.9front.org

ref: 1ef07fe50e0faf785ff7ffaf05b6dd1d4309100d
dir: /appendixj.ms/

View raw version
.\" This troff source is processed to create all forms of the
.\" 9FRONT DASH 1 book and the http://fqa.9front.org website.
.\" NOTE: Purely experimental. Methods employed may change.
.\" troff -ms -mpictures appendixj.ms | page
.\" htmlroff -u -ms -mhtml appendixj.ms >appendixj.html
.de FG	\" .FG <basename>
.ie h .html - <img src="\\$1.\\$2" />
.el .BP \\$1.ps
.br
..
.po 1i \" page offset (from left)
.fp 1 R LucidaSans
.fp 2 I LucidaSansI
.fp 3 B LucidaSansB
.fp 4 BI LucidaSansI
.fp 5 CW LucidaCW
.paragraph 0
.margin 0
.HTML "Appendix J - Junk
.html - <style type="text/css">body{font-size:10pt}; a{font-size:10pt}</style>
.html - <a href="fqa.html">FQA INDEX</a> |
.html - <a href="fqa9.html">FQA 9 - Troubleshooting</a> |
.html - <a href="appendixl.html">Appendix L - Languages</a>
.html - <hr />
.SH
.LG
.ihtml h1 <h1>
Appendix J - Junk
.ihtml h1
.NL
.R
.html - <a href="appendixj.html">html</a> |
.html - <a href="appendixj.pdf">pdf</a> |
.html - <a href="appendixj.ms">troff</a>

.SH
.ihtml h2 <h2>
Raspberry Pi
.R
.ihtml h2
.html - <br />
.FG pie-in-face jpg

.SH
Prebuilt image
.R

sdcard image available for the raspberry pi:

.ihtml ul <ul>
.IP
.ihtml a <a href="http://felloff.net/usr/cinap_lenrek/9front-pi-3125.9fcca5b8ac11.img.bz2.torrent">
http://felloff.net/usr/cinap_lenrek/9front-pi-3125.9fcca5b8ac11.img.bz2.torrent
.ihtml a

.ihtml a <a href="http://intma.in/downloads/9front-pi-3125.9fcca5b8ac11.img.bz2">
http://intma.in/downloads/9front-pi-3125.9fcca5b8ac11.img.bz2
.ihtml a
.LP
.ihtml ul

I used Richard Miller's
.CW pi.uboot.sd.img
as a base, you may want to update the firmware on the FAT partition with files from here:

.ihtml a <a href="https://github.com/raspberrypi/firmware">
https://github.com/raspberrypi/firmware
.ihtml a

older versions:

9front 95b0756087eb from Sun Oct 20 22:38:35 CES 2013

.ihtml ul <ul>
.IP
.ihtml a <a href="http://intma.in/downloads/9front_pi.img.gz.torrent">
http://intma.in/downloads/9front_pi.img.gz.torrent
.ihtml a

.ihtml a <a href="http://intma.in/downloads/9front_pi.img.gz">
http://intma.in/downloads/9front_pi.img.gz
.ihtml a
.LP
.ihtml ul

.SH
Installation Instructions
.R

If you don't want to use the provided image, follow these instructions to make your own. You don't need a computer capable of running 9front, qemu will suffice.

.SH
Image
.R

Make a FAT partition containing all the necessary files to boot the Raspberry Pi. An easy way to do this is to use Richard Miller's
.ihtml a <a href="http://plan9.bell-labs.com/sources/extra/pi.uboot.sd.img.gz">
.CW pi.uboot.sd.img
.ihtml a
(it's small). Write it to your SD card or do the following if you're using qemu (installing to an SD card directly from qemu was
.B very
slow for me):
.P1
# set count to the size you want your image to be
# (in 512b units, see dd manpage)
dd if=/dev/zero of=9front-pi.img count=3782016

# copy minimal image to beginning of the newly created image
dd if=pi.uboot.sd.img of=9front-pi.img conv=notrunc
.P2

.SH
Boot and Installation
.R

Now boot from the 9front CD. For
.CW qemu
see
.ihtml a <a href="fqa3.html#3.3.1">
FQA 3.3.1 - qemu,
.ihtml a
this is what I did:
.P1
qemu-system-i386 \e
	-enable-kvm \e
	-drive file=9front-pi.img,if=virtio \e
	-cdrom 9front-3125.9fcca5b8ac11.iso \e
	-boot d
.P2

Now do the installation (see
.ihtml a <a href="fqa4.html">
FQA 4 - 9front Installation Guide
.ihtml a
for help), use
.CW hjfs .
Since you don't need a
.CW 9fat
partition, you may want to delete the automatically created partitions and create your own (start at sector 2 or
.CW prepdisk
will complain). Note that since you've removed
.CW 9fat ,
the installer will prompt you to do the prepdisk step again, just type the next step in manually.

After the installation you have a 9front system that only has 386 binaries.
The next step is compile the arm binaries.

.SH
Compiling for ARM
.R

Reboot and boot from CD again, but this time use the newly created partition as root (e.g. local!/dev/sdF0/fs)

Before compiling you need to create some directories under
.CW /arm/bin :
.P1
echo allow >>/srv/hjfs.cmd      # allow changing ownership of files
cd /arm/bin
for(i in audio auth aux bitsy btc dial disk fs games ip ip/httpd ndb nusb replica upas venti){
        mkdir $i
        chgrp -u sys $i
        chgrp sys $i
}
.P2

Then compile everything:
.P1
cd /sys/src
objtype=arm mk install
cd 9/bcm
mk install && mk install 'CONF=picpuf'
.P2

And copy the kernel to the FAT partition:
.P1
dossrv >/dev/null >[2]/dev/null
mount -c /srv/dos /n/dos /dev/sdF0/dos
cp /arm/9pif /arm/9picpuf /n/dos
.P2

Then set the kernel in
.CW /n/dos/config.txt
to
.CW 9pif
or
.CW 9picpuf
for terminal or cpu kernel and boot the image with the Raspberry Pi.
At this point you can delete the 386 binaries if you don't need them.

Once booted on the Raspberry Pi, you're able to mount the dos partition with:
.P1
9fs pidos
.P2

This will mount the dos partition on
.CW /n/pidos ,
similar to how
.CW
9fs 9fat
.R
works.

.html - <hr />
.html - <a href="fqa.html">FQA INDEX</a> |
.html - <a href="fqa9.html">FQA 9 - Troubleshooting</a> |
.html - <a href="appendixl.html">Appendix L - Languages</a>