ref: 8d0725d57a988ed0ed2ef0a33e0cebe48a85b5db
parent: f38ffb2e9b569b388bfa44d08eab369509359ab7
author: 9ferno <gophone2015@gmail.com>
date: Fri Sep 10 12:52:01 EDT 2021
removed the need for a /386 directory
--- a/lib/proto/9boot
+++ b/lib/proto/9boot
@@ -1,16 +1,18 @@
# 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
-386 d775
- 9bootfat 664
- 9boothyb 664
- 9bootiso 664
- 9bootpxe 664
- efiboot.fat 664
- bootia32.efi 664
- bootx64.efi 664
- mbr 664
- pbs 664
-
+Inferno
+ 386 d775
+ 9bootfat 664
+ 9boothyb 664
+ 9bootiso 664
+ 9bootpxe 664
+ efiboot.fat 664
+ bootia32.efi 664
+ bootx64.efi 664
+ mbr 664
+ pbs 664
cfg d775
plan9.ini 664
--- a/lib/proto/inferno
+++ b/lib/proto/inferno
@@ -971,6 +971,7 @@
deflate.b
devpointer.b
dhcpclient.b
+ dhcpserver.b
dial.b
dialog.b
dict.b
@@ -1580,6 +1581,7 @@
deflate.dis
devpointer.dis
dhcpclient.dis
+ dhcpserver.dis
dial.dis
dialog.dis
dict.dis
@@ -2209,7 +2211,8 @@
dbm.m
debug.m
devpointer.m
- dhcp.m
+ dhcpclient.m
+ dhcpserver.m
dial.m
dialog.m
dict.m
--- a/lib/proto/os
+++ b/lib/proto/os
@@ -1,6 +1,5 @@
Inferno
386
- ipc 664
bin
include
*
--- a/mkfile
+++ b/mkfile
@@ -243,8 +243,11 @@
mv $target.$pid.pc.iso $target
}
-# TODO
-# correct/fix the warnings due to the proto files
+# 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/
+# TODO correct/fix the warnings due to the proto files
%.pc.iso:D: install kernelinstall
@{rfork n
mk binds
@@ -255,42 +258,54 @@
#echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}
echo 'bootfile=ipc64'
} > /env/plan9.ini
- aux/stub /n/src9/cfg/plan9.ini
bind /env/plan9.ini /n/src9/cfg/plan9.ini
- aux/stub /n/src9/ipc64
- bind $kernel /n/src9/ipc64
cat /n/src9/cfg/plan9.ini
- disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat \
- -p <{echo ipc64; cat /n/src9/lib/proto/^(9boot inferno os src utils)} \
+ 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);} \
-s /n/src9 -v 'Inferno 9 Front ('^$objtype^')' $target
- if(test -r /n/src9/386/9boothyb){
+ if(test -r /n/src9/Inferno/386/9boothyb){
dd -if /dev/zero -bs 2048 -count 1024 >> $target
disk/partfs -m /n/partfs $target
disk=/n/partfs/sdXX
- disk/mbr -m /n/src9/386/mbr $disk/data
+ disk/mbr -m /n/src9/Inferno/386/mbr $disk/data
@{echo a p1 '$-1' '$'
echo t p1 ESP
echo A p1
echo w
echo q} | disk/fdisk -b $disk/data
- disk/format -b /n/src9/386/pbs -xd -t hard $disk/esp
+ disk/format -b /n/src9/Inferno/386/pbs -xd -t hard $disk/esp
s = esp.$pid
dossrv -f $disk/esp $s
mount -c /srv/$s /n/esp
- cp /n/src9/386/9boothyb /n/esp/9bootfat
+ cp /n/src9/Inferno/386/9boothyb /n/esp/9bootfat
mkdir /n/esp/efi
mkdir /n/esp/efi/boot
- cp /n/src9/386/boot*.efi /n/esp/efi/boot
+ cp /n/src9/Inferno/386/boot*.efi /n/esp/efi/boot
unmount /n/esp
rm -f /srv/$s
}}
+# backup kernel 9pc64 when building on 9front
+# stub directories needed by proto files
binds:V:
bind $root /n/src9
- bind -a $root/Inferno /n/src9
aux/stub -d /n/src9/cfg
- aux/stub /n/src9/amd64/9pc64
- bind /root/amd64/9pc64 /n/src9/amd64/9pc64
+ aux/stub /n/src9/cfg/plan9.ini
+ aux/stub /n/src9/ipc64
+ bind $kernel /n/src9/ipc64
+ aux/stub /n/src9/9pc64
+ aux/stub /n/src9/9front/amd64/9pc64
+ test -f /root/amd64/9pc64 && { \
+ bind /root/amd64/9pc64 /n/src9/9front/amd64/9pc64
+ bind /root/amd64/9pc64 /n/src9/9pc64
+ } || {
+ bind /dev/null /n/src9/9front/amd64/9pc64
+ bind /dev/null /n/src9/9pc64
+ }
+ for(b in chan dev env net net.alt nvfs prof prog sys wrap){
+ aux/stub -d /n/src9/^$b
+ }
# ns
# obsolete rules to be deleted