File: boot-sparc

package info (click to toggle)
debian-cd 3.1.5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,532 kB
  • ctags: 138
  • sloc: sh: 6,174; perl: 2,352; makefile: 349
file content (76 lines) | stat: -rwxr-xr-x 2,106 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash -e
# 
# boot-sparc etch+
#
# 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
   DI_WWW_HOME="http://people.debian.org/~stappers/d-i/images/daily/cdrom"
   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

silo_deb=$MIRROR/`zcat $MIRROR/dists/$DI_CODENAME/main/binary-sparc/Packages.gz | \
	awk '/^Filename: .*\/silo/ {print $2}'`
# 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/etch/sparc/silo.conf $inst/boot/
cat $BASEDIR/data/etch/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
	if [ ! "$DI_DIR" ];then
	   DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom"
	fi
else
	DI_DIR="."
	mkdir ./2.6
	DI_WWW_HOME=$DI_WWW_HOME/2.6
	wget "$DI_WWW_HOME" -O ./2.6/di.dir
	sparc32=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc32\)".*/\1/p' ./2.6/di.dir)
	sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/p' ./2.6/di.dir)
	wget "$DI_WWW_HOME/$sparc32" -O ./2.6/vmlinuz-x-sparc32
	wget "$DI_WWW_HOME/$sparc64" -O ./2.6/vmlinuz-x-sparc64
	wget "$DI_WWW_HOME/initrd.gz" -O ./2.6/initrd.gz
fi

cp "$DI_DIR"/2.6/initrd.gz "$inst/boot/initrd.gz"
cp "$DI_DIR"/2.6/vmlinuz-*-sparc32 "$inst/boot/sparc32"
zcat "$DI_DIR"/2.6/vmlinuz-*-sparc64 > "$inst/boot/sparc64"