From 5a4607665251f8969532df8ad0ee4a47ed926c70 Mon Sep 17 00:00:00 2001 From: Evgeniy Ivanov Date: Thu, 2 Feb 2012 15:02:34 +0400 Subject: [PATCH] Build release CD based on new boot. Also add stuff for usb stick and hdemu. --- tools/chrootmake.sh | 15 ++----- tools/release.functions | 92 ++++++++++++++++++++++++++--------------- tools/release.sh | 24 +++++------ 3 files changed, 75 insertions(+), 56 deletions(-) diff --git a/tools/chrootmake.sh b/tools/chrootmake.sh index b1c2148d9..cb91c7581 100755 --- a/tools/chrootmake.sh +++ b/tools/chrootmake.sh @@ -8,20 +8,13 @@ then make $@ exit $? fi -make world +CC=clang make world cd tools rm revision -rm /boot/image/* -rm -f /boot/kernel/* # on old systems might not be present -rm -rf /boot/modules/* # same as above -make install -cp /boot/image/* /boot/image_big # Make big image accessible by this name -cp ../boot/boot/boot /boot/boot -cp ../sys/arch/i386/stand/boot/biosboot/boot_monitor / -CC=clang make cleandepend clean depend image +rm -rf /boot/minix/* # on old systems might not be present CC=clang make install -cp /boot/kernel/* /boot/kernel_default -cp -rf /boot/modules/* /boot/modules_default +cp ../sys/arch/i386/stand/boot/biosboot/boot_monitor / +cp -rf /boot/minix/* /boot/minix_default cd /usr/src if [ $MAKEMAP -ne 0 ]; then find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt diff --git a/tools/release.functions b/tools/release.functions index c95dd6af0..c59d4aad7 100644 --- a/tools/release.functions +++ b/tools/release.functions @@ -12,7 +12,7 @@ make_hdimage() # installboot -m needs at least 1KB dd < /dev/zero >tmpimage count=2 partition -fm tmpimage 2 81:$rootsects* 0:0 81:$usrsects - installboot_minix -m tmpimage /usr/mdec/masterboot + installboot_nbsd -m tmpimage /usr/mdec/mbr dd < tmpimage > subpart count=1 primsects=`expr 1 + $rootsects + $usrsects` @@ -26,7 +26,7 @@ make_hdimage() dd < /dev/zero count=$padsects } > hdimage partition -m hdimage 81:`expr $primsects + $padsects`* - installboot_minix -m hdimage /usr/mdec/masterboot + installboot_nbsd -m hdimage /usr/mdec/mbr } retrieve() @@ -46,46 +46,72 @@ retrieve() cd_root_changes() { - edparams $TMPDISKROOT 'unset bootopts; -unset servers; -unset rootdev; -unset leader; -unset image; -disable=inet; -bootcd=1; -cdproberoot=1; -ata_id_timeout=2; -bootbig(1, Regular MINIX 3) { unset image; boot } -leader() { echo \n--- Welcome to MINIX 3. This is the boot monitor. ---\n\nChoose an option from the menu or press ESC if you need to do anything special.\nOtherwise I will boot with my defaults in 10 seconds.\n\n }; main(){trap 10000 boot; menu; }; -save' +cat >$CDFILES/boot.cfg <$RELEASEMNTDIR/boot.cfg <$RELEASEMNTDIR/boot.cfg </tmp/rel.$$ @@ -272,8 +272,6 @@ fi echo " * Chroot build" chroot $RELEASEDIR "PATH=/$XBIN:/usr/pkg/bin MAKEMAP=$MAKEMAP sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1 -# Copy built images for cd booting -cp $RELEASEDIR/boot/image_big image echo " * Chroot build done" echo " * Removing bootstrap files" rm -rf $RELEASEDIR/$XBIN @@ -355,9 +353,6 @@ expr `df $TMPDISKUSR | tail -1 | awk '{ print $4 }'` - $extrakb >$RELEASEMNTDIR/ echo " * Unmounting $TMPDISKUSR from $RELEASEMNTDIR/usr" umount $TMPDISKUSR || exit -echo " * Unmounting $TMPDISKROOT from $RELEASEMNTDIR" -umount $TMPDISKROOT || exit -rm -r $RELEASEMNTDIR echo " * Making image bootable" if [ "$USB" -ne 0 ] @@ -370,10 +365,10 @@ else cd_root_changes fi -# Clean up: RELEASEDIR no longer needed -rm -r $RELEASEDIR +echo " * Unmounting $TMPDISKROOT from $RELEASEMNTDIR" +umount $TMPDISKROOT || exit +rm -r $RELEASEMNTDIR -(cd ../boot && make) dd if=$TMPDISKROOT of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS cp release/cd/* $CDFILES || true echo "This is Minix version $version_pretty prepared `date`." >$CDFILES/VERSION.TXT @@ -389,8 +384,9 @@ fi if [ "$USB" -ne 0 ]; then mv $bootimage $IMG else - cp ../boot/boot/boot $CDFILES - writeisofs -s0x0 -l MINIX -a boot -b $bootimage $boottype $CDFILES $IMG || exit 1 + cp $RELEASEDIR/usr/mdec/boot_monitor $CDFILES/boot + cp -rf $RELEASEDIR/boot/minix_default/* $CDFILES/ + writeisofs -s0x0 -l MINIX -B $bootimage $boottype $CDFILES $IMG || exit 1 if [ "$HDEMU" -eq 0 ] then @@ -406,12 +402,16 @@ else dd if=$TMPDISKUSR bs=$BS count=$USRBLOCKS ) >m mv m $IMG # Make CD partition table - installboot_minix -m $IMG /usr/mdec/masterboot + installboot_nbsd -m $IMG /usr/mdec/mbr # Make sure there is no hole..! Otherwise the ISO format is # unreadable. partition -m $IMG 0 81:$isosects 81:$ROOTSECTS 81:$USRSECTS fi fi + +# Clean up: RELEASEDIR no longer needed +rm -r $RELEASEDIR + echo "${ZIP}ping $IMG" $ZIP -f $IMG -- 2.44.0