~cyphermox/debian-cd/server-live

« back to all changes in this revision

Viewing changes to tools/boot/etch/boot-sparc

  • Committer: Colin Watson
  • Date: 2005-11-06 09:34:49 UTC
  • mfrom: (unknown (missing))
  • Revision ID: Arch-1:colin.watson@canonical.com--2005%debian-cd--ubuntu--0--patch-205
merge from upstream up to patch-771
Patches applied:

 * debian-cd@arch.ubuntu.com/debian-cd--MAIN--0--patch-771
   Add etch stuff. Mostly copied unchanged from sarge, wit...

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash -e
 
2
 
3
# boot-sparc etch+
 
4
#
 
5
# Do install stuff for sparc, including making first CD bootable
 
6
 
 
7
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
 
8
 
 
9
set -e
 
10
 
 
11
N=$1
 
12
CDDIR=$2
 
13
if [ "$DI_WWW_HOME" = "default" ];then
 
14
   DI_WWW_HOME="http://people.debian.org/~stappers/d-i/images/daily/cdrom"
 
15
fi
 
16
if [ ! "$DI_DIST" ]; then
 
17
   DI_DIST="$DI_CODENAME"
 
18
fi
 
19
 
 
20
:> $N.mkisofs_opts
 
21
 
 
22
# Only disc 1* bootable
 
23
if [ $N != 1 -a $N != 1_NONUS ]; then 
 
24
        exit 0; 
 
25
fi
 
26
 
 
27
install_languages $CDDIR
 
28
 
 
29
echo "-G boot1/boot/isofs.b -B ... boot1" > $N.mkisofs_opts
 
30
rm -rf boot1
 
31
 
 
32
inst=boot1
 
33
 
 
34
# Setup directories
 
35
mkdir -p $inst/boot
 
36
 
 
37
silo_deb=`ls $MIRROR/pool/main/s/silo/silo_*.deb | tail -1`
 
38
# put the relevant parts of SILO boot loader
 
39
(ar p $silo_deb data.tar.gz | \
 
40
        tar zxf - -C $inst/ ./boot/{isofs,second}.b)
 
41
 
 
42
# Some custom etc files
 
43
cp -f -p $BASEDIR/data/etch/sparc/silo.conf $inst/boot/
 
44
BUILD_DATE=$(date +%Y%m%d)
 
45
cat $BASEDIR/data/etch/sparc/debian.txt \
 
46
 | sed "s/\${MEDIA_TYPE}/CDROM/" \
 
47
 | sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
 
48
 | sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
 
49
 > $inst/boot/debian.txt
 
50
 
 
51
# Sparc64 kernel is so big, that uncompressing it corrupts SILO memory, so
 
52
# uncompress it before hand.
 
53
 
 
54
if [ ! "$DI_WWW_HOME" ];then
 
55
        DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom"
 
56
else
 
57
        DI_DIR="."
 
58
        wget "$DI_WWW_HOME" -O di.dir
 
59
        sparc32=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc32\)".*/\1/p' di.dir)
 
60
        sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/p' di.dir)
 
61
        wget "$DI_WWW_HOME/$sparc32" -O vmlinuz-x-sparc32
 
62
        wget "$DI_WWW_HOME/$sparc64" -O vmlinuz-x-sparc64
 
63
        wget "$DI_WWW_HOME/initrd.gz"
 
64
fi
 
65
cp "$DI_DIR"/initrd.gz "$inst/boot/initrd.gz"
 
66
cp "$DI_DIR"/vmlinuz-*-sparc32 "$inst/boot/sparc32"
 
67
zcat "$DI_DIR"/vmlinuz-*-sparc64 > "$inst/boot/sparc64"