~tsimonq2/debian-cd/lubuntu-cosmic-changes

« back to all changes in this revision

Viewing changes to tools/boot/maverick/boot-powerpc+ps3

  • Committer: Colin Watson
  • Date: 2010-05-04 15:13:12 UTC
  • Revision ID: cjwatson@canonical.com-20100504151312-664dfv9uibyk14fe
add CONF.sh bits for maverick; copy lucid -> maverick elsewhere

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# Do install stuff for powerpc/ps3, including making bootable CDs
 
4
# Works with debian-installer
 
5
#
 
6
# $1 is the CD number
 
7
# $2 is the temporary CD build dir
 
8
 
 
9
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
 
10
 
 
11
set -e
 
12
 
 
13
N=$1
 
14
CDDIR=$2
 
15
INSTALLDIR=$CDDIR/install
 
16
if [ "$DI_WWW_HOME" = "default" ];then
 
17
   DI_WWW_HOME="http://people.debian.org/~luther/d-i/images/daily"
 
18
fi
 
19
if [ ! "$DI_DIST" ]; then
 
20
   export DI_DIST="$DI_CODENAME"
 
21
fi
 
22
if [ -z "$DI_PATH" ]; then
 
23
   DI_PATH="$($BASEDIR/tools/find-newest-installer)"
 
24
fi
 
25
 
 
26
default_preseed
 
27
 
 
28
cd $CDDIR/..
 
29
 
 
30
# Only disk 1* bootable
 
31
if [ $N != 1 ] && [ $N != 1_NONUS ] && [ -z "$CDIMAGE_ADDON" ]; then
 
32
    :> $N.mkisofs_opts
 
33
    exit 0
 
34
fi
 
35
 
 
36
install_languages $CDDIR
 
37
 
 
38
echo -n "-cache-inodes -J -l" > $N.mkisofs_opts
 
39
 
 
40
"$BASEDIR/tools/sorting_weights" "$N"
 
41
echo -n " -sort $(pwd)/$N.weights " >> $N.mkisofs_opts
 
42
 
 
43
cd $INSTALLDIR
 
44
 
 
45
if [ ! "$DI_WWW_HOME" ]; then
 
46
    cp -a "$DI_PATH/current/images/udeb.list" .
 
47
else
 
48
    wget "$DI_WWW_HOME/udeb.list"
 
49
fi
 
50
(cd $CDDIR/..; check_kernel_sync udeb.list)
 
51
 
 
52
if [ ! "$DI_WWW_HOME" ];then
 
53
    DI_DIR="$DI_PATH/current/images/powerpc64/cdrom"
 
54
else
 
55
    DI_DIR="di_stuff"
 
56
    for image in initrd.gz vmlinux; do
 
57
        dir="$(dirname "$image")"
 
58
        mkdir -p "$DI_DIR/$dir"
 
59
        wget "$DI_WWW_HOME/powerpc64/cdrom/$image" -O "$DI_DIR/$image"
 
60
    done
 
61
fi
 
62
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
 
