debian-cd-clone/tools/boot/sarge/boot-sparc

64 lines
1.7 KiB
Bash
Executable File

#!/bin/bash -e
#
# boot-sparc sarge+
#
# Do install stuff for sparc, including making first CD bootable
. $BASEDIR/tools/boot/$CODENAME/common.sh
set -e
N=$1
CDDIR=$2
if [ "$DI_WWW_HOME" = "default" ];then
DI_WWW_HOME="http://people.debian.org/~jbailey/d-i/sparc/daily/cdrom"
fi
if [ ! "$DI_DIST" ]; then
DI_DIST="$DI_CODENAME"
fi
:> $N.mkisofs_opts
# Only disc 1* bootable
if [ $N != 1 -a $N != 1_NONUS ]; then
exit 0;
fi
install_languages $CDDIR
echo "-G boot1/boot/isofs.b -B ... boot1" > $N.mkisofs_opts
rm -rf boot1
inst=boot1
# Setup directories
mkdir -p $inst/boot
silo_deb=`ls $MIRROR/pool/main/s/silo/silo_*.deb | tail -1`
# 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
cp -f -p $BASEDIR/data/sarge/sparc/silo.conf $inst/boot/
BUILD_DATE=$(date +%Y%m%d)
cat $BASEDIR/data/sarge/sparc/debian.txt \
| sed "s/\${MEDIA_TYPE}/CDROM/" \
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
> $inst/boot/debian.txt
# Sparc64 kernel is so big, that uncompressing it corrupts SILO memory, so
# uncompress it before hand.
if [ ! "$DI_WWW_HOME" ];then
cp "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom/initrd.gz" "$inst/boot/initrd.gz"
cp "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom/vmlinuz-2.4.24-sparc32" "$inst/boot/sparc32"
zcat "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom/vmlinuz-2.4.24-sparc64" > "$inst/boot/sparc64"
else
wget "$DI_WWW_HOME/initrd.gz" -O "$inst/boot/initrd.gz"
wget "$DI_WWW_HOME/vmlinuz-2.4.24-sparc32" -O "$inst/boot/sparc32"
wget "$DI_WWW_HOME/vmlinuz-2.4.24-sparc64"
zcat vmlinuz-2.4.24-sparc64 > "$inst/boot/sparc64"
fi