Update to same as potato

This commit is contained in:
Ben Collins 2001-09-02 03:48:43 +00:00
parent 899ca54fb1
commit 2967c3744d
1 changed files with 35 additions and 53 deletions

View File

@ -1,13 +1,13 @@
#!/bin/bash
#
# boot-sparc v 1.13 (c) Steve Dunham <dunham@cse.msu.edu>, Eric
#!/bin/bash -e
#
# boot-sparc v 2.00 (c) Steve Dunham <dunham@cse.msu.edu>, Eric
# Delaunay <delaunay@lix.polytechnique.fr>, Steve McIntyre
# <stevem@chiark.greenend.org.uk>
# <stevem@chiark.greenend.org.uk>, Ben Collins <bcollins@debian.org>
# Released under GPL 31 Mar 1999
# See the file COPYING for license details
# Released as part of the slink_cd package, not much use standalone
#
# Do install stuff for sparc, including making bootable CDs
# Do install stuff for sparc, including making first CD bootable
set -e
@ -16,62 +16,44 @@ CDDIR=$2
cd $CDDIR/..
# Disk 1 only
if [ $N != 1 ]; then
:> $N.mkisofs_opts
exit 0;
:> $N.mkisofs_opts
# Only disc 1* bootable
if [ $N != 1 -a $N != 1_NONUS ]; then
exit 0;
fi
echo -n "boot1" > $N.mkisofs_opts
echo "-B boot/second.b boot1" > $N.mkisofs_opts
rm -rf boot1
rm -fr boot1
inst=boot1
# temporary mount point (eg. for silo to create the bootable CD image)
# only needed for Sparc so far...
#vecho Checking for temporary mount point for SILO
mountpoint=/var/tmp/debian_cd.mnt
if [ -d $mountpoint ]; then
umount $mountpoint || true
else
mkdir -p $mountpoint
fi
# Setup directories
mkdir -p $inst/{boot/sun4{u,cdm},etc}
# put the relevant parts of SILO boot loader
mkdir -p boot1/boot
cp -p $BOOTDIR/cd.b $BOOTDIR/second.b boot1/boot
cat - > boot1/boot/silo.conf << __EOF__
message=!cd1
timeout=300
root=/dev/ram
image[sun4c,sun4d,sun4m]=!cd2
label=linux
initrd=!cd5
image[sun4u]=!cd4
label=linux
initrd=!cd5
image[sun4c,sun4d,sun4m]=!cd3
label=linux-2.2
initrd=!cd5
image[sun4u]=!cd4
label=linux-2.2
initrd=!cd5
__EOF__
(ar p $MIRROR/dists/$CODENAME/main/binary-sparc/base/silo_* data.tar.gz | \
tar zxf - -C $inst/ ./boot/{cd,second}.b)
# linux kernel & co are fetched directly from the install dir
# ... put the message banner in boot/debian.txt
# Some custom etc files
cp -f -p $BASEDIR/tools/boot/potato/sparc-etc/{boot-msg.txt,debian.txt,silo.conf} \
$inst/etc/
(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
cp -p linux-a.out linux-2.2.1-sun4u-a.out \
linux-2.2.1-a.out root.bin sparc_release_note.txt \
$CDDIR/install )
tmp=$TDIR/sparc-root
rm -rf $tmp
mkdir -p $tmp
#echo mount -r -o loop \
# $MIRROR/dists/$CODENAME/main/disks-$ARCH/current/resc1440.bin \
# $mountpoint
mount -r -o loop \
$MIRROR/dists/$CODENAME/main/disks-$ARCH/current/resc1440.bin \
$mountpoint
cp -p $mountpoint/debian.txt boot1/boot/debian.txt
umount $mountpoint
for suba in sun4cdm sun4u; do
ln -s ../../dists/$CODENAME/main/disks-$ARCH/current/$suba/linux-a.out \
$inst/boot/$suba/linux
done
# Unpack the root tree into the directory. we use the tftp root.tar.gz
tar zxf $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/root.tar.gz -C $tmp/
cp -f -a $tmp/debian-sparc-root/. $inst/
# no longer need this
rm -rf $tmp
# Get rid of some junk
rm -f $inst/{boot_message,type.txt}