2007-04-10 23:21:31 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
#
|
2007-07-26 01:22:33 +00:00
|
|
|
# boot-sparc lenny+
|
2007-04-10 23:21:31 +00:00
|
|
|
#
|
|
|
|
# Do install stuff for sparc, including making first CD bootable
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
2007-07-26 01:22:33 +00:00
|
|
|
DI_WWW_HOME="http://people.debian.org/~stappers/d-i/images/daily"
|
2007-04-10 23:21:31 +00:00
|
|
|
if [ -n "$DI_DIR" ];then
|
|
|
|
DI_DIR="$DI_DIR/~${DI_WWW_HOME#*~}"
|
|
|
|
DI_WWW_HOME=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Only disc 1* bootable
|
|
|
|
if [ $N != 1 -a $N != 1_NONUS ]; then
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
|
|
|
install_languages $CDDIR
|
|
|
|
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-G boot1/boot/isofs.b -B ..."
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot1"
|
|
|
|
|
|
|
|
inst=boot1
|
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
|
|
# Setup directories
|
|
|
|
mkdir -p $inst/boot
|
|
|
|
|
|
|
|
silo_deb=$MIRROR/`zcat $MIRROR/dists/$DI_CODENAME/main/binary-sparc/Packages.gz | \
|
|
|
|
awk '/^Filename: .*\/silo/ {print $2}'`
|
|
|
|
# put the relevant parts of SILO boot loader
|
|
|
|
(ar p $silo_deb data.tar.gz | \
|
|
|
|
tar zxf - -C $inst/ ./boot/{isofs,second}.b)
|
|
|
|
|
|
|
|
# Some custom etc files
|
2007-07-26 01:22:33 +00:00
|
|
|
cp -f -p $BASEDIR/data/lenny/sparc/silo.conf $inst/boot/
|
|
|
|
cat $BASEDIR/data/lenny/sparc/debian.txt \
|
2007-04-10 23:21:31 +00:00
|
|
|
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
|
|
|
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
|
|
|
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
|
|
|
> $inst/boot/debian.txt
|
|
|
|
|
2007-07-26 01:22:33 +00:00
|
|
|
BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz"
|
2007-04-10 23:21:31 +00:00
|
|
|
|
2007-07-26 01:22:33 +00:00
|
|
|
# Download boot images.
|
|
|
|
for image in $BOOT_IMAGES; do
|
|
|
|
if [ ! -e "$image" ]; then
|
|
|
|
dir=$(dirname $image)
|
|
|
|
mkdir -p $dir
|
|
|
|
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/
|
|
|
|
current/images/$image" ]; then
|
|
|
|
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/image
|
|
|
|
s/$image" "$image"
|
|
|
|
elif [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
|
|
|
# echo "Copying images from $DI_DIR"
|
|
|
|
cp "$DI_DIR/$image" "$image"
|
|
|
|
else
|
|
|
|
wget "$DI_WWW_HOME/$image" -O "$image"
|
2007-04-10 23:21:31 +00:00
|
|
|
fi
|
2007-07-26 01:22:33 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Sparc64 kernel is so big, that uncompressing it corrupts SILO memory, so
|
|
|
|
# uncompress it beforehand.
|
2007-04-10 23:21:31 +00:00
|
|
|
|
2007-07-26 01:22:33 +00:00
|
|
|
cp "$DI_DIR"/initrd.gz "$inst/boot/initrd.gz"
|
|
|
|
zcat "$DI_DIR"/vmlinuz > "$inst/boot/sparc64"
|