code: 9ferno

Download patch

ref: 6d69f6fba35087686f79adb2ea0d67944a62ca7b
parent: 8ac587c8340d050e20bc25217b3a33227816a5ad
author: 9ferno <gophone2015@gmail.com>
date: Sun Oct 17 18:55:05 EDT 2021

generic /dis/init

--- a/dis/init
+++ b/dis/init
@@ -1,5 +1,7 @@
+#!/dis/sh
+
 # boot initialization
-#	configure devices
+#	configure boot devices
 #	setup /
 # sh -n /dis/init
 
@@ -11,110 +13,178 @@
 mount {mntgen} /n
 mount {mntgen} /mnt
 
-#fn showlocaldev {
-#	echo $1'	' $2
-#	if(~ $#bootargs 0){
-#		if(! ~ $#cdboot 0){
-#			if(~ $2 9660)
-#				bootargs=local!$1
-#		}
-#		if not {
-#			if(! ~ $2 '' dos)
-#				bootargs=local!$1
-#		}
-#	}
-#}
+# checked these to get this working
+#	/n/m/home/j/local/plan9/plan9front/sys/src/9/boot/bootrc
+#	/n/m/home/j/local/plan9/plan9front/sys/src/9/boot/cpurc
+#	/n/m/home/j/local/plan9/plan9front/rc/bin/diskparts
+#  parse the bootargs and try to find and start that device
+#		this is what 9front does and it is wise to stick with it
+#		and, after booting the specified device, use /os/init/$sysname
+#			for machine specific booting
+
+# read the ether0 from plan9.ini TODO
+#	bind it
+# read bootargs (plan9.ini)
+#	could be tcp, tls or local disk
+#	if local, use the specified disk
+#	if tcp, TODO
+# get the sysname
+#	figure out the sysname from /lib/ndb/local
+# 		ndb/query ether 50e549e5f938 sys
+#	sys= in plan9.ini
+#	run /os/init/$sysname, if it exists
 #
-#fn showlocaldevs{
-#	for(d in /dev/sd*) if(test -r $d/ctl){
-#		q=`{sed 's,(inquiry|geometry),\
-#\1,g' $d/ctl | grep inquiry}
-#		echo $d':' $q(2-)
-#		for(i in `{ls -p $d}){
-#			p=$d/$i
-#			switch($i){
-#			case ctl raw log led
-#				;
-#			case plan9 nvram swap
-#				echo $p
-#			case *
-#				showlocaldev $p `{fstype $p}
-#			}
-#		}
+#	for options to disk/kfs:
+#	bootargs=local!any other disk/kfs args /dev/sdG0/fs
+
+#TODO
+#	use nvram to connect to the authentication server
+#	bother with older kfs?
+#	usb disks at /shr/sd*
+#	tls, il bootargs
+#	if set, use ether0= of plan9.ini
+
+## reparse variables
+#for(i in `{ls -Qp /env}){
+#	switch($i){
+#	case '*'* 'fn#'* e820 apm0 apid ifs path pid prompt status ?
+#		# ignore these
+#	case *
+#		$i=`{echo $$i}
 #	}
-#	for(d in /shr/sd*) if(test -d $d) {
-#		echo $d':'
-#		for(p in $d/*.^(iso paq)) if(test -f $p){
-#			t=`{fstype $p}
-#			~ $#t 0 || showlocaldev $p $t
-#		}
-#	}
 #}
-#
-#showlocaldevs
 
-mac=`{cat /net/ether0/addr}
-if{~ $"mac deadbeefcafe}{
-	sysname=vmx9ferno
-}{~ $"mac 6805ca1bae72}{
-	sysname=9ferno
-}{
-	sysname=9ferno1
+fn showlocaldev {
+	(diskpart fstype)=$*
+	echo $diskpart'	' $fstype
+	#if{~ $#bootargs 0 && ~ $fstype fs 9660 dos} {
+	#	bootargs=local!$diskpart
+	#}
 }
 
-echo $"sysname > '#c'/sysname
+fn showlocaldevs{
+	for d in /dev/sd* {
+		if {ftest -r $d/ctl}{
+			(a q)=`{grep inquiry $d/ctl}
+			echo $d':' $q
+			for i in `{ls -p $d} {
+				p=$d/$i
+				if{~ $"i ctl raw log led}{
+					;
+				} {~ $"i plan9 nvram swap}{
+					echo $p
+				} {~ $"i 9fat}{
+					showlocaldev $p dos
+				} {~ $"i 9660}{
+					showlocaldev $p 9660
+				} {~ $"i fs}{
+					showlocaldev $p kfs64
+				} {~ $cdboot 1 && ~ $"i data}{
+					showlocaldev $p 9660
+				} {
+					echo $p: unrecognized filesystem
+				}
+			}
+		}
+	}
+	#for d in /shr/sd* {
+	#	if(test -d $d) {
+	#		echo $d':'
+	#		for(p in $d/*.^(iso paq)) if(test -f $p){
+	#			t=`{fstype $p}
+	#			~ $#t 0 || showlocaldev $p $t
+	#		}
+	#	}
+	#}
+}
 
+fn mountlocal{
+	device=$*
+	if{ ~ $device ''}{
+		echo local method needs an argument: device
+	} {
+		part=`{basename $device}
+		if{~ $part 9660}{
+			9660srv -9 $device /n/cd
+			bind /n/cd/dis /dis
+			bind -a /n/cd/ /
+		}{~ $cdboot 1 && ~ $part data}{
+			9660srv -9 $device /n/cd
+			bind /n/cd/dis /dis
+			bind -a /n/cd/ /
+		}{~ $part dos 9fat}{
+			dossrv -f $device
+			bind /n/dos/dis /dis
+			bind -a /n/dos/ /
+		}{~ $part fs}{
+			mount -c {disk/kfs64 $device} /n/rootdisk
+			bind /n/rootdisk/dis /dis
+			bind -c -a /n/rootdisk/ /
+		}{
+			echo unrecognized partition of $device: $part
+		}
+	}
+}
+
+fn confignet {
+	# the correct /net/ether0 can be set in plan9.ini
+	echo binding /net/ether0
 	<>/net/ipifc/clone {
 		x=`{read}
 		echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
-		ip/dhcp -dp -h $sysname /net/ipifc/$x
 	}
+}
 
