ref: c7abd2e7be5f3f9aff60f18121d47da13e5b279d
dir: /bin/buildisos.rc/
#!/bin/rc -e rfork en rm -f /env/^(prev head rev log res release) home=/usr/build webfs cd $home/code/plan9front archs=(amd64 386 arm arm64 spim power64) www=$home/www/9front wwwt=$home/www/torrent . ./sys/lib/rootstub . ./sys/lib/rootbind # preclean cd /sys/src mk clean cd /sys/src/boot mk clean cd /sys/src/9 mk clean # test and install for cputype cd /sys/src mk nuke mk libs mk install mk test # build everything for(i in $archs)@{ rfork en objtype=$i bind -c /n/src9/$i /$i # user cd /sys/src mk nuke mk libs mk install # kernel switch($objtype){ case amd64 cd /sys/src/9/pc64 mk clean mk install mk clean case 386 cd /sys/src/9/pc mk clean mk install mk clean case arm cd /sys/src/9/bcm mk clean mk 'CONF=pi' install mk 'CONF=pi2' install mk clean case arm64 cd /sys/src/9/bcm64 mk clean mk 'CONF=pi3' install mk 'CONF=pi4' install mk clean cd /sys/src/9/imx8 mk clean mk 'CONF=reform' install mk clean cd /sys/src/9/arm64 mk install mk clean cd /sys/src/9/lx2k mk install mk clean case spim cd /sys/src/9/mt7688/ mk clean mk install mk clean } # bootloader switch($objtype){ case 386 amd64 cd /sys/src/boot/pc mk clean mk install mk clean cd /sys/src/boot/efi mk clean mk install mk clean case arm arm64 cd /sys/src/boot/bcm mk clean mk cd /sys/src/boot/reform mk clean mk cd /sys/src/boot/qemu mk clean mk cd /sys/src/boot/honeycomb mk clean mk } } # postclean cd /sys/src mk clean cd /sys/src/9 mk clean # make manpage indices cd /sys/man mk fn mkdist { mk $www/$release.$1.gz } cd /sys/lib/dist for(a in $archs){ switch($a){ case amd64 mkdist amd64.iso mkdist amd64.qcow2 case 386 mkdist 386.iso case arm mkdist pi.img case arm64 mkdist pi3.img mkdist reform.img mkdist arm64.qcow2 mkdist honeycomb.img } }