/sys/lib/9build, /sys/lib/9cdbuild: add build scripts; fix when broken

This commit is contained in:
stanley lieber 2011-05-31 17:45:47 +00:00
parent d17435cbcb
commit bafa56df02
2 changed files with 97 additions and 0 deletions

54
sys/lib/9build Executable file
View file

@ -0,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

43
sys/lib/9cdbuild Normal file
View file

@ -0,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