Record of some of the computer tech I deal with so that it's documented at least somewhere.

Wednesday 7 November 2007

Creating a new plan9 kernel config

Add your kernel name to /sys/src/9/pc/mkfile
in my case pcqi, an installer floppy for qemu.
Decide if your kernel is a CONFLIST or a CRAPLIST member.
Seeing as the other craps are cd and floppy I think I want to be CRAP because I'm an installer with a bzroot.

Create your file, I suggest copying a similar config, in my case pcflop

The kernel config file works by concatenating dev with all the first column words to create a filename which should exist in 9/pc or 9/port.

i.e.
dev
root
arch

devroot.c is in 9/port
devarch.c is in 9/pc

the third column is a plain c file dependency i.e.
dev
ether netif
uses pc/devether.c and port/netif.c

+cur and =cur are parameters for using hardware/software cursors

bootdir

these files are copied to /boot/
if there is two words the second is the filename
i.e.
bootdir
/sys/lib/dist/bin/386/bzfs kfs

this will copy bzfs to /boot and call it kfs
the filename bzroot is special as this will be mounted on / on boot
by whatever you rename as kfs

I've gone quite aggressive in pulling bits out of the kernel, it's qemu after all, the file will probably end up on /n/sources/contrib/maht/qemu/pcqi

To fill in bzroot you have to go to /sys/lib/dist/pc and mk /sys/src/9/pc/9pcflop.gz


cd /sys/lib/dist/pc
mk root.bz2
mk /sys/src/9/pc/9pcqi.gz

No comments: