/sys/lib/dist: split 9boot into 9bootproto, make *.386.iso and *.amd64.iso targets
This commit is contained in:
parent
c197fede61
commit
7e4b669393
4 changed files with 61 additions and 25 deletions
1
sys/lib/dist/cfg/plan9.ini
vendored
1
sys/lib/dist/cfg/plan9.ini
vendored
|
@ -3,4 +3,3 @@ cdboot=yes
|
||||||
mouseport=ask
|
mouseport=ask
|
||||||
monitor=ask
|
monitor=ask
|
||||||
vgasize=ask
|
vgasize=ask
|
||||||
bootfile=/386/9pc
|
|
||||||
|
|
69
sys/lib/dist/mkfile
vendored
69
sys/lib/dist/mkfile
vendored
|
@ -1,20 +1,46 @@
|
||||||
proto=/n/src9/sys/lib/sysconfig/proto/cdproto
|
proto=/n/src9/sys/lib/sysconfig/proto/distproto
|
||||||
iso=/tmp/9front.iso
|
|
||||||
|
|
||||||
cd:V: $iso
|
cd:V: /tmp/9front.386.iso.gz
|
||||||
|
|
||||||
binds:V:
|
%.gz:D: %
|
||||||
test -d /n/src9/.hg && bind /n/src9 /n/src9/dist/plan9front
|
gzip -9 < $prereq > $target
|
||||||
bind cfg /n/src9/cfg
|
|
||||||
bind mail/lib /n/src9/mail/lib
|
|
||||||
bind ndb /n/src9/lib/ndb
|
|
||||||
bind -a adm/timezone /n/src9/adm/timezone
|
|
||||||
bind usr /n/src9/usr
|
|
||||||
|
|
||||||
%.iso: $proto
|
%.386.iso:
|
||||||
|
@{
|
||||||
|
objtype=386
|
||||||
|
kernel=/n/src9/$objtype/9pc
|
||||||
|
mk $target.$pid.pc.iso
|
||||||
|
mv $target.$pid.pc.iso $target
|
||||||
|
}
|
||||||
|
|
||||||
|
%.amd64.iso:
|
||||||
|
@{
|
||||||
|
objtype=amd64
|
||||||
|
kernel=/n/src9/$objtype/9pc64
|
||||||
|
mk $target.$pid.pc.iso
|
||||||
|
mv $target.$pid.pc.iso $target
|
||||||
|
}
|
||||||
|
|
||||||
|
%.zynq.img:
|
||||||
|
@{
|
||||||
|
objtype=arm
|
||||||
|
kernel=/n/src9/$objtype/9zynq
|
||||||
|
echo 'bootfile='^`{basename $kernel} > /env/plan9.ini
|
||||||
|
fatfiles=(/env/plan9.ini $kernel)
|
||||||
|
mb=1919 # storage vendors idea of 2GB
|
||||||
|
mk $target.$pid.disk
|
||||||
|
mv $target.$pid.disk $target
|
||||||
|
}
|
||||||
|
|
||||||
|
%.pc.iso:D: $proto /n/src9/sys/lib/sysconfig/proto/9bootproto /n/src9/cfg/plan9.ini $kernel
|
||||||
@{rfork n
|
@{rfork n
|
||||||
mk binds
|
mk binds
|
||||||
disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat -p $proto -s /n/src9 -v 'Plan 9 Front' $target
|
{grep -v '^bootfile=' /n/src9/cfg/plan9.ini
|
||||||
|
echo 'bootfile='^`{echo $kernel | sed 's!^/n/src9!!'}} > /env/plan9.ini
|
||||||
|
bind /env/plan9.ini /n/src9/cfg/plan9.ini
|
||||||
|
disk/mk9660 -c9j -B 386/9bootiso -E 386/efiboot.fat \
|
||||||
|
-p <{cat $proto /n/src9/sys/lib/sysconfig/proto/9bootproto} \
|
||||||
|
-s /n/src9 -v 'Plan 9 Front ('^$objtype^')' $target
|
||||||
if(test -r /n/src9/386/9boothyb){
|
if(test -r /n/src9/386/9boothyb){
|
||||||
dd -if /dev/zero -bs 2048 -count 1024 >> $target
|
dd -if /dev/zero -bs 2048 -count 1024 >> $target
|
||||||
disk/partfs -m /n/partfs $target
|
disk/partfs -m /n/partfs $target
|
||||||
|
@ -37,17 +63,6 @@ binds:V:
|
||||||
rm -f /srv/$s
|
rm -f /srv/$s
|
||||||
}}
|
}}
|
||||||
|
|
||||||
%.zynq.img:
|
|
||||||
@{
|
|
||||||
objtype=arm
|
|
||||||
kernel=/n/src9/$objtype/9zynq
|
|
||||||
echo 'bootfile='^`{basename $kernel} > /env/plan9.ini
|
|
||||||
fatfiles=(/env/plan9.ini $kernel)
|
|
||||||
mb=1919 # storage vendors idea of 2GB
|
|
||||||
mk $target.$pid.disk
|
|
||||||
mv $target.$pid.disk $target
|
|
||||||
}
|
|
||||||
|
|
||||||
%.disk:D: $proto $fatfiles
|
%.disk:D: $proto $fatfiles
|
||||||
@{rfork n
|
@{rfork n
|
||||||
mk binds
|
mk binds
|
||||||
|
@ -80,3 +95,11 @@ binds:V:
|
||||||
while(test -e /srv/$s.cmd) sleep 1
|
while(test -e /srv/$s.cmd) sleep 1
|
||||||
exit ''
|
exit ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binds:V:
|
||||||
|
test -d /n/src9/.hg && bind /n/src9 /n/src9/dist/plan9front
|
||||||
|
bind cfg /n/src9/cfg
|
||||||
|
bind mail/lib /n/src9/mail/lib
|
||||||
|
bind ndb /n/src9/lib/ndb
|
||||||
|
bind -a adm/timezone /n/src9/adm/timezone
|
||||||
|
bind usr /n/src9/usr
|
||||||
|
|
15
sys/lib/sysconfig/proto/9bootproto
Normal file
15
sys/lib/sysconfig/proto/9bootproto
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
cfg d775
|
||||||
|
plan9.ini 664
|
|
@ -8,7 +8,6 @@ adm d775 adm adm
|
||||||
timezone d775
|
timezone d775
|
||||||
*
|
*
|
||||||
cfg d775
|
cfg d775
|
||||||
plan9.ini
|
|
||||||
pxe d775
|
pxe d775
|
||||||
cron d775
|
cron d775
|
||||||
lib d775
|
lib d775
|
Loading…
Add table
Add a link
Reference in a new issue