Build release CD based on new boot.
Also add stuff for usb stick and hdemu.
This commit is contained in:
		
							parent
							
								
									3f2ab5b34b
								
							
						
					
					
						commit
						5a46076652
					
				| @ -8,20 +8,13 @@ then	make $@ | |||||||
| 	exit $? | 	exit $? | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| make world | CC=clang make world | ||||||
| cd tools  | cd tools  | ||||||
| rm revision | rm revision | ||||||
| rm /boot/image/* | rm -rf /boot/minix/* # on old systems might not be present | ||||||
| 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 |  | ||||||
| CC=clang make install | CC=clang make install | ||||||
| cp /boot/kernel/* /boot/kernel_default | cp ../sys/arch/i386/stand/boot/biosboot/boot_monitor / | ||||||
| cp -rf /boot/modules/* /boot/modules_default | cp -rf /boot/minix/* /boot/minix_default | ||||||
| cd /usr/src  | cd /usr/src  | ||||||
| if [ $MAKEMAP -ne 0 ]; then | if [ $MAKEMAP -ne 0 ]; then | ||||||
| 	find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt | 	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  | 	# installboot -m needs at least 1KB  | ||||||
| 	dd < /dev/zero >tmpimage count=2 | 	dd < /dev/zero >tmpimage count=2 | ||||||
| 	partition -fm tmpimage 2 81:$rootsects* 0:0 81:$usrsects | 	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 | 	dd < tmpimage > subpart count=1 | ||||||
| 
 | 
 | ||||||
| 	primsects=`expr 1 + $rootsects + $usrsects` | 	primsects=`expr 1 + $rootsects + $usrsects` | ||||||
| @ -26,7 +26,7 @@ make_hdimage() | |||||||
| 		dd < /dev/zero count=$padsects | 		dd < /dev/zero count=$padsects | ||||||
| 	} > hdimage | 	} > hdimage | ||||||
| 	partition -m hdimage 81:`expr $primsects + $padsects`* | 	partition -m hdimage 81:`expr $primsects + $padsects`* | ||||||
| 	installboot_minix -m hdimage /usr/mdec/masterboot | 	installboot_nbsd -m hdimage /usr/mdec/mbr | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| retrieve() | retrieve() | ||||||
| @ -46,46 +46,72 @@ retrieve() | |||||||
| 
 | 
 | ||||||
| cd_root_changes() | cd_root_changes() | ||||||
| { | { | ||||||
| 	edparams $TMPDISKROOT 'unset bootopts; | cat >$CDFILES/boot.cfg <<END_BOOT_CFG | ||||||
| unset servers; | menu=Regular MINIX 3:multiboot /kernel bootcd=1 cdproberoot=1 rootdevname=ram disable=inet | ||||||
| unset rootdev; | menu=Drop to boot prompt:prompt | ||||||
| unset leader; | clear=1 | ||||||
| unset image; | timeout=10 | ||||||
| disable=inet; | default=1 | ||||||
| bootcd=1; | load=/mod01_ds | ||||||
| cdproberoot=1; | load=/mod02_rs | ||||||
| ata_id_timeout=2; | load=/mod03_pm | ||||||
| bootbig(1, Regular MINIX 3) { unset image; boot } | load=/mod04_sched | ||||||
| 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; }; | load=/mod05_vfs | ||||||
| save'  | 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() | hdemu_root_changes() | ||||||
| { | { | ||||||
| 	$RELEASEDIR/usr/bin/installboot_minix -d $TMPDISKROOT \ | 	$RELEASEDIR/usr/sbin/installboot_nbsd $TMPDISKROOT \ | ||||||
| 		$RELEASEDIR/usr/mdec/bootblock boot/boot | 		$RELEASEDIR/usr/mdec/bootxx_minixfs3 | ||||||
| 	echo \ | 
 | ||||||
| 'bootcd=2 | cat >$RELEASEMNTDIR/boot.cfg <<END_BOOT_CFG | ||||||
| disable=inet | 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 | ||||||
| bios_wini=yes | menu=Drop to boot prompt:prompt | ||||||
| bios_remap_first=1 | clear=1 | ||||||
| ramimagedev=c0d7p0s0 | timeout=10 | ||||||
| bootbig(1, Regular MINIX 3) { image=/boot/image_big; boot } | default=1 | ||||||
| main() { trap 10000 boot ; menu; } | END_BOOT_CFG | ||||||
| save'	| $RELEASEDIR/usr/bin/edparams $TMPDISKROOT |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| usb_root_changes() | usb_root_changes() | ||||||
| { | { | ||||||
| 	$RELEASEDIR/usr/bin/installboot_minix -d $TMPDISKROOT \ | 	$RELEASEDIR/usr/sbin/installboot_nbsd $TMPDISKROOT \ | ||||||
| 		$RELEASEDIR/usr/mdec/bootblock boot/boot | 		$RELEASEDIR/usr/mdec/bootxx_minixfs3 | ||||||
| 	echo \ | 	echo \ | ||||||
| 'bios_wini=yes | cat >$RELEASEMNTDIR/boot.cfg <<END_BOOT_CFG | ||||||
| bios_remap_first=1 | menu=Regular MINIX 3:load_mods /boot/minix_default/mod*;multiboot /boot/minix_default/kernel bios_wini=yes bios_remap_first=1 rootdevname=c0d7p0s0 | ||||||
| rootdev=c0d7p0s0 | menu=Drop to boot prompt:prompt | ||||||
| bootbig(1, Regular MINIX 3) { image=/boot/image_big; boot } | clear=1 | ||||||
| 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; }; | timeout=10 | ||||||
| save'	| $RELEASEDIR/usr/bin/edparams $TMPDISKROOT | default=1 | ||||||
|  | END_BOOT_CFG | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| copy_local_packages() | copy_local_packages() | ||||||
|  | |||||||
| @ -53,7 +53,7 @@ RELEASEDIR=/usr/r-staging | |||||||
| RELEASEMNTDIR=/usr/r | RELEASEMNTDIR=/usr/r | ||||||
| RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages | RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages | ||||||
| 
 | 
 | ||||||
| IMAGE=../boot/cdbootblock/cdbootblock | IMAGE=/usr/mdec/bootxx_cd9660 | ||||||
| ROOTIMAGE=rootimage | ROOTIMAGE=rootimage | ||||||
| CDFILES=/usr/tmp/cdreleasefiles | CDFILES=/usr/tmp/cdreleasefiles | ||||||
| sh tell_config OS_RELEASE . OS_VERSION >/tmp/rel.$$ | sh tell_config OS_RELEASE . OS_VERSION >/tmp/rel.$$ | ||||||
| @ -272,8 +272,6 @@ fi | |||||||
| 
 | 
 | ||||||
| echo " * Chroot build" | echo " * Chroot build" | ||||||
| chroot $RELEASEDIR "PATH=/$XBIN:/usr/pkg/bin MAKEMAP=$MAKEMAP sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1 | 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 " * Chroot build done" | ||||||
| echo " * Removing bootstrap files" | echo " * Removing bootstrap files" | ||||||
| rm -rf $RELEASEDIR/$XBIN | rm -rf $RELEASEDIR/$XBIN | ||||||
| @ -355,9 +353,6 @@ expr `df $TMPDISKUSR | tail -1 | awk '{ print $4 }'` - $extrakb >$RELEASEMNTDIR/ | |||||||
| 
 | 
 | ||||||
| echo " * Unmounting $TMPDISKUSR from $RELEASEMNTDIR/usr" | echo " * Unmounting $TMPDISKUSR from $RELEASEMNTDIR/usr" | ||||||
| umount $TMPDISKUSR || exit | umount $TMPDISKUSR || exit | ||||||
| echo " * Unmounting $TMPDISKROOT from $RELEASEMNTDIR" |  | ||||||
| umount $TMPDISKROOT || exit |  | ||||||
| rm -r $RELEASEMNTDIR |  | ||||||
| 
 | 
 | ||||||
| echo " * Making image bootable" | echo " * Making image bootable" | ||||||
| if [ "$USB" -ne 0 ] | if [ "$USB" -ne 0 ] | ||||||
| @ -370,10 +365,10 @@ else | |||||||
| 	cd_root_changes | 	cd_root_changes | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Clean up: RELEASEDIR no longer needed | echo " * Unmounting $TMPDISKROOT from $RELEASEMNTDIR" | ||||||
| rm -r $RELEASEDIR | umount $TMPDISKROOT || exit | ||||||
|  | rm -r $RELEASEMNTDIR | ||||||
| 
 | 
 | ||||||
| (cd ../boot && make) |  | ||||||
| dd if=$TMPDISKROOT of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS | dd if=$TMPDISKROOT of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS | ||||||
| cp release/cd/* $CDFILES || true | cp release/cd/* $CDFILES || true | ||||||
| echo "This is Minix version $version_pretty prepared `date`." >$CDFILES/VERSION.TXT | echo "This is Minix version $version_pretty prepared `date`." >$CDFILES/VERSION.TXT | ||||||
| @ -389,8 +384,9 @@ fi | |||||||
| if [ "$USB" -ne 0 ]; then | if [ "$USB" -ne 0 ]; then | ||||||
| 	mv $bootimage $IMG | 	mv $bootimage $IMG | ||||||
| else | else | ||||||
| 	cp ../boot/boot/boot $CDFILES | 	cp $RELEASEDIR/usr/mdec/boot_monitor $CDFILES/boot | ||||||
| 	writeisofs -s0x0 -l MINIX -a boot -b $bootimage $boottype $CDFILES $IMG || exit 1 | 	cp -rf $RELEASEDIR/boot/minix_default/* $CDFILES/ | ||||||
|  | 	writeisofs -s0x0 -l MINIX -B $bootimage $boottype $CDFILES $IMG || exit 1 | ||||||
| 
 | 
 | ||||||
| 	if [ "$HDEMU" -eq 0 ] | 	if [ "$HDEMU" -eq 0 ] | ||||||
| 	then | 	then | ||||||
| @ -406,12 +402,16 @@ else | |||||||
| 			dd if=$TMPDISKUSR bs=$BS count=$USRBLOCKS ) >m | 			dd if=$TMPDISKUSR bs=$BS count=$USRBLOCKS ) >m | ||||||
| 		mv m $IMG | 		mv m $IMG | ||||||
| 		# Make CD partition table | 		# 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 | 		# Make sure there is no hole..! Otherwise the ISO format is | ||||||
| 		# unreadable. | 		# unreadable. | ||||||
| 		partition -m $IMG 0 81:$isosects 81:$ROOTSECTS 81:$USRSECTS | 		partition -m $IMG 0 81:$isosects 81:$ROOTSECTS 81:$USRSECTS | ||||||
| 	fi | 	fi | ||||||
| fi | fi | ||||||
|  | 
 | ||||||
|  | # Clean up: RELEASEDIR no longer needed | ||||||
|  | rm -r $RELEASEDIR | ||||||
|  | 
 | ||||||
| echo "${ZIP}ping $IMG" | echo "${ZIP}ping $IMG" | ||||||
| $ZIP -f $IMG | $ZIP -f $IMG | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Evgeniy Ivanov
						Evgeniy Ivanov