1 proto=/n/src9/sys/lib/sysconfig/proto/distproto
3 cd:V: /tmp/9front.386.iso.gz
6 gzip -9 < $prereq > $target
11 kernel=/n/src9/$objtype/9pc
12 mk $target.$pid.pc.iso
13 mv $target.$pid.pc.iso $target
19 kernel=/n/src9/$objtype/9pc64
20 mk $target.$pid.pc.iso
21 mv $target.$pid.pc.iso $target
27 bootcode=/sys/src/boot/bcm/^(bootcode.bin fixup_cd.dat start_cd.elf LICENCE.broadcom)
28 kernels=/n/src9/$objtype/^(9pi 9pi2)
47 fatfiles=(/env/config.txt /env/cmdline.txt $bootcode $kernels)
48 mb=1885 # storage vendors idea of 2GB
50 mv $target.$pid.disk $target
56 bootcode=/sys/src/boot/bcm/^(bootcode.bin fixup_cd.dat start_cd.elf fixup4cd.dat start4cd.elf bcm2711-rpi-4-b.dtb LICENCE.broadcom)
57 kernel=/n/src9/$objtype/^(9pi3 9pi4)
74 fatfiles=(/env/config.txt /env/cmdline.txt $bootcode $kernel)
75 mb=1885 # storage vendors idea of 2GB
77 mv $target.$pid.disk $target
83 kernel=/n/src9/$objtype/9zynq
84 echo 'bootfile='^`{basename $kernel} > /env/plan9.ini
85 fatfiles=(/env/plan9.ini $kernel)
86 mb=1885 # storage vendors idea of 2GB
88 mv $target.$pid.disk $target
91 %.pc.iso:D: $proto /n/src9/sys/lib/sysconfig/proto/9bootproto $kernel
94 {grep -v '^bootfile=' /n/src9/cfg/plan9.ini
95 echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}} > /env/plan9.ini
96 bind /env/plan9.ini /n/src9/cfg/plan9.ini
97 disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat \
98 -p <{cat $proto /n/src9/sys/lib/sysconfig/proto/9bootproto} \
99 -s /n/src9 -v 'Plan 9 Front ('^$objtype^')' $target
100 if(test -r /n/src9/386/9boothyb){
101 dd -if /dev/zero -bs 2048 -count 1024 >> $target
102 disk/partfs -m /n/partfs $target
104 disk/mbr -m /n/src9/386/mbr $disk/data
105 @{echo a p1 '$-1' '$'
109 echo q} | disk/fdisk -b $disk/data
110 disk/format -b /n/src9/386/pbs -xd -t hard $disk/esp
112 dossrv -f $disk/esp $s
113 mount -c /srv/$s /n/esp
114 cp /n/src9/386/9boothyb /n/esp/9bootfat
116 mkdir /n/esp/efi/boot
117 cp /n/src9/386/boot*.efi /n/esp/efi/boot
122 %.disk:D: $proto $fatfiles
126 dd -if /dev/zero -of $target -bs 1048576 -oseek $mb -count 1
127 s=`{basename $target}
128 disk/partfs -m /n/$s $target
131 if(~ $target *.pi.img.* *.pi3.img.*){
141 } | disk/fdisk -b $d/data
142 disk/prep -bw -a^(nvram fs) $d/plan9
143 disk/format -d $d/dos $fatfiles
146 disk/fdisk -baw $d/data
147 disk/prep -bw -a^(9fat nvram fs) $d/plan9
148 disk/format -d -r 2 $d/9fat $fatfiles
150 hjfs -f $d/fs -n $s -S -r
153 echo create /dist sys sys 775 d
154 echo create /usr sys sys 775 d
157 echo newuser adm +$user
158 echo newuser sys +$user
159 echo newuser upas +$user
163 mount -N -c /srv/$s /n/newfs
164 disk/mkfs -z 4096 -U -s /n/src9 -d /n/newfs $proto
165 echo sync >> /srv/$s.cmd
166 echo halt >> /srv/$s.cmd
167 while(test -e /srv/$s.cmd) sleep 1
172 test -d /n/src9/.git && bind /n/src9 /n/src9/dist/plan9front
174 bind mail/lib /n/src9/mail/lib
175 bind ndb /n/src9/lib/ndb
176 bind -a adm/timezone /n/src9/adm/timezone
177 aux/stub -d /n/src9/usr