File: boot-s390

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 (95 lines) | stat: -rwxr-xr-x 2,870 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
#
# boot-s390 version 0.2
#
# (C) 2001 Jochen Rhrig <jr@debian.org>
#     2005 Frans Pop <fjp@debian.org>
#
# Released under the GNU general Public License.
# See the copyright file for license details.
# Released as part of the debian_cd package, not much use stand alone.
#
# Install stuff for booting an s390 system from VM-reader, tape,
# FTP-server, CD-ROM  or emulated tape.
#
# $1 is the CD number
# $2 is the temporary CD build dir

. $BASEDIR/tools/boot/$CODENAME/common.sh

set -e

N=$1
CDDIR=$2

cd $CDDIR/..

if [ $N != "1" ] && [ $N != "1_NONUS" ] ; then
    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J"
	exit 0
fi

if [ "$DI_WWW_HOME" = "default" ];then
   DI_WWW_HOME="https://lophos.multibuild.org/d-i/images/daily"
      if [ -n "$DI_DIR" -a -e "$DI_DIR/~${DI_WWW_HOME#*~}" ] ; then
            DI_DIR="$DI_DIR/~${DI_WWW_HOME#*~}"
	    DI_WWW_HOME=""
      fi
fi
if [ ! "$DI_DIST" ]; then
   DI_DIST="$DI_CODENAME"
fi

imagedir="boot$N/boot"
mkdir -p $imagedir

# Install the two kernel images, the ramdisk and the parameter file
# The following files need to be included:
# - generic/parmfile.debian    : parameter file
# - generic/initrd.debian      : initrd; to be used for both VM-reader and tape
# - generic/kernel.debian      : kernel for WM-reader
# - tape/kernel.debian         : kernel for tape
# - tape/kernel.debian-nolabel : kernel for tape (nolabel)

images_S390="generic/parmfile.debian generic/initrd.debian generic/kernel.debian tape/kernel.debian tape/kernel.debian-nolabel"

for image in $images_S390; do
	case $image in
		generic/parmfile.debian)
			imagedest=parmfile ;;
		generic/initrd.debian)
			imagedest=root.bin ;;
		generic/kernel.debian)
			imagedest=linux_vm ;;
		tape/kernel.debian)
			imagedest=linux_tp ;;
		tape/kernel.debian-nolabel)
			imagedest=linux_nl ;;
	esac
	imagedest="$imagedir/$imagedest"

	if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
		cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$imagedest"
	elif [ ! "$DI_WWW_HOME" ];then
		if [ ! "$DI_DIR" ];then
			DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
		fi
		cp "$DI_DIR/$image" "$imagedest"
	else
		wget "$DI_WWW_HOME/$image" -O "$imagedest"
	fi
done

# Copy the different boot files
# - d390.ins    : for booting from CD-ROM or FTP-Server
# - d390oco.ins : same, using object-code-only-modules-ramdisk (example)
# - d390.tdf    : for booting from emulated tape
# - d390oco.tdf : same, using object-code-only-modules-ramdisk (example)
cp $BASEDIR/data/$CODENAME/s390/d390* "$imagedir/"

# Copy the README file
cp $BASEDIR/data/$CODENAME/s390/README.boot "boot$N/"

# Include the boot$N/-tree into the iso-image
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J"
add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"