2003-10-09 21:57:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2004-04-19 19:17:56 +00:00
|
|
|
# Do install stuff for powerpc, including making bootable CDs
|
2003-10-09 21:57:34 +00:00
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
2004-07-11 09:34:59 +00:00
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
2003-10-09 21:57:34 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
INSTALLDIR=$CDDIR/install
|
2004-04-19 19:17:56 +00:00
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
|
|
|
DI_WWW_HOME="http://people.debian.org/~luther/debian-installer/daily-powerpc-built/current"
|
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
2003-11-13 16:33:50 -01:00
|
|
|
fi
|
2003-10-09 21:57:34 +00:00
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
|
|
# Only disk 1* bootable
|
|
|
|
if [ $N != 1 -a $N != 1_NONUS ]; then
|
|
|
|
# we don't need HFS cruft on anything but CD 1
|
|
|
|
:> $N.mkisofs_opts
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
install_languages $CDDIR
|
|
|
|
|
|
|
|
echo -n "--netatalk -hfs -probe -map $BASEDIR/data/hfs.map" \
|
|
|
|
> $N.mkisofs_opts
|
|
|
|
# We are still missing this for prep
|
|
|
|
#echo -n " -prep-boot install/prep/boot.bin" >> $N.mkisofs_opts
|
|
|
|
# For newworld Mac booting - Note, no spaces in volid!
|
2004-04-19 19:17:56 +00:00
|
|
|
echo -n " -part -no-desktop -hfs-bless CD$N/install -hfs-volid Debian/PowerPC_${CODENAME}" \
|
2003-10-09 21:57:34 +00:00
|
|
|
>> $N.mkisofs_opts
|
|
|
|
|
|
|
|
cd $INSTALLDIR
|
|
|
|
# Extract yaboot from the archive
|
|
|
|
if [ -z "$YABOOT_DEBUG" ]; then
|
|
|
|
YADEB="$($BASEDIR/tools/apt-selection cache show yaboot | \
|
|
|
|
grep ^Filename | awk '{print $2}')"
|
|
|
|
(ar p "${MIRROR}/${YADEB}" data.tar.gz | \
|
2004-04-19 19:17:56 +00:00
|
|
|
tar zxf - -C . ./usr/lib/yaboot/yaboot)
|
|
|
|
mv usr/lib/yaboot/yaboot .
|
|
|
|
rm -rf usr
|
2003-10-09 21:57:34 +00:00
|
|
|
else
|
2004-04-19 19:17:56 +00:00
|
|
|
cp -f $YABOOT_DEBUG yaboot
|
2003-10-09 21:57:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
2004-04-19 19:17:56 +00:00
|
|
|
# generate/download images for "powerpc"
|
2003-10-09 21:57:34 +00:00
|
|
|
# (missing: bootvars1.3b.sit.hqx, BootX_1.2.2.sit, boot-floppy-hfs.img)
|
2003-12-30 19:56:29 -01:00
|
|
|
BUILD_DATE=$(date +%Y%m%d)
|
2003-10-09 21:57:34 +00:00
|
|
|
cat $BASEDIR/data/sarge/yaboot/boot.msg \
|
2003-12-30 19:56:29 -01:00
|
|
|
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
2004-01-13 18:11:31 -01:00
|
|
|
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
2003-12-30 19:56:29 -01:00
|
|
|
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
|
|
|
> boot.msg
|
2003-10-09 21:57:34 +00:00
|
|
|
cat $BASEDIR/data/sarge/yaboot/yaboot.conf \
|
|
|
|
| sed "s/CODENAME/${CODENAME}/g" > yaboot.conf
|
2004-04-19 19:17:56 +00:00
|
|
|
cp $BASEDIR/data/sarge/yaboot/ofboot.b ofboot.b
|
2003-10-09 21:57:34 +00:00
|
|
|
|
2004-04-19 19:17:56 +00:00
|
|
|
for subarch in powerpc power3 power4
|
|
|
|
do
|
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/$subarch/cdrom"
|
|
|
|
else
|
|
|
|
DI_DIR="di_stuff"
|
2004-06-07 09:35:40 +00:00
|
|
|
wget -r -nd --no-parent --level=1 -P "$DI_DIR" "$DI_WWW_HOME/$subarch/cdrom/"
|
|
|
|
wget -r -nd --no-parent --level=1 -P "$DI_DIR/2.6" "$DI_WWW_HOME/$subarch/cdrom/2.6/"
|
|
|
|
rm -f "$DI_DIR"/index* "$DI_DIR/2.6"/index*
|
2004-04-19 19:17:56 +00:00
|
|
|
fi
|
2004-06-07 09:35:40 +00:00
|
|
|
cp -a "$DI_DIR" "$subarch"
|
2004-04-19 19:17:56 +00:00
|
|
|
rm -rf di_stuff
|
|
|
|
done
|
2003-10-09 21:57:34 +00:00
|
|
|
|
|
|
|
exit 0
|