ref: bafa56df02a05521bacac29cdb817b971fd3a700
parent: d17435cbcbc9b99a6b162e87825778bb61b09858
author: stanley lieber <[email protected]>
date: Tue May 31 13:45:47 EDT 2011
/sys/lib/9build, /sys/lib/9cdbuild: add build scripts; fix when broken
--- /dev/null
+++ b/sys/lib/9build
@@ -1,0 +1,54 @@
+#!/bin/rc
+
+9FRONT=/dist/plan9front
+
+# update plain files
+echo dircp $9FRONT/386/include /386/include
+dircp $9FRONT/386/include /386/include
+echo dircp $9FRONT/rc/bin /rc/bin
+dircp $9FRONT/rc/bin /rc/bin
+echo dircp $9FRONT/sys/games /sys/games
+dircp $9FRONT/sys/games /sys/games
+echo dircp $9FRONT/sys/include /sys/include
+dircp $9FRONT/sys/include /sys/include
+echo dircp $9FRONT/sys/lib /sys/lib
+dircp $9FRONT/sys/lib /sys/lib
+echo dircp $9FRONT/sys/man /sys/man
+dircp $9FRONT/sys/man /sys/man
+
+# prepare the enviroment
+bind -c $9FRONT/sys/src /sys/src
+
+# build everything
+cd /sys/src
+mk clean
+mk install
+mk clean
+
+# use new binaries
+bind /$objtype/bin /bin
+bind -a /rc/bin /bin
+
+# build manpage indices
+cd /sys/man
+mk
+
+# build bootloader
+cd /sys/src/boot/pc
+mk install
+mk clean
+
+# build cd kernel
+cd /sys/src/9/pc
+mk 'CONF=pcf' install
+mk clean
+mk 'CONF=pccpuf' install
+mk clean
+
+echo
+echo 'Copy the new bootloader and kernels to the 9fat partition with the following commands:'
+echo '9fs 9fat'
+echo 'cp /386/9bootfat /n/9fat'
+echo 'cp /386/9pcf /n/9fat'
+echo 'cp /386/9pccpuf /n/9fat'
+echo
--- /dev/null
+++ b/sys/lib/9cdbuild
@@ -1,0 +1,43 @@
+#!/bin/rc
+
+9FRONT=/dist/plan9front
+
+# prepare the enviroment
+bind -c $9FRONT /n/src9
+
+# create empty directories (hg wont track them for us)
+cd /n/src9
+. sys/lib/rootstub
+
+# bind stuff to /
+for(i in $objtype rc acme mail cron sys lib){bind -c /n/src9/$i /$i}
+
+# build everything
+cd /sys/src
+mk nuke
+mk install
+mk clean
+
+# use new binaries
+bind /$objtype/bin /bin
+bind -a /rc/bin /bin
+
+# build manpage indices
+cd /sys/man
+mk
+
+# build bootloader
+cd /sys/src/boot/pc
+mk install
+mk clean
+
+# build cd kernel
+cd /sys/src/9/pc
+mk 'CONF=pcf' install
+mk clean
+mk 'CONF=pccpuf' install
+mk clean
+
+# build /tmp/9front.iso
+cd /sys/lib/dist
+mk cd