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)
46 fatfiles=(/env/config.txt /env/cmdline.txt $bootcode $kernels)
47 mb=1919 # storage vendors idea of 2GB
49 mv $target.$pid.disk $target
55 kernel=/n/src9/$objtype/9zynq
56 echo 'bootfile='^`{basename $kernel} > /env/plan9.ini
57 fatfiles=(/env/plan9.ini $kernel)
58 mb=1919 # storage vendors idea of 2GB
60 mv $target.$pid.disk $target
63 %.pc.iso:D: $proto /n/src9/sys/lib/sysconfig/proto/9bootproto $kernel
66 {grep -v '^bootfile=' /n/src9/cfg/plan9.ini
67 echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}} > /env/plan9.ini
68 bind /env/plan9.ini /n/src9/cfg/plan9.ini
69 disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat \
70 -p <{cat $proto /n/src9/sys/lib/sysconfig/proto/9bootproto} \
71 -s /n/src9 -v 'Plan 9 Front ('^$objtype^')' $target
72 if(test -r /n/src9/386/9boothyb){
73 dd -if /dev/zero -bs 2048 -count 1024 >> $target
74 disk/partfs -m /n/partfs $target
76 disk/mbr -m /n/src9/386/mbr $disk/data
81 echo q} | disk/fdisk -b $disk/data
82 disk/format -b /n/src9/386/pbs -xd -t hard $disk/esp
84 dossrv -f $disk/esp $s
85 mount -c /srv/$s /n/esp
86 cp /n/src9/386/9boothyb /n/esp/9bootfat
89 cp /n/src9/386/boot*.efi /n/esp/efi/boot
94 %.disk:D: $proto $fatfiles
98 dd -if /dev/zero -of $target -bs 1048576 -oseek $mb -count 1
100 disk/partfs -m /n/$s $target
103 if(~ $target *.pi.img.*){
113 } | disk/fdisk -b $d/data
114 disk/prep -bw -a^(nvram fs) $d/plan9
115 disk/format -d $d/dos $fatfiles
118 disk/fdisk -baw $d/data
119 disk/prep -bw -a^(9fat nvram fs) $d/plan9
120 disk/format -d -r 2 $d/9fat $fatfiles
122 hjfs -f $d/fs -n $s -S -r
125 echo create /dist sys sys 775 d
126 echo create /usr sys sys 775 d
129 echo newuser adm +$user
130 echo newuser sys +$user
131 echo newuser upas +$user
135 mount -N -c /srv/$s /n/newfs
136 disk/mkfs -z 4096 -U -s /n/src9 -d /n/newfs $proto
137 echo sync >> /srv/$s.cmd
138 echo halt >> /srv/$s.cmd
139 while(test -e /srv/$s.cmd) sleep 1
144 test -d /n/src9/.hg && bind /n/src9 /n/src9/dist/plan9front
146 bind mail/lib /n/src9/mail/lib
147 bind ndb /n/src9/lib/ndb
148 bind -a adm/timezone /n/src9/adm/timezone