-#ns
-if{~ $"sysname vmx9ferno}{
+fn mountnet {
+	ip/dhcp -p /net/ipifc/$x
+	for tuple in `{cat /net/ndb}{
+		(name value)=${split '=' $tuple}
+		if{~ $name sys}{
+			echo -n $value > /dev/sysname
+			sys=$value
+			sysname=$value
+		}{~ $name ip}{
+			ip=$value
+		}
+	}
+	echo $sysname
+	cat /dev/sysname
+	cat /net/ndb
+	cat /dev/sysname
 
-	# for using the cd
-	9660srv -9 /dev/sdF0/data /n/cd
-	bind -a /n/cd/dis /dis
-	#bind -a /n/cd/ /
+	mount -A -c $"bootargs /n/remote
+	bind /n/remote/dis /dis
+	bind -c -a /n/remote/ /
+}
 
-	disk/fdisk -p /dev/sdG0/data >/dev/sdG0/ctl
-	disk/prep -p /dev/sdG0/plan9 > /dev/sdG0/ctl
+sysname=$sys
+#showlocaldevs
+echo $bootargs
+and {ftest -e '#e/bootargs'} {
+	(connectmethod localdevice) = ${split ! $bootargs}
 
-	### for formatting the disk
-	###	bind -a '#S' /dev	# simple.b does this
-	##disk/mbr -m mbr /dev/sdG0/data
-	##disk/fdisk -baw /dev/sdG0/data
-	##disk/prep -bw -a^(9fat fs) /dev/sdG0/plan9
-	##disk/format -b pbs -d -r 2 /dev/sdG0/9fat 9bootfat /n/cd/cfg/plan9.ini
-	#
-	## for installing to a formatted disk
-	#mount -c { disk/kfs -r -n root /dev/sdG0/fs } /n/rootdisk # ream
-	#disk/kfscmd -n root sync
-	#disk/mkfs -v -r -s /n/cd/ -d /n/rootdisk/ <{ echo + }
-	#disk/kfscmd -n root sync
+	# if local, start disks
+	# if tcp, bind ether0 as ipifc and get on with it
 
-	## starting inferno already installed to a disk
-	mount -c { disk/kfs -n rootdisk /dev/sdG0/fs } /n/rootdisk
-	#disk/kfscmd -n rootdisk sync
-	#bind -b /n/rootdisk/dis /dis
-	bind -a -c /n/rootdisk/ /
+	if { ~ $"connectmethod local }{
+		sh /dis/diskparts
+		mountlocal $localdevice
+		if {~ $"sysname ''}{
+			sysname=`{ndb/query ether `{cat '#l0/ether0/addr'} sys}
+		}
+	} { ~ $"connectmethod tcp }{
+		confignet
+		mountnet
+	} {
+		echo unsupported connect method: $connectmethod
+	}
 
-	# refresh the disk contents from the cd
-	#disk/mkfs -v -s /n/cd/ -d /n/rootdisk/ <{ echo + } &
-
-}{~ $"sysname 9ferno}{
-
-	# mount the vmx cd
-	mount -A tcp!192.168.88.118!17001 /n/cd
-	bind -b /n/cd/dis /dis
-	bind -a /n/cd /
-
-	disk/fdisk -p /dev/sdE0/data >/dev/sdE0/ctl
-	disk/prep -p /dev/sdE0/plan9 > /dev/sdE0/ctl
-
+	and {! ~ $"sysname ''} {
+			ftest -x /os/init/$sysname }{
+			@ /os/init/$sysname
+		}
 }
 
 # if I add /lib/sh/profile to devroot,
 #	all the above binds can be moved to $home/namespace
-sh -x -l -n # to run the /lib/sh/profile
+sh -l -i #-l # to run the /lib/sh/profile
--- a/lib/ndb/local.dist
+++ b/lib/ndb/local.dist
@@ -18,3 +18,5 @@
 	GAMES=your_games_server
 	registry=your_registry_server
 	gridsched=your_inferno_grid_scheduler
+
+sys=vmx9ferno ether=deadbeefcafe
--- a/lib/proto/inferno
+++ b/lib/proto/inferno
@@ -1455,8 +1455,8 @@
 		wm.b
 		wmdeb.m
 		wmplay.b
-chan
-dev
+#chan
+#dev
 dis
 	9660srv.dis
 	9export.dis
@@ -1984,7 +1984,7 @@
 	sh.pdf
 	styx.ms
 	styx.pdf
-env
+#env
 fonts
 	LICENCE
 	big5
@@ -2355,25 +2355,25 @@
 	x509.m
 	xml.m
 	xpointers.m
-n
-	cd
-	client
-		chan
-		dev
-	disk
-	dist
-	dump
-	ftp
-	kfs
-	local
-	rdbg
-	registry
-	remote
-net
-net.alt
-nvfs
-prof
-prog
+#n
+#	cd
+#	client
+#		chan
+#		dev
+#	disk
+#	dist
+#	dump
+#	ftp
+#	kfs
+#	local
+#	rdbg
+#	registry
+#	remote
+#net
+#net.alt
+#nvfs
+#prof
+#prog
 services
 	httpd
 		httpd.rewrite
@@ -2405,7 +2405,7 @@
 #		+
 #	tvlist
 #		+
-tmp
+#tmp
 usr
 	inferno
 		charon
--- a/lib/proto/os
+++ b/lib/proto/os
@@ -967,8 +967,6 @@
 		NOTICE
 		ahci.h
 		apbootstrap.s
-		apic.c
-		archmp.c
 		audio.h
 		dat.h
 		errstr.h
--- a/mkfile
+++ b/mkfile
@@ -250,10 +250,11 @@
 %.pc.iso:D:	install kernelinstall
 	@{rfork n
 	mk binds
-	{	echo 'console=0 b115200'
+	{	#echo 'console=0 b115200'
 		#echo '*dumpmp=1'
 		#echo '*apicdebug=1'
 		#echo '*nomp=1'
+		echo 'cdboot=1'
 		grep -v '^bootfile=' /n/src9/os/pc/plan9.ini
 		#echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}
 		#echo 'bootfile=9pc64'
--- a/os/init/disinit.b
+++ b/os/init/disinit.b
@@ -73,14 +73,14 @@
 				sys->fprint(stderr, "dis/init status: %s\nStarting fallback shell\n", e);
 				# fallback console
 				sh1 := load Sh "/dis/sh.dis";
-				sys->print("sh -x -n\n");
-				sh1->init(nil, "sh" :: "-x" :: "-n" :: nil);
+				sys->print("sh -x\n");
+				sh1->init(nil, "sh" :: "-x" :: nil);
 		}
 	}{
 		# fallback console
 		sh1 := load Sh "/dis/sh.dis";
-		sys->print("sh -x -n\n");
-		sh1->init(nil, "sh" :: "-x" :: "-n" :: nil);
+		sys->print("sh -x\n");
+		sh1->init(nil, "sh" :: "-x" :: nil);
 	}
 }
 
--- a/os/init/mkfile
+++ b/os/init/mkfile
@@ -1,6 +1,7 @@
 <../../mkconfig
 
 OBJ=\
+	disinit.dis\
 	wminit.dis\
 
 all:V:	$OBJ
--- /dev/null
+++ b/os/init/vmx9ferno
@@ -1,0 +1,30 @@
+#!/bin/sh
+
+load std
+# machine specific initialization
+#	special networking setup, disk setup
+#	avoids putting machine specific stuff in devroot
+
+echo binding /net/ether0
+<>/net/ipifc/clone {
+	x=`{read}
+	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
+}
+
+# Networking
+ndb/dns -r
+ndb/cs
+#bind -a '#scs' /net
+
+# refresh disk contents from the master
+and {ndb/csquery tcp!master!styx}{ftest -d /n/rootdisk/dis}{
+	mount -A tcp!master!styx /n/master
+	#disk/mkfs -v -s /n/master/ -d /n/rootdisk/ <{ cat /n/master/lib/proto/^(9boot inferno os src utils) }
+
+	## sync the boot executables
+	#dossrv -f /dev/sdG0/9fat -m /n/9fat
+	#cp /n/9fat/ipc64 /n/9fat/ipc64.0
+	#cp /n/master/Inferno/amd64/ipc64 /n/9fat/ipc64
+	#cp /n/master/Inferno/386/9bootfat /n/9fat/9bootfat
+}
+
binary files a/os/init/wminit.dis /dev/null differ
--- a/os/init/wminit.sbl
+++ /dev/null
@@ -1,667 +1,0 @@
-limbo .sbl 2.1
-Init
-5
-wminit.b
-sys.m
-security.m
-draw.m
-keyring.m
-441
-35.11,47 0
-16,31 0
-16,41 0
-16,41 1
-43,46 0
-11,47 0
-11,47 0
-2,4 0
-6,7 0
-6,7 2
-6,7 3
-6,7 4
-36.4,10 5
-37.9,11 6
-2,11 6
-39.1,28 7
-12,27 7
-1,28 7
-1,28 7
-40.4,13 8
-17,28 8
-42.2,32 9
-13,31 9
-2,32 9
-2,32 9
-43.2,41 10
-25,40 10
-2,41 10
-2,41 10
-44.5,14 11
-45.3,56 12
-14,55 12
-3,56 12
-3,56 12
-46.3,43 13
-14,42 13
-3,43 13
-3,43 13
-48.17,48 14
-30,36 14
-38,40 14
-42,47 14
-17,48 14
-17,48 14
-3,8 14
-10,13 14
-10,13 15
-10,13 16
-49.5,17 17
-50.3,49 18
-14,43 18
-45,48 18
-3,49 18
-3,49 18
-51.10,12 19
-3,12 19
-3,12 20
-3,12 21
-55.1,24 22
-12,23 22
-1,24 22
-1,24 22
-57.1,12 23
-58.1,43 24
-11,16 24
-18,21 24
-23,26 24
-28,38 24
-40,42 24
-1,43 24
-1,43 24
-59.4,9 25
-60.9,10 26
-2,10 26
-61.8,10 27
-1,10 27
-70.1,25 28
-71.1,32 29
-72.1,28 30
-73.4,15 31
-74.2,14 32
-2,14 32
-2,14 32
-2,14 33
-76.1,50 34
-12,49 34
-1,50 34
-1,50 34
-78.1,44 35
-12,43 35
-1,44 35
-1,44 35
-84.1,31 36
-6,10 36
-12,18 36
-20,30 36
-1,31 36
-1,31 36
-85.1,32 37
-6,10 37
-12,18 37
-20,31 37
-1,32 37
-1,32 37
-86.1,32 38
-6,10 38
-12,18 38
-20,31 38
-1,32 38
-1,32 38
-87.1,32 39
-6,10 39
-12,18 39
-20,31 39
-1,32 39
-1,32 39
-88.1,48 40
-22,35 40
-37,47 40
-1,48 40
-1,48 40
-89.4,18 41
-90.2,21 42
-91.5,37 43
-10,14 43
-16,23 43
-25,36 43
-5,37 43
-5,37 43
-5,41 43
-92.3,37 44
-9,30 44
-32,36 44
-3,37 44
-3,37 44
-95.1,13 45
-1,13 45
-97.1,23 46
-12,22 46
-1,23 46
-1,23 46
-99.1,44 47
-12,30 47
-32,43 47
-1,44 47
-1,44 47
-100.4,13 48
-101.2,44 49
-8,43 49
-2,44 49
-2,44 49
-102.2,6 50
-104.1,41 51
-105.4,32 52
-15,17 52
-19,22 52
-24,31 52
-4,32 52
-4,32 52
-36,43 52
-4,43 52
-106.2,46 53
-13,45 53
-2,46 53
-2,46 53
-107.2,6 54
-109.1,28 55
-110.4,32 56
-15,17 56
-19,22 56
-24,31 56
-4,32 56
-4,32 56
-36,43 56
-4,43 56
-111.2,37 57
-13,36 57
-2,37 57
-2,37 57
-112.2,6 58
-115.1,36 59
-11,23 59
-25,35 59
-1,36 59
-1,36 59
-116.4,13 60
-117.2,36 61
-8,35 61
-2,36 61
-2,36 61
-118.2,6 62
-121.1,35 63
-122.1,29 64
-12,14 64
-16,19 64
-21,28 64
-1,29 64
-1,29 64
-123.1,9 65
-124.4,11 66
-125.2,36 67
-8,35 67
-2,36 67
-2,36 67
-126.2,6 68
-129.15,49 69
-29,39 69
-41,48 69
-15,49 69
-15,49 69
-130.7,16 70
-131.5,10 71
-5,20 71
-5,20 72
-132.3,13 73
-133.3,8 74
-135.2,12 75
-2,12 75
-137.4,13 76
-138.2,49 77
-8,48 77
-2,49 77
-2,49 77
-139.2,6 78
-142.1,13 79
-143.1,44 80
-12,38 80
-40,43 80
-1,44 80
-1,44 80
-145.1,16 81
-146.7,18 82
-14,17 82
-7,18 82
-7,18 82
-7,22 82
-26,38 82
-26,38 82
-26,42 82
-147.2,13 83
-8,12 83
-2,13 83
-2,13 83
-2,13 83
-149.1,43 84
-18,29 84
-31,42 84
-1,43 84
-1,43 84
-150.5,15 85
-151.2,21 86
-11,17 86
-19,20 86
-2,21 86
-2,21 86
-152.2,21 87
-11,17 87
-19,20 87
-2,21 87
-2,21 87
-154.1,10 88
-156.1,21 89
-12,20 89
-1,21 89
-1,21 89
-161.1,31 90
-6,10 90
-12,18 90
-20,30 90
-1,31 90
-1,31 90
-162.1,32 91
-6,10 91
-12,18 91
-20,31 91
-1,32 91
-1,32 91
-163.1,32 92
-6,10 92
-12,18 92
-20,31 92
-1,32 92
-1,32 92
-164.4,15 93
-165.2,48 94
-7,11 94
-13,20 94
-22,47 94
-2,48 94
-2,48 94
-166.1,33 95
-6,10 95
-12,18 95
-20,32 95
-1,33 95
-1,33 95
-167.1,33 96
-6,10 96
-12,18 96
-20,32 96
-1,33 96
-1,33 96
-168.1,33 97
-6,10 97
-12,18 97
-20,32 97
-1,33 97
-1,33 97
-169.1,32 98
-6,10 98
-12,18 98
-20,31 98
-1,32 98
-1,32 98
-170.1,32 99
-6,10 99
-12,19 99
-21,31 99
-1,32 99
-1,32 99
-171.1,35 100
-11,15 100
-17,22 100
-24,34 100
-1,35 100
-1,35 100
-172.4,35 101
-9,13 101
-15,21 101
-23,34 101
-4,35 101
-4,35 101
-4,40 101
-173.2,40 102
-174.6,18 103
-175.3,30 104
-9,29 104
-3,30 104
-3,30 104
-176.3,44 105
-15,18 105
-40,43 105
-20,43 105
-20,43 105
-20,43 106
-3,44 105
-177.3,14 107
-3,14 108
-181.1,25 109
-12,24 109
-1,25 109
-1,25 109
-182.1,11 110
-1,11 110
-184.1,25 111
-12,24 111
-1,25 111
-1,25 111
-186.1,42 112
-187.4,16 113
-188.2,43 114
-8,42 114
-2,43 114
-2,43 114
-189.2,36 115
-192.1,27 116
-19,21 116
-23,26 116
-1,27 116
-193.0,1 117
-197.14,28 118
-24,27 118
-14,28 118
-14,28 118
-198.5,11 119
-199.2,27 120
-8,26 120
-2,27 120
-2,27 120
-200.2,8 121
-203.1,42 122
-17,28 122
-30,41 122
-1,42 122
-1,42 122
-204.5,14 123
-205.2,35 124
-8,34 124
-2,35 124
-2,35 124
-206.2,8 125
-210.20,49 126
-27,37 126
-39,48 126
-20,49 126
-20,49 126
-1,49 126
-1,49 127
-211.5,29 128
-16,18 128
-20,21 128
-23,28 128
-5,29 128
-5,29 128
-33,38 128
-5,38 128
-212.2,36 129
-8,35 129
-2,36 129
-2,36 129
-213.0,1 130
-220.1,35 131
-12,22 131
-24,34 131
-1,35 131
-1,35 131
-221.4,13 132
-222.2,8 133
-223.1,41 134
-13,27 134
-29,40 134
-1,41 134
-1,41 134
-224.4,14 135
-225.2,8 136
-226.1,26 137
-227.1,34 138
-17,19 138
-21,24 138
-26,33 138
-1,34 138
-1,34 138
-228.4,11 139
-229.2,8 140
-230.1,25 141
-12,15 141
-17,20 141
-22,24 141
-1,25 141
-1,25 141
-231.0,1 142
-19
-aSys->Dir 1:26.1,39.2 64
-11
-0:name:28.2,6 s
-4:uid:29.2,5 s
-8:gid:30.2,5 s
-12:muid:31.2,6 s
-16:qid:32.2,5 @1
-
-32:mode:33.2,6 i
-36:atime:34.2,7 i
-40:mtime:35.2,7 i
-48:length:36.2,8 B
-56:dtype:37.2,7 i
-60:dev:38.2,5 i
-aSys->Qid 11.1,16.2 16
-3
-0:path:13.2,6 B
-8:vers:14.2,6 i
-12:qtype:15.2,7 i
-aDraw->Chans 3:70.1,82.2 4
-1
-0:desc:72.2,6 i
-aSys->Connection 1:52.1,57.2 12
-3
-0:dfd:54.2,5 R@4
-
-4:cfd:55.2,5 R@4
-
-8:dir:56.2,5 s
-aSys->FD 45.1,48.2 4
-1
-0:fd:47.2,4 i
-aKeyring->Authinfo 4:132.1,140.2 24
-6
-0:mysk:134.2,6 R@6
-
-4:mypk:135.2,6 R@8
-
-8:cert:136.2,6 R@9
-
-12:spk:137.2,5 R@8
-
-16:alpha:138.2,7 R@10
-
-20:p:139.2,3 R@10
-
-aKeyring->SK 70.1,75.2 8
-2
-0:sa:72.2,4 R@7
-
-4:owner:73.2,7 s
-aKeyring->SigAlg 55.1,59.2 4
-1
-0:name:57.2,6 s
-aKeyring->PK 62.1,67.2 8
-2
-0:sa:64.2,4 R@7
-
-4:owner:65.2,7 s
-aKeyring->Certificate 78.1,85.2 16
-4
-0:sa:80.2,4 R@7
-
-4:ha:81.2,4 s
-8:signer:82.2,8 s
-12:exp:83.2,5 i
-aKeyring->IPint 9.1,52.2 4
-1
-0:x:11.2,3 i
-aDraw->Context 3:274.1,279.2 12
-3
-0:display:276.2,9 R@12
-
-4:screen:277.2,8 R@16
-
-8:wm:278.2,4 Ct8.2
-0:t0:15,21 s
-4:t1:15,21 Ct8.2
-0:t0:32,38 s
-4:t1:32,38 R@17
-
-
-
-aDraw->Display 201.1,230.2 20
-5
-0:image:203.2,7 R@13
-
-4:white:204.2,7 R@13
-
-8:black:205.2,7 R@13
-
-12:opaque:206.2,8 R@13
-
-16:transparent:207.2,13 R@13
-
-aDraw->Image 142.1,198.2 56
-8
-0:r:146.2,3 @14
-
-16:clipr:147.2,7 @14
-
-32:depth:148.2,7 i
-36:chans:149.2,7 @2
-
-40:repl:150.2,6 i
-44:display:151.2,9 R@12
-
-48:screen:152.2,8 R@16
-
-52:iname:153.2,7 s
-aDraw->Rect 116.1,139.2 16
-2
-0:min:118.2,5 @15
-
-8:max:119.2,5 @15
-
-aDraw->Point 99.1,113.2 8
-2
-0:x:101.2,3 i
-4:y:102.2,3 i
-aDraw->Screen 249.1,263.2 16
-4
-0:id:251.2,4 i
-4:image:252.2,7 R@13
-
-8:fill:253.2,6 R@13
-
-12:display:254.2,9 R@12
-
-aDraw->Wmcontext 282.1,291.2 28
-7
-0:kbd:284.2,5 Ci
-4:ptr:285.2,5 CR@18
-
-8:ctl:286.2,5 Cs
-12:wctl:287.2,6 Cs
-16:images:288.2,8 CR@13
-
-20:connfd:289.2,8 R@4
-
-24:ctxt:290.2,6 R@11
-
-aDraw->Pointer 266.1,271.2 16
-3
-0:buttons:268.2,9 i
-4:xy:269.2,4 @15
-
-12:msec:270.2,6 i
-4
-0:rootfs
-1
-32:server:0:30.7,13 s
-5
-36:ai:43.2,4 R@5
-
-40:err:41.2,5 s
-44:n:32.5,6 i
-48:ok:1,3 i
-64:c:33.1,2 @3
-
-i76:init
-0
-14
-32:cfg:104.1,4 Ab
-36:fd:99.1,3 R@4
-
-40:cfd:149.1,4 R@4
-
-44:spec:68.1,5 s
-48:buf:121.1,4 Ab
-52:logon:186.1,6 mCommand
-25.0,28.1 0
-
-56:mouse:173.2,7 mCommand
-25.0,28.1 0
-
-60:srv:142.1,4 s
-64:nr:122.1,3 i
-68:nvramfd:88.1,8 R@4
-
-72:retrycount:145.1,11 i
-88:dc:191.1,3 R@11
-
-92:ntok:129.2,6 i
-96:ls:8,10 Ls
-n370:setclock
-0
-4
-32:b:210.1,2 Ab
-36:fd:203.1,3 R@4
-
-40:ok:197.2,4 i
-48:dir:6,9 @0
-
-n411:setsysname
-0
-4
-32:buf:226.1,4 Ab
-36:fd:220.1,3 R@4
-
-40:fds:223.1,4 R@4
-
-44:nr:227.1,3 i
-n4
-156:auth:11.1,5 mAuth
-2:49.0,59.1 0
-
-192:draw:0:14.1,5 mDraw
-3:1.0,298.1 0
-
-236:kr:0:18.1,3 mKeyring
-4:4.0,335.1 0
-
-264:sys:0:6.0,3 mSys
-1:4.0,163.1 0
-
--- a/os/pc64/main.c
+++ b/os/pc64/main.c
@@ -268,8 +268,8 @@
 
 	if(!waserror()){
 		ksetenv("cputype", "am64", 0);
-		snprint(buf, sizeof(buf), "amd64 %s", conffile);
-		ksetenv("terminal", buf, 0);
+		//snprint(buf, sizeof(buf), "amd64 %s", conffile);
+		//ksetenv("terminal", buf, 0);
 		setconfenv();
 		poperror();
 	}
--- a/os/pc64/pc64
+++ b/os/pc64/pc64
@@ -167,7 +167,6 @@
 	/dis
 	/env	/
 	/fd	/
-	/lib	/
 	/n	/
 	/net	/
 	/net.alt	/
@@ -182,10 +181,14 @@
 	/dis/init
 	/dis/shutdown
 # basic commands
+	/dis/basename.dis
 	/dis/bind.dis
 	/dis/cat.dis
 	/dis/cd.dis
+	/dis/diskparts
 	/dis/echo.dis
+	/dis/ftest.dis
+	/dis/grep.dis
 	/dis/ls.dis
 	/dis/mntgen.dis
 	/dis/mount.dis
@@ -210,31 +213,33 @@
 	/dis/ip/ping.dis
 	/dis/auth/factotum.dis
 # libraries for the above commands
-	/dis/lib/arg.dis
-	/dis/lib/daytime.dis
-	/dis/lib/string.dis
-	/dis/lib/styx.dis
-	/dis/disk/pedit.dis
 	/dis/disk/calc.tab.dis
+	/dis/disk/pedit.dis
+	/dis/lib/arg.dis
+	/dis/lib/auth.dis
 	/dis/lib/bufio.dis
-	/dis/lib/disks.dis
+	/dis/lib/daytime.dis
 	/dis/lib/dhcpclient.dis
 	/dis/lib/dial.dis
+	/dis/lib/disks.dis
+	/dis/lib/env.dis
+	/dis/lib/factotum.dis
+	/dis/lib/filepat.dis
 	/dis/lib/ip.dis
-	/dis/lib/random.dis
+	/dis/lib/names.dis
+	/dis/lib/nametree.dis
 	/dis/lib/rand.dis
-	/dis/lib/timers.dis
+	/dis/lib/random.dis
 	/dis/lib/readdir.dis
-	/dis/lib/nametree.dis
-	/dis/lib/styxservers.dis
-	/dis/lib/auth.dis
+	/dis/lib/regex.dis
 	/dis/lib/ssl.dis
-	/dis/lib/factotum.dis
+	/dis/lib/string.dis
+	/dis/lib/styx.dis
 	/dis/lib/styxconv/new2old.dis
 	/dis/lib/styxconv/ostyx.dis
 	/dis/lib/styxpersist.dis
-	/dis/lib/env.dis
-	/dis/lib/filepat.dis
+	/dis/lib/styxservers.dis
+	/dis/lib/timers.dis
 	/dis/lib/workdir.dis
 # would need these to authenticate with the root server
 #	/keydb  /
@@ -241,7 +246,7 @@
 #	/keydb/mutual   /usr/inferno/keyring/mutual
 #	/keydb/spree /usr/inferno/keyring/spree
 # for factotum
-	/mnt
+#	/mnt
 
 # obsolete?
 #bootdir