1999-11-11 16:10:37 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Script to build everything possible : sources and binaries for all archs
|
|
|
|
|
|
|
|
. CONF.sh
|
|
|
|
|
2000-06-14 04:54:52 +00:00
|
|
|
TMP_OUT=$OUT
|
|
|
|
|
2002-07-01 18:28:52 +00:00
|
|
|
for ARCH in i386 alpha arm hppa ia64 m68k mips mipsel powerpc s390 sparc
|
1999-11-11 16:10:37 -01:00
|
|
|
do
|
|
|
|
export ARCH
|
|
|
|
echo "Now we're going to build CD for $ARCH !"
|
|
|
|
echo " ... cleaning"
|
|
|
|
make distclean
|
|
|
|
make ${CODENAME}_status
|
|
|
|
echo " ... checking your mirror"
|
2002-05-06 10:36:49 +00:00
|
|
|
if [ "$SKIPMIRRORCHECK" != "yes" ] ; then
|
|
|
|
make mirrorcheck
|
|
|
|
else
|
|
|
|
echo "WARNING: skipping mirrorcheck"
|
|
|
|
fi
|
|
|
|
|
1999-11-11 16:10:37 -01:00
|
|
|
if [ $? -gt 0 ]; then
|
|
|
|
echo "ERROR: Your mirror has a problem, please correct it." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo " ... selecting packages to include"
|
2002-04-07 16:26:59 +00:00
|
|
|
if [ -e ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. ] ; then
|
|
|
|
disks=`du -sm ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. | \
|
2001-12-16 22:18:00 -01:00
|
|
|
awk '{print $1}'`
|
2002-04-07 16:26:59 +00:00
|
|
|
else
|
|
|
|
disks=0
|
|
|
|
fi
|
2000-06-11 13:12:56 +00:00
|
|
|
if [ -f $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc ]; then
|
|
|
|
. $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc
|
|
|
|
fi
|
|
|
|
SIZE_ARGS=''
|
2004-07-11 21:19:39 +00:00
|
|
|
for CD in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
2000-06-11 13:12:56 +00:00
|
|
|
size=`eval echo '$'"BOOT_SIZE_${CD}"`
|
|
|
|
[ "$size" = "" ] && size=0
|
|
|
|
[ $CD = "1" ] && size=$(($size + $disks))
|
2004-07-11 21:19:39 +00:00
|
|
|
mult=`eval echo '$'"SIZE_MULT_${CD}"`
|
|
|
|
[ "$mult" = "" ] && mult=100
|
2002-04-07 16:26:59 +00:00
|
|
|
FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc`
|
2004-07-11 21:19:39 +00:00
|
|
|
echo "INFO: Reserving $size MB on CD $CD for boot files. SIZELIMIT=$FULL_SIZE."
|
|
|
|
if [ $mult != 100 ]; then
|
|
|
|
echo " INFO: Reserving "$((100-$mult))"% of the CD for extra metadata"
|
|
|
|
FULL_SIZE=`echo "$FULL_SIZE * $mult" / 100 | bc`
|
|
|
|
echo " INFO: SIZELIMIT now $FULL_SIZE."
|
|
|
|
fi
|
2002-04-07 16:26:59 +00:00
|
|
|
SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE"
|
2000-06-11 13:12:56 +00:00
|
|
|
done
|
2002-04-07 16:26:59 +00:00
|
|
|
FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc`
|
|
|
|
make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE
|
1999-11-11 16:10:37 -01:00
|
|
|
echo " ... building the images"
|
|
|
|
if [ "$ARCH" = "i386" ]; then
|
2000-06-14 04:54:52 +00:00
|
|
|
export OUT="$TMP_OUT/$ARCH"; mkdir -p $OUT
|
|
|
|
make bin-official_images
|
2000-07-25 15:03:57 +00:00
|
|
|
echo Generating MD5Sums of the images
|
|
|
|
make imagesums
|
|
|
|
echo Generating list files for images
|
|
|
|
make pi-makelist
|
2000-06-14 04:54:52 +00:00
|
|
|
|
|
|
|
export OUT="$TMP_OUT/src"; mkdir -p $OUT
|
|
|
|
make src-official_images
|
2000-07-25 15:03:57 +00:00
|
|
|
echo Generating MD5Sums of the images
|
|
|
|
make imagesums
|
2000-08-12 22:43:05 +00:00
|
|
|
echo Generating list files for images
|
|
|
|
make pi-makelist
|
1999-11-11 16:10:37 -01:00
|
|
|
else
|
2000-06-14 04:54:52 +00:00
|
|
|
export OUT=$TMP_OUT/$ARCH; mkdir -p $OUT
|
1999-11-11 16:10:37 -01:00
|
|
|
make bin-official_images
|
|
|
|
if [ $? -gt 0 ]; then
|
|
|
|
echo "ERROR WHILE BUILDING OFFICIAL IMAGES !!" >&2
|
2000-08-25 16:54:03 +00:00
|
|
|
if [ "$ATTEMPT_FALLBACK" = "yes" ]; then
|
|
|
|
echo "I'll try to build a simple (non-bootable) CD" >&2
|
|
|
|
make clean
|
|
|
|
make installtools
|
|
|
|
make bin-images
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
1999-11-11 16:10:37 -01:00
|
|
|
fi
|
2000-07-25 15:03:57 +00:00
|
|
|
echo Generating MD5Sums of the images
|
|
|
|
make imagesums
|
|
|
|
echo Generating list files for images
|
|
|
|
make pi-makelist
|
1999-11-11 16:10:37 -01:00
|
|
|
fi
|
|
|
|
echo "--------------- `date` ---------------"
|
|
|
|
done
|