63
    cp -dR --preserve=mode,timestamps "$DI_DIR"/* .
 
64
    rm -rf di_stuff
 
65
    # Remove special initrds we don't want.
 
66
    rm -f vmlinuz-*.initrd
 
67
fi
 
68
if [ "$CDIMAGE_LIVE" = 1 ]; then
 
69
    mkdir -p "$CDDIR/casper"
 
70
    mv "$CDDIR/casper/filesystem.kernel-powerpc64-smp" "$CDDIR/casper/vmlinux"
 
71
    CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-powerpc64-smp")"
 
72
    mv "$CDDIR/casper/filesystem.initrd-powerpc64-smp" "$CDDIR$CASPER_INITRD"
 
73
fi
 
74
 
 
75
cd $CDDIR
 
76
mkdir -p PS3/otheros
 
77
if [ -z "$KBOOT_DEBUG" ]; then
 
78
    KBOOTDEB="$($BASEDIR/tools/apt-selection cache show ps3-kboot | \
 
79
                grep ^Filename | awk '{print $2}')"
 
80
    ar p "$MIRROR/$KBOOTDEB" data.tar.gz | tar -xzf - -C . ./boot/otheros.bld
 
81
    mv boot/otheros.bld PS3/otheros/
 
82
    rmdir boot
 
83
else
 
84
    cp -f $KBOOT_DEBUG PS3/otheros/otheros.bld
 
85
fi
 
86
 
 
87
mkdir -p etc
 
88
 
 
89
BUILD_DATE="${CDIMAGE_DATE:-$(date +%Y%m%d)}"
 
90
(if [ "$CDIMAGE_DVD" = 1 ] && [ "$CDIMAGE_LIVE" = 1 ]; then
 
91
     cat $BASEDIR/data/$CODENAME/kboot/kboot.msg.dvd
 
92
 elif [ "$CDIMAGE_INSTALL" = 1 ]; then
 
93
     cat $BASEDIR/data/$CODENAME/kboot/kboot.msg.install
 
94
 elif [ "$CDIMAGE_LIVE" = 1 ]; then
 
95
     cat $BASEDIR/data/$CODENAME/kboot/kboot.msg.live
 
96
 fi) \
 
97
 | sed "s/\${MEDIA_TYPE}/CDROM/" \
 
98
 | sed "s/\${DEBIAN_VERSION}/${DEBVERSION}/g" \
 
99
 | sed "s/\${CODENAME}/${CAPCODENAME}/g" \
 
100
 | sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
 
101
 | sed "s#Ubuntu#$HUMANPROJECT#g" \
 
102
 > etc/kboot.msg
 
103
 
 
104
echo 'message=/etc/kboot.msg' > etc/kboot.conf
 
105
 
 
106
if [ "$CDIMAGE_LIVE" = 1 ]; then
 
107
    echo 'timeout=300' >> etc/kboot.conf
 
108
fi
 
109
 
 
110
echo 'default=install' >> etc/kboot.conf
 
111
if [ "$CDIMAGE_LIVE" = 1 ]; then
 
112
    cat >> etc/kboot.conf <<EOF
 
113
install='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper quiet splash only-ubiquity --'
 
114
install_nosplash='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper quiet only-ubiquity --'
 
115
install_driverupdates='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper debian-installer/driver-update=true quiet splash only-ubiquity --'
 
116
live='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper quiet splash --'
 
117
live_nosplash='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper quiet --'
 
118
driverupdates='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS $DEFAULT_PRESEED boot=casper debian-installer/driver-update=true quiet splash --'
 
119
EOF
 
120
fi
 
121
if [ "$CDIMAGE_INSTALL" = 1 ]; then
 
122
    if [ "$CDIMAGE_LIVE" = 1 ]; then
 
123
        install_suffix=_alternate
 
124
    else
 
125
        install_suffix=
 
126
    fi
 
127
    cat >> etc/kboot.conf <<EOF
 
128
install$install_suffix='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS $DEFAULT_PRESEED quiet --'
 
129
expert$install_suffix='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS $DEFAULT_PRESEED priority=low --'
 
130
EOF
 
131
    if [ "$PROJECT" = edubuntu ]; then
 
132
        cat >> etc/kboot.conf <<EOF
 
133
workstation='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS file=/cdrom/preseed/workstation.seed quiet --'
 
134
EOF
 
135
    fi
 
136
    if [ "$PROJECT" != edubuntu ]; then
 
137
        cat >> etc/kboot.conf <<EOF
 
138
oem='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS $DEFAULT_PRESEED oem-config/enable=true quiet --'
 
139
EOF
 
140
    fi
 
141
fi
 
142
if [ "$CDIMAGE_INSTALL_BASE" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
 
143
    cat >> etc/kboot.conf <<EOF
 
144
cli='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS file=/cdrom/preseed/cli.seed --'
 
145
cli_expert='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS file=/cdrom/preseed/cli.seed priority=low --'
 
146
EOF
 
147
fi
 
148
if [ "$CDIMAGE_INSTALL" = 1 ] && [ "$PROJECT" = xubuntu ]; then
 
149
    cat >> etc/kboot.conf <<EOF
 
150
ltsp_server='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS file=/cdrom/preseed/ltsp.seed --'
 
151
EOF
 
152
fi
 
153
if [ "$CDIMAGE_LIVE" = 1 ]; then
 
154
    cat >> etc/kboot.conf <<EOF
 
155
check='/casper/vmlinux initrd=$CASPER_INITRD $KERNEL_PARAMS boot=casper integrity-check quiet splash --'
 
156
EOF
 
157
elif [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
 
158
    cat >> etc/kboot.conf <<EOF
 
159
check='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS MENU=/bin/cdrom-checker-menu quiet --'
 
160
EOF
 
161
fi
 
162
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
 
163
    cat >> etc/kboot.conf <<EOF
 
164
rescue='/install/vmlinux initrd=/install/initrd.gz $KERNEL_PARAMS rescue/enable=true --'
 
165
EOF
 
166
fi
 
167
 
 
168
exit 0