2005-05-05 16:15:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Do install stuff for powerpc, including making bootable CDs
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
2005-09-20 12:15:50 +00:00
|
|
|
set -x
|
2005-05-05 16:15:44 +00:00
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
INSTALLDIR=$CDDIR/install
|
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
2006-03-28 16:23:04 +00:00
|
|
|
DI_WWW_HOME="http://people.debian.org/~cjwatson/d-i/images/daily"
|
2005-09-20 15:10:06 +00:00
|
|
|
if [ -n "$DI_DIR" ];then
|
2005-09-20 17:26:10 +00:00
|
|
|
DI_DIR="$DI_DIR/~${DI_WWW_HOME#*~}"
|
2005-05-17 16:08:15 +00:00
|
|
|
DI_WWW_HOME=""
|
|
|
|
fi
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2005-09-17 17:05:27 +00:00
|
|
|
echo -n " --iso-level 2 --chrp-boot --netatalk -hfs -probe -map $BASEDIR/data/hfs.map" \
|
2005-05-05 16:15:44 +00:00
|
|
|
> $N.mkisofs_opts
|
|
|
|
# For newworld Mac booting - Note, no spaces in volid!
|
|
|
|
echo -n " -part -no-desktop -hfs-bless CD$N/install -hfs-volid Debian/PowerPC_${CODENAME}" \
|
|
|
|
>> $N.mkisofs_opts
|
|
|
|
# Recommended size for a HFS Catalog is 4 megas per giga, defaults to 4 megas
|
|
|
|
if [ -n "$SIZELIMIT1" ];then
|
|
|
|
if [ "$SIZELIMIT1" -gt 1000000000 ];then
|
|
|
|
let newsize="$SIZELIMIT1"/256
|
|
|
|
echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -n "$SIZELIMIT" ];then
|
|
|
|
if [ "$SIZELIMIT" -gt 1000000000 ];then
|
|
|
|
let newsize="$SIZELIMIT"/256
|
|
|
|
echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -n "$DEFBINSIZE" ] && [ "$DEFBINSIZE" -gt 1000 ];then
|
|
|
|
let newsize="$DEFBINSIZE"*4096
|
|
|
|
echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
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 | \
|
|
|
|
tar zxf - -C . ./usr/lib/yaboot/yaboot)
|
|
|
|
mv usr/lib/yaboot/yaboot .
|
|
|
|
rm -rf usr
|
|
|
|
else
|
|
|
|
cp -f $YABOOT_DEBUG yaboot
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# generate/download images for "powerpc"
|
|
|
|
# (missing: bootvars1.3b.sit.hqx, BootX_1.2.2.sit, boot-floppy-hfs.img)
|
|
|
|
BUILD_DATE=$(date +%Y%m%d)
|
2005-10-18 08:27:19 +00:00
|
|
|
cat $BASEDIR/data/$DI_CODENAME/yaboot/boot.msg \
|
2005-05-05 16:15:44 +00:00
|
|
|
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
|
|
|
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
|
|
|
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
|
|
|
> boot.msg
|
2005-10-18 08:27:19 +00:00
|
|
|
cat $BASEDIR/data/$DI_CODENAME/yaboot/yaboot.conf \
|
2005-05-05 16:15:44 +00:00
|
|
|
| sed "s/CODENAME/${CODENAME}/g" > yaboot.conf
|
2005-10-18 08:27:19 +00:00
|
|
|
cp $BASEDIR/data/$DI_CODENAME/yaboot/ofboot.b ofboot.b
|
2005-05-05 16:15:44 +00:00
|
|
|
|
2005-09-14 17:55:39 +00:00
|
|
|
for subarch in powerpc powerpc64
|
2005-05-05 16:15:44 +00:00
|
|
|
do
|
2005-09-20 17:26:10 +00:00
|
|
|
bitness=${subarch#powerpc}
|
2005-05-05 16:15:44 +00:00
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
2005-05-17 16:08:15 +00:00
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
2005-09-20 17:26:10 +00:00
|
|
|
cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch"
|
2005-05-05 16:15:44 +00:00
|
|
|
else
|
2005-09-20 17:26:10 +00:00
|
|
|
wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom${bitness}/"
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
2006-04-27 14:05:22 +00:00
|
|
|
if [ -f powerpc/vmlinuz-prep.initrd ]; then
|
|
|
|
# We are still missing this for prep
|
|
|
|
echo -n " -prep-boot install/powerpc/vmlinuz-prep.initrd" >> $CDDIR/../$N.mkisofs_opts
|
|
|
|
fi
|
|
|
|
|
2005-06-10 21:45:45 +00:00
|
|
|
# Copy pegasos forth script, since pegasos machines don't support yaboot yet.
|
|
|
|
BUILD_DATE=$(date +%Y%m%d)
|
2005-10-18 08:27:19 +00:00
|
|
|
cat $BASEDIR/data/$DI_CODENAME/pegasos/pegasos \
|
2005-06-10 21:45:45 +00:00
|
|
|
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
|
|
|
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
|
|
|
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
|
|
|
> pegasos
|
|
|
|
|
2005-09-14 17:55:39 +00:00
|
|
|
# Let's copy the IBM CHRP stuff into place now.
|
|
|
|
cd $CDDIR
|
|
|
|
mkdir ppc
|
|
|
|
mkdir ppc/chrp
|
2005-10-18 08:27:19 +00:00
|
|
|
cp $BASEDIR/data/$DI_CODENAME/chrp/bootinfo.txt ppc
|
2005-09-14 17:55:39 +00:00
|
|
|
mkdir etc
|
|
|
|
cp $INSTALLDIR/yaboot.conf etc
|
|
|
|
|
2005-05-05 16:15:44 +00:00
|
|
|
exit 0
|