Build release CD based on new boot.
Also add stuff for usb stick and hdemu.
This commit is contained in:
parent
3f2ab5b34b
commit
5a46076652
3 changed files with 75 additions and 56 deletions
|
@ -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
|
||||
|
|
|
@ -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 <<END_BOOT_CFG
|
||||
menu=Regular MINIX 3:multiboot /kernel bootcd=1 cdproberoot=1 rootdevname=ram disable=inet
|
||||
menu=Drop to boot prompt:prompt
|
||||
clear=1
|
||||
timeout=10
|
||||
default=1
|
||||
load=/mod01_ds
|
||||
load=/mod02_rs
|
||||
load=/mod03_pm
|
||||
load=/mod04_sched
|
||||
load=/mod05_vfs
|
||||
load=/mod06_memory
|
||||
load=/mod07_log
|
||||
load=/mod08_tty
|
||||
load=/mod09_mfs
|
||||
load=/mod10_vm
|
||||
load=/mod11_pfs
|
||||
load=/mod12_init
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
END_BOOT_CFG
|
||||
}
|
||||
|
||||
|
||||
hdemu_root_changes()
|
||||
{
|
||||
$RELEASEDIR/usr/bin/installboot_minix -d $TMPDISKROOT \
|
||||
$RELEASEDIR/usr/mdec/bootblock boot/boot
|
||||
echo \
|
||||
'bootcd=2
|
||||
disable=inet
|
||||
bios_wini=yes
|
||||
bios_remap_first=1
|
||||
ramimagedev=c0d7p0s0
|
||||
bootbig(1, Regular MINIX 3) { image=/boot/image_big; boot }
|
||||
main() { trap 10000 boot ; menu; }
|
||||
save' | $RELEASEDIR/usr/bin/edparams $TMPDISKROOT
|
||||
$RELEASEDIR/usr/sbin/installboot_nbsd $TMPDISKROOT \
|
||||
$RELEASEDIR/usr/mdec/bootxx_minixfs3
|
||||
|
||||
cat >$RELEASEMNTDIR/boot.cfg <<END_BOOT_CFG
|
||||
menu=Regular MINIX 3:load_mods /boot/minix_default/mod*;multiboot /boot/minix_default/kernel bootcd=2 disable=inet bios_wini=yes bios_remap_first=1 ramimagedev=c0d7p0s0
|
||||
menu=Drop to boot prompt:prompt
|
||||
clear=1
|
||||
timeout=10
|
||||
default=1
|
||||
END_BOOT_CFG
|
||||
}
|
||||
|
||||
usb_root_changes()
|
||||
{
|
||||
$RELEASEDIR/usr/bin/installboot_minix -d $TMPDISKROOT \
|
||||
$RELEASEDIR/usr/mdec/bootblock boot/boot
|
||||
$RELEASEDIR/usr/sbin/installboot_nbsd $TMPDISKROOT \
|
||||
$RELEASEDIR/usr/mdec/bootxx_minixfs3
|
||||
echo \
|
||||
'bios_wini=yes
|
||||
bios_remap_first=1
|
||||
rootdev=c0d7p0s0
|
||||
bootbig(1, Regular MINIX 3) { image=/boot/image_big; 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' | $RELEASEDIR/usr/bin/edparams $TMPDISKROOT
|
||||
cat >$RELEASEMNTDIR/boot.cfg <<END_BOOT_CFG
|
||||
menu=Regular MINIX 3:load_mods /boot/minix_default/mod*;multiboot /boot/minix_default/kernel bios_wini=yes bios_remap_first=1 rootdevname=c0d7p0s0
|
||||
menu=Drop to boot prompt:prompt
|
||||
clear=1
|
||||
timeout=10
|
||||
default=1
|
||||
END_BOOT_CFG
|
||||
}
|
||||
|
||||
copy_local_packages()
|
||||
|
|
|
@ -53,7 +53,7 @@ RELEASEDIR=/usr/r-staging
|
|||
RELEASEMNTDIR=/usr/r
|
||||
RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages
|
||||
|
||||
IMAGE=../boot/cdbootblock/cdbootblock
|
||||
IMAGE=/usr/mdec/bootxx_cd9660
|
||||
ROOTIMAGE=rootimage
|
||||
CDFILES=/usr/tmp/cdreleasefiles
|
||||
sh tell_config OS_RELEASE . OS_VERSION >/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
|
||||
|
||||
|
|
Loading…
Reference in a new issue