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

Friday 10 April 2009

Build your own Inferno

first you'll need mercurial

apt-get install mercurial
then get the code
cd /usr/local; hg clone https://inferno-os.googlecode.com/hg/ inferno-os


edit mkconfig
ROOT=/usr/local/inferno-os
SYSHOST=Linux
OBJTYPE=386

edit makemk.sh
ROOT=/usr/local/inferno-os
SYSTARG=Linux

Atm. you have to make some empty directories because hg doesn't like those !

mkdir /usr/local/inferno-os/Linux/386/lib/

% sh makemk.sh

[ n.b.

(11:42:04) mjl-: mahjadin: i think that on linux/amd64, you'll need a mk nuke inbetween makemk.sh and mk install, makemk.sh didn't use -m32 last time i checked, so mk install will try to link all -m32 object files against the few amd64 libs that makemk.sh created.
(11:42:11) mjl-: but i'll have to check that.
...
(11:51:08) mjl-: this is the error:
(11:51:21) mjl-: //usr/bin/ld: warning: i386:x86-64 architecture of input file `/home/mjl/inf.test/Linux/386/lib/libbio.a(bgetc.o)' is incompatible with i386 output

]


Then add the inferno bin to your path for mk and later for other tools such as iyacc
PATH=$PATH:/usr/local/inferno-os/Linux/386/bin
mk install


bah, failed with something different this time

(cd Linux; mk install)
cc -c -m32 asm-386.S
mk: no recipe to make 'devtab.o'
mk: echo "(cd $SYSTARG; ... : exit status=exit(1)
mk: for j in ... : exit status=exit(1)

ok I solved that one
touch /usr/local/inferno-os/emu/port/devtab.c

on to the next

touch /usr/local/inferno-os/dis/lib/oldauth.dis

finally mk install will work

Though you have to pretend to yourself none of those compiler warnings matter as they fly past.

Other directories to make

mkdir OpenBSD/arm
mkdir `{hget 'http://inferno-os.googlecode.com/issues/attachment?aid=-8986372491888485913&name=empties'}
chmod 555 mnt/* n/client/* n/*
chmod 755 n/client
chmod 555 prof

you'll get an error 'cos we made it earlier

mkdir: ./Linux/386/lib already exists

ohoh fonts

can't auto-download cdinstall.iso any more, have to guess at the release date (unless this bit of p9p script works)


cd /tmp
dist=`{hget http://www.vitanuova.com/inferno/downloads.html | grep '/dist/4e/' | sed -e 's/^[^"]+"//' -e 's/".*//'}
hget $dist | gunzip | tar x inferno/fonts; @{cd inferno/fonts && tar cp .} | @{cd /usr/local/inferno-os/fonts/&& tar xT} ; rm -rf inferno

chmod 777 /usr/local/inferno-os/tmp

For plan9 is is virtually the same, not all the missing bits are missing, you'll work it out.

As a new user you'll need to do this (probably as root):
cd /usr/local/inferno-os/
mkdir usr/$user
mkdir usr/$user/lib
cp usr/inferno/lib/plumbing usr/$user/lib
touch usr/$user/lib/keyring
chown -R $user usr/$user

No comments: