From 7e4b6693938b65846df17f41d3b5efd8d5449670 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 5 Jan 2018 08:41:46 +0100 Subject: /sys/lib/dist: split 9boot into 9bootproto, make *.386.iso and *.amd64.iso targets --- sys/lib/dist/cfg/plan9.ini | 1 - sys/lib/dist/mkfile | 69 ++++++++++++++++++++++++++++++---------------- 2 files changed, 46 insertions(+), 24 deletions(-) (limited to 'sys/lib/dist') diff --git a/sys/lib/dist/cfg/plan9.ini b/sys/lib/dist/cfg/plan9.ini index 00a68948c..c7acf7d22 100644 --- a/sys/lib/dist/cfg/plan9.ini +++ b/sys/lib/dist/cfg/plan9.ini @@ -3,4 +3,3 @@ cdboot=yes mouseport=ask monitor=ask vgasize=ask -bootfile=/386/9pc diff --git a/sys/lib/dist/mkfile b/sys/lib/dist/mkfile index 49e1d8eaf..5598fd7f8 100644 --- a/sys/lib/dist/mkfile +++ b/sys/lib/dist/mkfile @@ -1,20 +1,46 @@ -proto=/n/src9/sys/lib/sysconfig/proto/cdproto -iso=/tmp/9front.iso +proto=/n/src9/sys/lib/sysconfig/proto/distproto -cd:V: $iso +cd:V: /tmp/9front.386.iso.gz -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 +%.gz:D: % + gzip -9 < $prereq > $target + +%.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 + } -%.iso: $proto +%.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 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){ dd -if /dev/zero -bs 2048 -count 1024 >> $target disk/partfs -m /n/partfs $target @@ -37,17 +63,6 @@ binds:V: 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 @{rfork n mk binds @@ -80,3 +95,11 @@ binds:V: while(test -e /srv/$s.cmd) sleep 1 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 -- cgit v1.2.3