2005-04-21 16:53:53 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2006-04-04 11:43:26 +02:00
|
|
|
set -e
|
|
|
|
|
2007-02-08 17:18:48 +01:00
|
|
|
XBIN=usr/xbin
|
2007-02-19 17:40:33 +01:00
|
|
|
SRC=src
|
2007-02-08 17:18:48 +01:00
|
|
|
|
2006-02-02 18:11:10 +01:00
|
|
|
PACKAGEDIR=/usr/bigports/Packages
|
2006-03-15 18:02:46 +01:00
|
|
|
PACKAGESOURCEDIR=/usr/bigports/Sources
|
2005-09-08 18:04:34 +02:00
|
|
|
secs=`expr 32 '*' 64`
|
2006-03-26 20:08:08 +02:00
|
|
|
export SHELL=/bin/sh
|
2005-09-08 18:04:34 +02:00
|
|
|
|
2005-08-16 14:09:20 +02:00
|
|
|
make_hdimage()
|
|
|
|
{
|
|
|
|
dd if=$TMPDISK of=usrimage bs=$BS count=$USRBLOCKS
|
|
|
|
|
|
|
|
rootsize=`stat -size rootimage`
|
|
|
|
usrsize=`stat -size usrimage`
|
|
|
|
|
|
|
|
rootsects=`expr $rootsize / 512`
|
|
|
|
usrsects=`expr $usrsize / 512`
|
|
|
|
|
|
|
|
# installboot -m needs at least 1KB
|
|
|
|
dd < /dev/zero >tmpimage count=2
|
|
|
|
partition -fm tmpimage 2 81:$rootsects* 0:0 81:$usrsects
|
|
|
|
installboot -m tmpimage /usr/mdec/masterboot
|
|
|
|
dd < tmpimage > subpart count=1
|
|
|
|
|
|
|
|
primsects=`expr 1 + $rootsects + $usrsects`
|
2005-09-08 18:04:34 +02:00
|
|
|
cyl=`expr '(' $primsects ')' / $secs + 1`
|
|
|
|
padsects=`expr $cyl \* $secs - 1 - $primsects`
|
2005-08-16 14:09:20 +02:00
|
|
|
|
|
|
|
{ dd < /dev/zero count=1
|
|
|
|
cat subpart
|
|
|
|
cat rootimage
|
|
|
|
cat usrimage
|
|
|
|
dd < /dev/zero count=$padsects
|
|
|
|
} > hdimage
|
|
|
|
partition -m hdimage 81:`expr $primsects + $padsects`*
|
|
|
|
installboot -m hdimage /usr/mdec/masterboot
|
|
|
|
}
|
|
|
|
|
|
|
|
hdemu_root_changes()
|
|
|
|
{
|
2006-02-15 12:05:47 +01:00
|
|
|
$RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \
|
2005-08-16 14:09:20 +02:00
|
|
|
$RELEASEDIR/usr/mdec/bootblock boot/boot
|
|
|
|
echo \
|
2006-03-10 15:11:19 +01:00
|
|
|
'bootcd=2
|
2005-08-16 14:09:20 +02:00
|
|
|
disable=inet
|
2006-04-03 16:31:59 +02:00
|
|
|
bios_wini=yes
|
2005-08-16 14:09:20 +02:00
|
|
|
bios_remap_first=1
|
|
|
|
ramimagedev=c0d7p0s0
|
2006-06-20 12:13:56 +02:00
|
|
|
bootbig(1, Regular MINIX 3) { image=/boot/image_big; boot }
|
|
|
|
bootsmall(2, Small MINIX 3 (<16MB)) {image=/boot/image_small; boot }
|
2006-03-10 15:11:19 +01:00
|
|
|
main() { trap 10000 boot ; menu; }
|
2006-02-15 12:05:47 +01:00
|
|
|
save' | $RELEASEDIR/usr/bin/edparams $TMPDISK3
|
2005-08-16 14:09:20 +02:00
|
|
|
|
|
|
|
echo \
|
|
|
|
'root=/dev/c0d7p0s0
|
|
|
|
usr=/dev/c0d7p0s2
|
|
|
|
usr_roflag="-r"' > $RELEASEDIR/etc/fstab
|
|
|
|
}
|
|
|
|
|
2006-03-13 16:40:23 +01:00
|
|
|
usb_root_changes()
|
|
|
|
{
|
|
|
|
$RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \
|
|
|
|
$RELEASEDIR/usr/mdec/bootblock boot/boot
|
|
|
|
echo \
|
|
|
|
'bios_wini=yes
|
|
|
|
bios_remap_first=1
|
|
|
|
rootdev=c0d7p0s0
|
|
|
|
save' | $RELEASEDIR/usr/bin/edparams $TMPDISK3
|
|
|
|
|
|
|
|
echo \
|
|
|
|
'root=/dev/c0d7p0s0
|
|
|
|
usr=/dev/c0d7p0s2
|
|
|
|
' > $RELEASEDIR/etc/fstab
|
|
|
|
}
|
2005-08-16 14:09:20 +02:00
|
|
|
|
2005-09-24 12:30:25 +02:00
|
|
|
RELEASEDIR=/usr/r
|
2006-03-15 16:34:12 +01:00
|
|
|
RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages
|
2006-03-15 18:02:46 +01:00
|
|
|
RELEASEPACKAGESOURCES=${RELEASEDIR}/usr/install/package-sources
|
2005-04-21 16:53:53 +02:00
|
|
|
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-09-11 18:36:17 +02:00
|
|
|
sh tell_config OS_RELEASE . OS_VERSION >/tmp/rel.$$
|
2005-09-12 17:44:05 +02:00
|
|
|
version_pretty=`sed 's/[" ]//g;/^$/d' </tmp/rel.$$`
|
2005-09-11 18:36:17 +02:00
|
|
|
version=`sed 's/[" ]//g;/^$/d' </tmp/rel.$$ | tr . _`
|
2007-02-19 17:40:33 +01:00
|
|
|
IMG_BASE=minix${version}_ide
|
2005-08-10 17:14:02 +02:00
|
|
|
BS=4096
|
2005-08-16 14:09:20 +02:00
|
|
|
|
|
|
|
HDEMU=0
|
2005-08-24 18:49:09 +02:00
|
|
|
COPY=0
|
2006-12-22 17:43:30 +01:00
|
|
|
SVNREV=""
|
2007-02-19 17:40:33 +01:00
|
|
|
REVTAG=""
|
2006-04-10 16:18:54 +02:00
|
|
|
PACKAGES=1
|
2005-08-16 14:09:20 +02:00
|
|
|
|
2006-06-20 12:13:56 +02:00
|
|
|
while getopts "pchu?r:" c
|
2005-08-16 14:09:20 +02:00
|
|
|
do
|
|
|
|
case "$c" in
|
|
|
|
\?)
|
2006-04-10 16:18:54 +02:00
|
|
|
echo "Usage: $0 [-p] [-c] [-h] [-r <tag>] [-u]" >&2
|
2005-08-16 14:09:20 +02:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
h)
|
2005-09-01 17:26:12 +02:00
|
|
|
echo " * Making HD image"
|
2007-02-19 17:40:33 +01:00
|
|
|
IMG_BASE=minix${version}_bios
|
2005-08-16 14:09:20 +02:00
|
|
|
HDEMU=1
|
2005-08-24 18:49:09 +02:00
|
|
|
;;
|
|
|
|
c)
|
2006-12-22 17:43:30 +01:00
|
|
|
echo " * Copying, not SVN"
|
2005-08-24 18:49:09 +02:00
|
|
|
COPY=1
|
|
|
|
;;
|
2006-04-10 16:18:54 +02:00
|
|
|
p)
|
|
|
|
PACKAGES=0
|
|
|
|
;;
|
2005-09-29 15:02:41 +02:00
|
|
|
r)
|
2006-12-22 17:43:30 +01:00
|
|
|
SVNREV=-r$OPTARG
|
2005-09-29 15:02:41 +02:00
|
|
|
;;
|
2006-03-13 16:40:23 +01:00
|
|
|
u)
|
|
|
|
echo " * Making live USB-stick image"
|
2007-02-19 17:40:33 +01:00
|
|
|
IMG_BASE=minix${version}_usb
|
2006-03-13 16:40:23 +01:00
|
|
|
HDEMU=1
|
|
|
|
USB=1
|
|
|
|
;;
|
2005-08-16 14:09:20 +02:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2006-04-13 14:44:06 +02:00
|
|
|
USRMB=400
|
2005-09-08 18:04:34 +02:00
|
|
|
|
|
|
|
USRBLOCKS="`expr $USRMB \* 1024 \* 1024 / $BS`"
|
|
|
|
USRSECTS="`expr $USRMB \* 1024 \* 2`"
|
2006-04-12 13:33:07 +02:00
|
|
|
ROOTKB=4096
|
2005-09-11 22:51:07 +02:00
|
|
|
ROOTSECTS="`expr $ROOTKB \* 2`"
|
|
|
|
ROOTBLOCKS="`expr $ROOTKB \* 1024 / $BS`"
|
2005-09-08 18:04:34 +02:00
|
|
|
|
2005-08-24 18:49:09 +02:00
|
|
|
if [ "$COPY" -ne 1 ]
|
|
|
|
then
|
2006-12-22 17:43:30 +01:00
|
|
|
echo "Note: this script wants to do svn operations."
|
2005-08-24 18:49:09 +02:00
|
|
|
fi
|
|
|
|
|
2006-01-17 16:14:56 +01:00
|
|
|
TD1=.td1
|
|
|
|
TD2=.td2
|
2006-02-15 12:05:47 +01:00
|
|
|
TD3=.td3
|
2006-01-17 16:14:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
if [ -f $TD1 ]
|
|
|
|
then TMPDISK="`cat $TD1`"
|
|
|
|
echo " * Warning: I'm going to overwrite $TMPDISK!"
|
|
|
|
else
|
|
|
|
echo "Temporary (sub)partition to use to make the /usr FS image? "
|
|
|
|
echo "I need $USRMB MB. It will be mkfsed!"
|
|
|
|
echo -n "Device: /dev/"
|
|
|
|
read dev || exit 1
|
|
|
|
TMPDISK=/dev/$dev
|
|
|
|
fi
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
if [ -b $TMPDISK ]
|
|
|
|
then :
|
|
|
|
else echo "$TMPDISK is not a block device.."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-01-17 16:14:56 +01:00
|
|
|
echo $TMPDISK >$TD1
|
|
|
|
|
|
|
|
if [ -f $TD2 ]
|
|
|
|
then TMPDISK2="`cat $TD2`"
|
|
|
|
echo " * Warning: I'm going to overwrite $TMPDISK2!"
|
|
|
|
else
|
|
|
|
echo "Temporary (sub)partition to use for /tmp? "
|
|
|
|
echo "It will be mkfsed!"
|
|
|
|
echo -n "Device: /dev/"
|
|
|
|
read dev || exit 1
|
|
|
|
TMPDISK2=/dev/$dev
|
|
|
|
fi
|
2005-08-30 19:26:56 +02:00
|
|
|
|
|
|
|
if [ -b $TMPDISK2 ]
|
|
|
|
then :
|
|
|
|
else echo "$TMPDISK2 is not a block device.."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-01-17 16:14:56 +01:00
|
|
|
echo $TMPDISK2 >$TD2
|
|
|
|
|
2006-02-15 12:05:47 +01:00
|
|
|
if [ -f $TD3 ]
|
|
|
|
then TMPDISK3="`cat $TD3`"
|
|
|
|
echo " * Warning: I'm going to overwrite $TMPDISK3!"
|
|
|
|
else
|
|
|
|
echo "It has to be at least $ROOTKB KB."
|
|
|
|
echo ""
|
|
|
|
echo "Temporary (sub)partition to use to make the root FS image? "
|
|
|
|
echo "It will be mkfsed!"
|
|
|
|
echo -n "Device: /dev/"
|
|
|
|
read dev || exit 1
|
|
|
|
TMPDISK3=/dev/$dev
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -b $TMPDISK3 ]
|
|
|
|
then :
|
|
|
|
else echo "$TMPDISK3 is not a block device.."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo $TMPDISK3 >$TD3
|
|
|
|
|
2006-04-04 11:47:19 +02:00
|
|
|
umount $TMPDISK || true
|
|
|
|
umount $TMPDISK2 || true
|
|
|
|
umount $TMPDISK3 || true
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-02-15 12:05:47 +01:00
|
|
|
if [ $TMPDISK = $TMPDISK2 -o $TMPDISK = $TMPDISK3 -o $TMPDISK2 = $TMPDISK3 ]
|
2006-01-17 16:14:56 +01:00
|
|
|
then
|
|
|
|
echo "Temporary devices can't be equal."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2005-07-24 03:18:09 +02:00
|
|
|
echo " * Cleanup old files"
|
2006-03-13 16:40:23 +01:00
|
|
|
rm -rf $RELEASEDIR $IMG $IMAGE $ROOTIMAGE $IMGBZ $CDFILES image*
|
2005-07-24 03:18:09 +02:00
|
|
|
mkdir -p $CDFILES || exit
|
2005-04-21 16:53:53 +02:00
|
|
|
mkdir -p $RELEASEDIR
|
2006-02-15 12:05:47 +01:00
|
|
|
mkfs -B $BS -b $ROOTBLOCKS $TMPDISK3 || exit
|
2005-08-30 19:26:56 +02:00
|
|
|
mkfs $TMPDISK2 || exit
|
2006-02-15 12:05:47 +01:00
|
|
|
echo " * mounting $TMPDISK3 as $RELEASEDIR"
|
|
|
|
mount $TMPDISK3 $RELEASEDIR || exit
|
2005-05-04 15:47:05 +02:00
|
|
|
mkdir -m 755 $RELEASEDIR/usr
|
|
|
|
mkdir -m 1777 $RELEASEDIR/tmp
|
2005-08-30 19:26:56 +02:00
|
|
|
mount $TMPDISK2 $RELEASEDIR/tmp
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-08-12 14:34:56 +02:00
|
|
|
mkfs -B $BS -b $USRBLOCKS $TMPDISK || exit
|
|
|
|
echo " * Mounting $TMPDISK as $RELEASEDIR/usr"
|
2005-04-21 16:53:53 +02:00
|
|
|
mount $TMPDISK $RELEASEDIR/usr || exit
|
|
|
|
mkdir -p $RELEASEDIR/tmp
|
|
|
|
mkdir -p $RELEASEDIR/usr/tmp
|
2007-02-08 17:18:48 +01:00
|
|
|
mkdir -p $RELEASEDIR/$XBIN
|
2007-02-08 18:41:40 +01:00
|
|
|
mkdir -p $RELEASEDIR/usr/bin
|
2007-02-08 17:18:48 +01:00
|
|
|
mkdir -p $RELEASEDIR/bin
|
2006-03-15 16:34:12 +01:00
|
|
|
mkdir -p $RELEASEPACKAGE
|
2006-03-15 18:02:46 +01:00
|
|
|
mkdir -p $RELEASEPACKAGESOURCES
|
2005-08-24 18:49:09 +02:00
|
|
|
|
2007-02-08 17:18:48 +01:00
|
|
|
echo " * Transfering bootstrap dirs to $RELEASEDIR"
|
|
|
|
cp -p /bin/* /usr/bin/* $RELEASEDIR/$XBIN
|
|
|
|
cp -rp /usr/lib $RELEASEDIR/usr
|
2007-02-08 18:41:40 +01:00
|
|
|
cp -rp /bin/bigsh /bin/sh $RELEASEDIR/bin
|
|
|
|
cp -rp /usr/bin/make /usr/bin/install /usr/bin/yacc /usr/bin/flex $RELEASEDIR/usr/bin
|
2005-09-24 13:28:22 +02:00
|
|
|
|
2006-04-10 16:18:54 +02:00
|
|
|
if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR -a $PACKAGES -ne 0 ]
|
2006-03-15 18:02:46 +01:00
|
|
|
then echo " * Indexing packages"
|
2006-03-26 20:01:39 +02:00
|
|
|
bintotal=0
|
2006-03-15 16:34:12 +01:00
|
|
|
( cd $PACKAGEDIR
|
2006-03-22 17:43:12 +01:00
|
|
|
for p in *.tar.bz2
|
2006-03-26 20:01:39 +02:00
|
|
|
do echo $p >&2
|
|
|
|
p="`echo $p | sed 's/.tar.bz2//'`"
|
2006-03-26 18:00:25 +02:00
|
|
|
descr="../$p/.descr"
|
2006-03-15 18:02:46 +01:00
|
|
|
if [ -f "$descr" ]
|
2006-03-26 17:51:34 +02:00
|
|
|
then echo "$p|`cat $descr`"
|
2006-03-15 18:02:46 +01:00
|
|
|
fi
|
|
|
|
done >List
|
2006-03-15 16:34:12 +01:00
|
|
|
)
|
2006-03-26 20:01:39 +02:00
|
|
|
for d in $PACKAGEDIR $PACKAGESOURCEDIR
|
|
|
|
do echo Counting size of $d
|
|
|
|
f=$d/SizeMB
|
|
|
|
if [ ! -f $f ]
|
|
|
|
then
|
|
|
|
b="`bzip2 -dc $d/*.bz2 | wc -c`"
|
|
|
|
echo "`expr 1 + $b / 1024 / 1024`" >$f
|
|
|
|
fi
|
|
|
|
echo "`cat $f` MB."
|
|
|
|
done
|
2006-03-15 18:02:46 +01:00
|
|
|
echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE"
|
|
|
|
cp $PACKAGEDIR/* $RELEASEPACKAGE/
|
|
|
|
echo " * Transfering $PACKAGESOURCEDIR to $RELEASEPACKAGESOURCES"
|
2006-04-04 14:59:30 +02:00
|
|
|
cp $PACKAGESOURCEDIR/* $RELEASEPACKAGESOURCES/ || true
|
2006-03-26 20:01:39 +02:00
|
|
|
|
2006-03-15 16:34:12 +01:00
|
|
|
fi
|
|
|
|
|
2005-09-24 13:28:22 +02:00
|
|
|
# Make sure compilers and libraries are bin-owned
|
|
|
|
chown -R bin $RELEASEDIR/usr/lib
|
|
|
|
chmod -R u+w $RELEASEDIR/usr/lib
|
|
|
|
|
|
|
|
if [ "$COPY" -ne 1 ]
|
2005-08-24 18:49:09 +02:00
|
|
|
then
|
2006-12-22 17:43:30 +01:00
|
|
|
echo " * Doing new svn export"
|
2007-02-19 17:40:33 +01:00
|
|
|
REPO=https://gforge.cs.vu.nl/svn/minix/trunk/$SRC
|
|
|
|
REVISION="`svn info $SVNREV $REPO | grep '^Revision: ' | awk '{ print $2 }'`"
|
|
|
|
echo "Doing export of revision $REVISION from $REPO."
|
|
|
|
( cd $RELEASEDIR/usr && svn export -r$REVISION $REPO )
|
|
|
|
REVTAG=r$REVISION
|
2007-03-21 14:35:06 +01:00
|
|
|
echo "
|
|
|
|
|
|
|
|
/* Added by release script */
|
|
|
|
#ifndef SVN_REVISION
|
|
|
|
#define SVN_REVISION \"$REVISION\"
|
|
|
|
#endif" >>$RELEASEDIR/usr/src/include/minix/sys_config.h
|
|
|
|
|
2005-09-24 13:28:22 +02:00
|
|
|
else
|
2006-01-12 15:50:05 +01:00
|
|
|
( cd .. && make depend && make clean )
|
2007-02-19 17:40:33 +01:00
|
|
|
srcdir=/usr/$SRC
|
|
|
|
( cd $srcdir && tar cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
|
|
|
|
REVTAG=copy
|
2005-09-01 17:26:12 +02:00
|
|
|
fi
|
|
|
|
|
2007-02-19 17:40:33 +01:00
|
|
|
if [ "$USB" -ne 0 ]; then
|
|
|
|
IMG=${IMG_BASE}_${REVTAG}.img
|
|
|
|
else
|
|
|
|
IMG=${IMG_BASE}_${REVTAG}.iso
|
|
|
|
fi
|
|
|
|
IMGBZ=${IMG}.bz2
|
|
|
|
echo "Making $IMGBZ"
|
|
|
|
|
2005-09-24 13:28:22 +02:00
|
|
|
echo " * Fixups for owners and modes of dirs and files"
|
2007-02-19 17:40:33 +01:00
|
|
|
chown -R bin $RELEASEDIR/usr/$SRC
|
|
|
|
chmod -R u+w $RELEASEDIR/usr/$SRC
|
|
|
|
find $RELEASEDIR/usr/$SRC -type d | xargs chmod 755
|
|
|
|
find $RELEASEDIR/usr/$SRC -type f | xargs chmod 644
|
|
|
|
find $RELEASEDIR/usr/$SRC -name configure | xargs chmod 755
|
|
|
|
find $RELEASEDIR/usr/$SRC/commands -name build | xargs chmod 755
|
2005-09-24 13:28:22 +02:00
|
|
|
# Bug tracking system not for on cd
|
2007-02-19 17:40:33 +01:00
|
|
|
rm -rf $RELEASEDIR/usr/$SRC/doc/bugs
|
2005-09-24 13:28:22 +02:00
|
|
|
|
2006-06-20 12:13:56 +02:00
|
|
|
# Make sure the CD knows it's a CD, unless it's not
|
|
|
|
if [ "$USB" -eq 0 ]
|
|
|
|
then date >$RELEASEDIR/CD
|
|
|
|
fi
|
2005-09-24 13:28:22 +02:00
|
|
|
echo " * Chroot build"
|
2007-02-19 17:40:33 +01:00
|
|
|
chroot $RELEASEDIR "PATH=/$XBIN sh -x /usr/$SRC/tools/chrootmake.sh" || exit 1
|
2005-09-24 13:28:22 +02:00
|
|
|
echo " * Chroot build done"
|
2007-02-08 17:18:48 +01:00
|
|
|
echo " * Removing bootstrap files"
|
|
|
|
rm -rf $RELEASEDIR/$XBIN
|
2007-02-19 17:40:33 +01:00
|
|
|
# The build process leaves some file in $SRC as root.
|
2005-09-24 13:28:22 +02:00
|
|
|
chown -R bin $RELEASEDIR/usr/src*
|
|
|
|
cp issue.install $RELEASEDIR/etc/issue
|
|
|
|
|
2006-03-13 16:40:23 +01:00
|
|
|
if [ "$USB" -ne 0 ]
|
|
|
|
then
|
|
|
|
usb_root_changes
|
|
|
|
elif [ "$HDEMU" -ne 0 ]
|
|
|
|
then
|
|
|
|
hdemu_root_changes
|
|
|
|
fi
|
2005-09-24 13:28:22 +02:00
|
|
|
|
2005-09-12 17:44:05 +02:00
|
|
|
echo $version_pretty >$RELEASEDIR/etc/version
|
2005-09-09 18:05:23 +02:00
|
|
|
echo " * Counting files"
|
2006-04-10 16:18:54 +02:00
|
|
|
extrakb=`du -s $RELEASEDIR/usr/install | awk '{ print $1 }'`
|
|
|
|
expr `df $TMPDISK | tail -1 | awk '{ print $4 }'` - $extrakb >$RELEASEDIR/.usrkb
|
|
|
|
find $RELEASEDIR/usr | fgrep -v /install/ | wc -l >$RELEASEDIR/.usrfiles
|
2005-09-09 18:05:23 +02:00
|
|
|
find $RELEASEDIR -xdev | wc -l >$RELEASEDIR/.rootfiles
|
2006-01-17 16:14:56 +01:00
|
|
|
echo " * Zeroing remainder of temporary areas"
|
|
|
|
df $TMPDISK
|
2006-02-15 12:05:47 +01:00
|
|
|
df $TMPDISK3
|
2006-04-04 11:43:26 +02:00
|
|
|
cp /dev/zero $RELEASEDIR/usr/.x 2>/dev/null || true
|
2006-01-17 16:14:56 +01:00
|
|
|
rm $RELEASEDIR/usr/.x
|
2006-04-04 11:43:26 +02:00
|
|
|
cp /dev/zero $RELEASEDIR/.x 2>/dev/null || true
|
2006-01-17 16:14:56 +01:00
|
|
|
rm $RELEASEDIR/.x
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
umount $TMPDISK || exit
|
2005-08-30 19:40:08 +02:00
|
|
|
umount $TMPDISK2 || exit
|
2006-02-15 12:05:47 +01:00
|
|
|
umount $TMPDISK3 || exit
|
2005-04-21 16:53:53 +02:00
|
|
|
(cd ../boot && make)
|
2005-09-08 20:06:03 +02:00
|
|
|
(cd .. && make depend)
|
2005-09-26 16:06:59 +02:00
|
|
|
make clean
|
2005-04-21 16:53:53 +02:00
|
|
|
make image || exit 1
|
2006-04-03 22:06:07 +02:00
|
|
|
mv image image_big
|
2005-08-29 21:59:58 +02:00
|
|
|
make clean
|
|
|
|
make image_small || exit 1
|
2006-02-15 12:05:47 +01:00
|
|
|
dd if=$TMPDISK3 of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS
|
2005-08-29 21:59:58 +02:00
|
|
|
# Prepare image and image_small for cdfdboot
|
2006-04-03 22:06:07 +02:00
|
|
|
mv image_big image
|
2006-02-15 12:05:47 +01:00
|
|
|
sh mkboot cdfdboot $TMPDISK3
|
2005-08-26 10:57:58 +02:00
|
|
|
cp $IMAGE $CDFILES/bootflop.img
|
2006-04-04 11:46:54 +02:00
|
|
|
cp release/cd/* $CDFILES || true
|
2006-03-19 21:57:22 +01:00
|
|
|
echo "This is Minix version $version_pretty prepared `date`." >$CDFILES/VERSION.TXT
|
2005-08-16 14:09:20 +02:00
|
|
|
|
|
|
|
h_opt=
|
|
|
|
bootimage=$IMAGE
|
|
|
|
if [ "$HDEMU" -ne 0 ]; then
|
|
|
|
make_hdimage
|
|
|
|
h_opt='-h'
|
|
|
|
bootimage=hdimage
|
|
|
|
fi
|
|
|
|
|
2006-03-13 16:40:23 +01:00
|
|
|
if [ "$USB" -ne 0 ]; then
|
|
|
|
mv $bootimage $IMG
|
|
|
|
else
|
|
|
|
writeisofs -l MINIX -b $bootimage $h_opt $CDFILES $IMG || exit 1
|
|
|
|
|
|
|
|
if [ "$HDEMU" -eq 0 ]
|
|
|
|
then
|
|
|
|
echo "Appending Minix root and usr filesystem"
|
|
|
|
# Pad ISO out to cylinder boundary
|
|
|
|
isobytes=`stat -size $IMG`
|
|
|
|
isosects=`expr $isobytes / 512`
|
|
|
|
isopad=`expr $secs - '(' $isosects % $secs ')'`
|
|
|
|
dd if=/dev/zero count=$isopad >>$IMG
|
|
|
|
# number of sectors
|
|
|
|
isosects=`expr $isosects + $isopad`
|
|
|
|
( cat $IMG $ROOTIMAGE ;
|
|
|
|
dd if=$TMPDISK bs=$BS count=$USRBLOCKS ) >m
|
|
|
|
mv m $IMG
|
|
|
|
# Make CD partition table
|
|
|
|
installboot -m $IMG /usr/mdec/masterboot
|
|
|
|
# Make sure there is no hole..! Otherwise the ISO format is
|
|
|
|
# unreadable.
|
|
|
|
partition -m $IMG 0 81:$isosects 81:$ROOTSECTS 81:$USRSECTS
|
|
|
|
fi
|
2005-08-16 14:09:20 +02:00
|
|
|
fi
|