2005-04-21 16:53:53 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
COPYITEMS="usr/src usr/bin bin usr/lib"
|
|
|
|
RELEASEDIR=/usr/r/release
|
|
|
|
IMAGE=cdfdimage
|
2005-05-03 10:54:36 +02:00
|
|
|
ROOTIMAGE=rootimage
|
2005-07-24 03:18:09 +02:00
|
|
|
CDFILES=/usr/tmp/cdreleasefiles
|
2005-04-21 16:53:53 +02:00
|
|
|
ISO=minix.iso
|
2005-06-17 18:28:36 +02:00
|
|
|
ISOGZ=minix.iso.gz
|
2005-04-21 16:53:53 +02:00
|
|
|
RAM=/dev/ram
|
2005-08-10 17:14:02 +02:00
|
|
|
BS=4096
|
2005-08-09 19:02:01 +02:00
|
|
|
rootmb=2
|
2005-05-13 14:47:35 +02:00
|
|
|
rootkb=`expr $rootmb \* 1024`
|
|
|
|
rootbytes=`expr $rootkb \* 1024`
|
2005-08-11 17:14:02 +02:00
|
|
|
if [ "`wc -c $RAM | awk '{ print $1 }'`" -ne $rootbytes ]
|
2005-05-13 14:47:35 +02:00
|
|
|
then echo "$RAM should be exactly ${rootkb}k."
|
2005-04-21 16:53:53 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "Warning: I'm going to mkfs $RAM!"
|
|
|
|
echo "Temporary (sub)partition to use to make the /usr FS image? "
|
2005-07-21 10:35:06 +02:00
|
|
|
echo "It will be mkfsed!"
|
2005-04-21 16:53:53 +02:00
|
|
|
echo -n "Device: /dev/"
|
|
|
|
read dev || exit 1
|
|
|
|
TMPDISK=/dev/$dev
|
|
|
|
|
|
|
|
if [ -b $TMPDISK ]
|
|
|
|
then :
|
|
|
|
else echo "$TMPDISK is not a block device.."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
umount $TMPDISK
|
|
|
|
umount $RAM
|
|
|
|
|
|
|
|
( cd .. && make clean )
|
2005-08-08 19:37:39 +02:00
|
|
|
( cd .. && make depend )
|
2005-07-24 03:18:09 +02:00
|
|
|
echo " * Cleanup old files"
|
2005-07-21 10:35:06 +02:00
|
|
|
rm -rf $RELEASEDIR $ISO $IMAGE $ROOTIMAGE $ISOGZ $CDFILES
|
2005-07-24 03:18:09 +02:00
|
|
|
mkdir -p $CDFILES || exit
|
2005-04-21 16:53:53 +02:00
|
|
|
mkdir -p $RELEASEDIR
|
2005-08-10 17:14:02 +02:00
|
|
|
mkfs -B $BS $RAM || exit
|
2005-08-08 16:34:10 +02:00
|
|
|
echo " * chowning to bin"
|
|
|
|
chown -R bin /usr/src
|
2005-04-21 16:53:53 +02:00
|
|
|
echo " * mounting $RAM as $RELEASEDIR"
|
|
|
|
mount $RAM $RELEASEDIR || exit
|
2005-05-04 15:47:05 +02:00
|
|
|
mkdir -m 755 $RELEASEDIR/usr
|
|
|
|
mkdir -m 1777 $RELEASEDIR/tmp
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-08-09 19:02:01 +02:00
|
|
|
mkfs -B $BS $TMPDISK || exit
|
2005-04-21 16:53:53 +02:00
|
|
|
echo " * mounting $TMPDISK as $RELEASEDIR/usr"
|
|
|
|
mount $TMPDISK $RELEASEDIR/usr || exit
|
|
|
|
mkdir -p $RELEASEDIR/tmp
|
|
|
|
mkdir -p $RELEASEDIR/usr/tmp
|
|
|
|
echo " * Transfering $COPYITEMS to $RELEASEDIR"
|
|
|
|
( cd / && tar cf - $COPYITEMS ) | ( cd $RELEASEDIR && tar xf - ) || exit 1
|
2005-06-27 13:59:36 +02:00
|
|
|
chown -R bin $RELEASEDIR/usr/src
|
2005-08-10 17:14:02 +02:00
|
|
|
# Bug tracking system not for on cd
|
|
|
|
rm -rf $RELEASEDIR/usr/src/doc/bugs
|
2005-08-11 17:09:14 +02:00
|
|
|
# No GNU core utils
|
|
|
|
rm -rf $RELEASEDIR/usr/src/contrib/gnu/coreutils*
|
|
|
|
# Make sure the CD knows it's a CD
|
2005-05-03 17:37:34 +02:00
|
|
|
date >$RELEASEDIR/CD
|
2005-05-03 10:54:36 +02:00
|
|
|
( cd $RELEASEDIR && find . -name CVS | xargs rm -rf )
|
2005-07-26 15:36:50 +02:00
|
|
|
#echo " * Making source .tgz for on ISO filesystem"
|
|
|
|
#( cd $RELEASEDIR/usr/src && tar cf - . | gzip > $CDFILES/MINIXSRC.TGZ )
|
2005-04-21 16:53:53 +02:00
|
|
|
echo " * Chroot build"
|
|
|
|
chroot $RELEASEDIR '/bin/sh -x /usr/src/tools/chrootmake.sh' || exit 1
|
|
|
|
echo " * Chroot build done"
|
2005-05-03 17:37:34 +02:00
|
|
|
cp issue.install $RELEASEDIR/etc/issue
|
2005-04-21 16:53:53 +02:00
|
|
|
umount $TMPDISK || exit
|
|
|
|
umount $RAM || exit
|
2005-05-03 10:54:36 +02:00
|
|
|
cp $RAM $ROOTIMAGE
|
2005-04-21 16:53:53 +02:00
|
|
|
make programs image
|
|
|
|
(cd ../boot && make)
|
|
|
|
make image || exit 1
|
2005-05-03 17:37:34 +02:00
|
|
|
sh mkboot cdfdboot
|
2005-08-08 19:37:39 +02:00
|
|
|
cp $IMAGE $CDFILES/bootflp.img
|
2005-07-21 10:35:06 +02:00
|
|
|
cp release/cd/* $CDFILES
|
|
|
|
writeisofs -l MINIX -b $IMAGE $CDFILES $ISO || exit 1
|
2005-06-17 18:28:36 +02:00
|
|
|
echo "Appending Minix root and usr filesystem"
|
|
|
|
cat $ISO $ROOTIMAGE $TMPDISK | gzip >$ISOGZ || exit 1
|
|
|
|
ls -al $ISOGZ
|