File: boot-alpha

package info (click to toggle)
debian-cd 3.2.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,848 kB
  • sloc: sh: 6,129; perl: 4,129; makefile: 413
file content (103 lines) | stat: -rwxr-xr-x 2,846 bytes parent folder | download | duplicates (18)
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
96
97
98
99
100
101
102
103
#!/bin/bash
#
# Do install stuff for alpha, including making bootable CDs
# Works with debian-installer
#
#Vorlon:
#
#The following pieces are still missing:
#
#- MILO bootloader & images.  I have no way to test this directly, and
#  haven't used MILO for years, so I'm giving this a pass on the first
#  run.
#- Floppy images.  Currently, debian-installer claims not to support
#  the floppy target on alpha, which is arbitrary, but there may just not
#  be any reason to continue supporting this install method.  Another
#  decision that can be made later.
#
# $1 is the CD number
# $2 is the temporary CD build dir

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

set -e

N=$1
CDDIR=$2
INSTALLDIR="install"

# Common options for all disks
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-l"

# Exit if this is not CD#1/DVD#1
if [ $N != "1" ]; then
    exit 0
fi

if [ "$DI_WWW_HOME" = "default" ]; then
    DI_WWW_HOME="https://d-i.debian.org/daily-images/alpha/daily/cdrom/"
    try_di_image_cache
else
    DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
fi

cd $CDDIR/..

#
# This script is called with $1 (now $N) as the CD to 
# make bootable.

# Only disk 1* bootable
if [ $N != 1 ]; then
	exit 0
fi

ABOOTDEB=$(find_pkg_file aboot-base)
if [ -z "$ABOOTDEB" ] ; then 
    echo "ERROR:  the aboot-base package is required." >&2
    exit 1
fi

mkdir boot$N
(dpkg --fsys-tarfile "$MIRROR/$ABOOTDEB" | tar xf - -C boot$N/ ./boot/bootlx)

# Download boot images
# XXX: Driver floppies?  Any alpha that /has/ a CDROM should be able to
# boot from it, so this would be pure convenience of distribution.
#for image in cd_drivers-image.img cdrom-image.img cdrom-initrd.gz floppy-image.img floppy-initrd.gz net_drivers-image.img netboot-initrd.gz vmlinuz ; do

for image in initrd.gz vmlinuz; do
    if [ ! -e "$image" ]; then
	if [ ! "$DI_WWW_HOME" ];then
		if [ ! "$DI_DIR" ];then
		   DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current"
		fi
		ab_file=`ls "$DI_DIR"/cdrom/$image* | tail -1`
		cp "$ab_file" .
	else
		$WGET "$DI_WWW_HOME/$image"
	fi
    fi
done

echo "Using $THISTYPE boot-disks image on CD$N"
mkdir -p boot$N/boot
cp initrd.gz boot$N/boot/
cp vmlinuz* boot$N/boot/vmlinuz
mkdir -p boot$N/etc

RSIZE=$(expr $(zcat boot$N/boot/initrd.gz | wc --bytes) / 1024)
OPTS="ramdisk_size=$RSIZE initrd=/boot/initrd.gz root=/dev/ram devfs=mount,dall $KERNEL_PARAMS"

echo "0:boot/vmlinuz $OPTS"               >  boot$N/etc/aboot.conf
echo "1:boot/vmlinuz $OPTS console=ttyS0" >> boot$N/etc/aboot.conf
echo "2:boot/vmlinuz $OPTS console=ttyS1" >> boot$N/etc/aboot.conf

mkdir -p boot$N/milo

add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-alpha-boot boot/bootlx"

add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"