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

68 lines
1.7 KiB
Plaintext
Raw Normal View History

#!/bin/bash -e
#
# boot-sparc sarge+
#
# 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
2005-03-20 19:09:34 -01:00
DI_WWW_HOME="http://people.debian.org/~stappers/d-i/images/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
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom"
else
DI_DIR="."
wget "$DI_WWW_HOME" -O di.dir
sparc32=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc32\)".*/\1/p' di.dir)
sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/p' di.dir)
wget "$DI_WWW_HOME/$sparc32" -O vmlinuz-x-sparc32
wget "$DI_WWW_HOME/$sparc64" -O vmlinuz-x-sparc64
wget "$DI_WWW_HOME/initrd.gz"
fi
cp "$DI_DIR"/initrd.gz "$inst/boot/initrd.gz"
cp "$DI_DIR"/vmlinuz-*-sparc32 "$inst/boot/sparc32"
zcat "$DI_DIR"/vmlinuz-*-sparc64 > "$inst/boot/sparc64"