code: 9ferno

Download patch

ref: e74fa5bc5a9171c3b21e2a616f4b8ac98c472067
parent: 0cb5f1d1ba2e5570e22f00039bdc9c7006e7158b
author: joe9 <joe9mail@gmail.com>
date: Thu Jul 29 17:10:28 EDT 2021

updated init

--- a/dis/init
+++ b/dis/init
@@ -1,5 +1,5 @@
 # boot initialization here
-# sh -n /dis/bootrc
+# sh -n /dis/init
 
 load std
 
@@ -7,28 +7,29 @@
 disk/fdisk -p /dev/sdG0/data >/dev/sdG0/ctl
 disk/prep -p /dev/sdG0/plan9 > /dev/sdG0/ctl
 
-## for using the cd
-#9660srv /dev/sdF0/data /n/cd
+# for using the cd
+9660srv /dev/sdF0/data /n/cd
 #bind -b /n/cd/dis /dis
 #bind -b /n/cd/Inferno/386 /
 
-## 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 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/local # reams
+#mount -c { disk/kfs -r -n root /dev/sdG0/fs } /n/local # ream
 #disk/kfscmd -n root sync
 #disk/mkfs -v -r -s /n/cd/ -d /n/local/ <{ echo + }
 #disk/kfscmd -n root sync
 
 # starting inferno already installed to a disk
-mount -c { disk/kfs -n root /dev/sdG0/fs } /n/local
+mount -c { disk/kfs -D -n root /dev/sdG0/fs } /n/local
 disk/kfscmd -n root sync
 bind -b /n/local/dis /dis
 bind -a -c /n/local/ /
+disk/mkfs -v -s /n/cd/ -d /n/local/ <{ echo + }
 
 sh -n
--- a/os/init/simple.b
+++ b/os/init/simple.b
@@ -30,22 +30,23 @@
 	sys->print("Welcome to Inferno...\n");
 
 	# set up basic devices, ignoring errors
-	sys->bind("#d", "/fd", Sys->MREPL);
+	sys->bind("#d", "/fd", Sys->MREPL);		# dup(3)
 	sys->bind("#S", "/dev", sys->MAFTER);	# Disks
-#	sys->bind("#l", "/net", sys->MAFTER);	# Network interfaces - hangs this program now
-#	sys->bind("#I", "/net", sys->MAFTER);	# IP
+	sys->bind("#l", "/net", sys->MAFTER);	# Network interfaces - hangs this program now
+	sys->bind("#I", "/net", sys->MAFTER);	# IP
 	sys->bind("#p", "/prog", sys->MREPL);	# prog device
 	sys->bind("#t", "/dev", sys->MAFTER);	# serial line
 	sys->bind("#c", "/dev", sys->MAFTER);	# console device
-#	sys->bind("#P","/dev",sys->MAFTER);
-#	sys->bind("#P/realmode","/dev",sys->MAFTER);	# arch
-#	sys->bind("#P/realmodemem","/dev",sys->MAFTER);
-	sys->bind("#i", "/dev", sys->MREPL);	# draw device
+	sys->bind("#e", "/env", sys->MAFTER);	# env
+	sys->bind("#P","/dev",sys->MAFTER);		# arch
+#	sys->bind("#P/realmode","/dev",sys->MAFTER); # not in the arch(3). What is this for?
+#	sys->bind("#P/realmodemem","/dev",sys->MAFTER);# not in the arch(3). What is this for?
+#	sys->bind("#i", "/dev", sys->MREPL);	# draw device
 #	sys->bind("#v","/dev",sys->MAFTER);     # VGA
-#	sys->bind("#m","/dev",sys->MAFTER);     # pointer/mouse
-#	sys->bind("#W","/dev",sys->MAFTER);	# Flash
+	sys->bind("#m","/dev",sys->MAFTER);     # pointer/mouse
+#	sys->bind("#W","/dev",sys->MAFTER);		# Flash
 #	sys->bind("#O", "/dev", sys->MAFTER);	# Modem
-#	sys->bind("#T","/dev",sys->MAFTER);	# Touchscreen
+#	sys->bind("#T","/dev",sys->MAFTER);		# Touchscreen
 
 	#sys->print("after the binds\n");
 	sh := load Sh "/dis/sh.dis";