2007-04-10 23:21:31 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
#
|
2007-07-26 08:18:52 +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
|
2008-06-05 22:45:11 +00:00
|
|
|
DI_WWW_HOME="http://people.debian.org/~stappers/d-i/sparc/daily/cdrom"
|
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
|
|
|
|
|
2008-09-15 23:09:18 +00:00
|
|
|
silo_deb=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME silo`
|
2007-04-10 23:21:31 +00:00
|
|
|
# put the relevant parts of SILO boot loader
|
2008-11-23 17:19:25 -01:00
|
|
|
(ar p $MIRROR/$silo_deb data.tar.gz | \
|
2007-04-10 23:21:31 +00:00
|
|
|
tar zxf - -C $inst/ ./boot/{isofs,second}.b)
|
|
|
|
|
2008-11-23 17:19:25 -01:00
|
|
|
echo $silo_deb >> $CDDIR/../$N.pkgs_extracted
|
|
|
|
$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME silo source >> $CDDIR/../$N.pkgs_extracted
|
|
|
|
|
2007-04-10 23:21:31 +00:00
|
|
|
# Some custom etc files
|
2007-07-26 08:18:52 +00:00
|
|
|
cp -f -p $BASEDIR/data/lenny/sparc/silo.conf $inst/boot/
|
2008-10-12 23:30:19 +00:00
|
|
|
if [ -n "$KERNEL_PARAMS" ]; then
|
|
|
|
sed -i "/^[[:space:]]\+append=\"/ s|append=\"|append=\"$KERNEL_PARAMS |" $inst/boot/silo.conf
|
|
|
|
fi
|
2007-07-26 08:18:52 +00:00
|
|
|
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:53:36 +00:00
|
|
|
# Sparc64 kernel is so big, that uncompressing it corrupts SILO memory, so
|
|
|
|
# uncompress it before hand.
|
2007-04-10 23:21:31 +00:00
|
|
|
|
2007-07-26 01:53:36 +00:00
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom"
|
2007-04-10 23:21:31 +00:00
|
|
|
fi
|
2007-07-26 01:53:36 +00:00
|
|
|
else
|
|
|
|
DI_DIR="cdrom"
|
|
|
|
mkdir "./$DI_DIR"
|
|
|
|
wget "$DI_WWW_HOME" -O ./$DI_DIR/di.dir
|
2007-12-11 23:45:02 -01:00
|
|
|
sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/ip' ./$DI_DIR/di.dir)
|
2007-07-26 01:53:36 +00:00
|
|
|
wget "$DI_WWW_HOME/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64
|
|
|
|
wget "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz
|
|
|
|
fi
|
2007-04-10 23:21:31 +00:00
|
|
|
|
2007-08-11 23:23:25 +00:00
|
|
|
if [ ! -e "$DI_DIR"/initrd.gz ] ; then
|
2007-08-11 12:57:12 +00:00
|
|
|
DI_DIR="$DI_DIR"/2.6
|
|
|
|
fi
|
2007-07-26 01:22:33 +00:00
|
|
|
cp "$DI_DIR"/initrd.gz "$inst/boot/initrd.gz"
|
2007-07-26 01:53:36 +00:00
|
|
|
#cp "$DI_DIR"/vmlinuz-*-sparc32 "$inst/boot/sparc32"
|
|
|
|
zcat "$DI_DIR"/vmlinuz-*-sparc64 > "$inst/boot/sparc64"
|