code: 9ferno

Download patch

ref: fbbc25e50e852ea7cc3c589f228f5fbf2fd383aa
parent: f167a2f5c1c4a71a5a091599ea3a3f625108b781
author: 9ferno <gophone2015@gmail.com>
date: Sat Sep 11 09:58:19 EDT 2021

use /plan9.ini instead of /cfg/plan9.ini

--- a/lib/proto/9boot
+++ b/lib/proto/9boot
@@ -1,6 +1,4 @@
 # copied from 9front /sys/lib/sysconfig/proto/9bootproto
-# cannot have /plan9.ini or /lib/plan9.ini as 9bootiso cannot find it
-#	leaving it as /cfg/plan9.ini for the cd and hybrid booting to work
 uid=sys
 gid=sys
 Inferno
@@ -14,5 +12,3 @@
 		bootx64.efi	664
 		mbr		664
 		pbs		664
-cfg	d775
-	plan9.ini	664
--- a/mkfile
+++ b/mkfile
@@ -244,9 +244,8 @@
 	}
 
 # 9boot iso.c is not able to read /Inferno/amd64/ipc64 but works fine with ipc64
-# 9boot iso.c needs /cfg/plan9.ini. Inferno's location for all configuration is /lib/
-#		but iso.c is not able to read the /lib/ directory
-# Hence, putting the kernels in the root directory of iso and plan9.ini in /cfg/
+#	it needs the filenames to be lower cased
+#	Hence, putting the kernels and plan9.ini in / as we do with fat partitions
 # TODO correct/fix the warnings due to the proto files
 %.pc.iso:D:	install kernelinstall
 	@{rfork n
@@ -258,8 +257,8 @@
 		#echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}
 		echo 'bootfile=ipc64'
 	} > /env/plan9.ini
-	bind /env/plan9.ini /n/src9/cfg/plan9.ini
-	cat /n/src9/cfg/plan9.ini
+	bind /env/plan9.ini /n/src9/plan9.ini
+	cat /n/src9/plan9.ini
 	disk/mk9660 -c9j -B Inferno/386/9bootiso -E Inferno/386/efiboot.fat \
 		-p <{echo ipc64; echo 9pc64; \
 				cat /n/src9/lib/proto/^(9boot inferno os src utils);} \
@@ -290,8 +289,7 @@
 # stub directories needed by proto files
 binds:V:
 	bind $root /n/src9
-	aux/stub -d /n/src9/cfg
-	aux/stub /n/src9/cfg/plan9.ini
+	aux/stub /n/src9/plan9.ini
 	aux/stub /n/src9/ipc64
 	bind $kernel /n/src9/ipc64
 	aux/stub /n/src9/9pc64
--- a/os/boot/efi/iso.c
+++ b/os/boot/efi/iso.c
@@ -220,7 +220,7 @@
 	close = isoclose;
 
 	if(fp != nil)
-		*fp = isoopen("/cfg/plan9.ini");
+		*fp = isoopen("plan9.ini");
 
 	return 0;
 }
--- a/os/boot/pc/iso.c
+++ b/os/boot/pc/iso.c
@@ -183,7 +183,7 @@
 	close(&ex);
 #endif
 
-	if(isowalk(f = &ex, drive, "/cfg/plan9.ini")){
+	if(isowalk(f = &ex, drive, "plan9.ini")){
 		print("no config\n");
 		f = 0;
 	}