shithub: scripts

ref: 2c27c3c16d0d97e89f2d121f3fa78b9ffe8cd969
dir: /bin/rc/inferno/

View raw version
#!/bin/rc

rfork ne

ROOT=/sys/inferno

main=4M
image=8M
heap=8M

# font=/fonts/pelm/unicode.8.font
font=/fonts/lucidasans/typeunicode.7.font

if(! ~ $#* 0 && ! ~ $#* 3) {
	echo 'usage: inferno [main image heap]'
	exit
}

if(~ $#* 3) {
	main=$*(1)
	image=$*(2)
	heap=$*(3)
}

if (! test -d /sys/inferno/usr) {
	echo '/sys/inferno does not exist'
	exit
}

unionfs -m /n/iusr /usr $ROOT/usr
bind -c /n/iusr $ROOT/usr
bind -c $ROOT/usr/$user/lib/keydb.inferno \
		$ROOT/keydb
bind -c $home/lib/ndb.inferno /sys/inferno/lib/ndb
# bind -a /net /n/inferno/net
# bind -a /dev /n/inferno/dev

cd /sys/inferno
Plan9/arm/bin/emu '-pmain='$main '-pimage='$image '-pheap='$heap \
	-g800x1024 -c1 -f$font