3
# Do install stuff for powerpc, including making bootable CDs
4
# Works with debian-installer
7
# $2 is the temporary CD build dir
9
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
15
INSTALLDIR=$CDDIR/install
16
if [ "$DI_WWW_HOME" = "default" ];then
17
DI_WWW_HOME="http://people.debian.org/~luther/d-i/images/daily"
19
if [ ! "$DI_DIST" ]; then
20
export DI_DIST="$DI_CODENAME"
22
if [ -z "$DI_PATH" ]; then
23
DI_PATH="$($BASEDIR/tools/find-newest-installer)"
30
# Only disk 1* bootable
31
if [ $N != 1 ] && [ $N != 1_NONUS ] && [ -z "$CDIMAGE_ADDON" ]; then
32
# we don't need HFS cruft on anything but CD 1
37
install_languages $CDDIR
39
echo -n "--netatalk -hfs -probe -map $BASEDIR/data/hfs.map" \
41
# We are still missing this for prep
42
#echo -n " -prep-boot install/powerpc/vmlinuz-prep.initrd" >> $N.mkisofs_opts
43
echo -n " -chrp-boot -iso-level 2" >> $N.mkisofs_opts
44
# For newworld Mac booting - Note, no spaces in volid!
45
echo -n " -part -no-desktop -hfs-bless CD$N/install -hfs-volid ${CAPPROJECT}_PowerPC_${CODENAME} " \
47
# Recommended size for a HFS Catalog is 4 megas per giga, defaults to 4 megas
48
if [ "$CDIMAGE_DVD" = 1 ]; then
49
if [ -n "$SIZELIMIT1" ];then
50
if [ "$SIZELIMIT1" -gt 1000000000 ];then
51
let newsize="$SIZELIMIT1"/256
52
echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
55
if [ -n "$SIZELIMIT" ];then
56
if [ "$SIZELIMIT" -gt 1000000000 ];then
57
let newsize="$SIZELIMIT"/256
58
echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
61
if [ -n "$DEFBINSIZE" ] && [ "$DEFBINSIZE" -gt 1000 ];then
62
let newsize="$DEFBINSIZE"*4096
63
echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
69
"$BASEDIR/tools/sorting_weights" "$N"
70
echo -n " -sort $(pwd)/$N.weights " >> $N.mkisofs_opts
73
# Extract yaboot from the archive
74
if [ -z "$YABOOT_DEBUG" ]; then
75
YADEB="$($BASEDIR/tools/apt-selection cache show yaboot | \
76
grep ^Filename | awk '{print $2}')"
77
(ar p "${MIRROR}/${YADEB}" data.tar.gz | \
78
tar zxf - -C . ./usr/lib/yaboot/yaboot)
79
mv usr/lib/yaboot/yaboot .
82
cp -f $YABOOT_DEBUG yaboot
85
if [ ! "$DI_WWW_HOME" ]; then
86
cp -a "$DI_PATH/current/images/udeb.list" .
88
wget "$DI_WWW_HOME/udeb.list"
90
(cd $CDDIR/..; check_kernel_sync udeb.list)
92
for subarch in powerpc powerpc64
94
if [ ! "$DI_WWW_HOME" ];then
95
DI_DIR="$DI_PATH/current/images/$subarch/cdrom"
98
for image in initrd.gz vmlinux; do
99
dir="$(dirname "$image")"
100
mkdir -p "$DI_DIR/$dir"
101
wget "$DI_WWW_HOME/$subarch/cdrom/$image" -O "$DI_DIR/$image"
104
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
105
cp -dR --preserve=mode,timestamps "$DI_DIR" "$subarch"
107
# Remove special initrds we don't want. OldWorld isn't supported due to
108
# the lack of boot support, and space restrictions are too tight to
109
# support CHRP (including Pegasos) and PReP except on DVDs.
110
rm -f "$subarch/vmlinuz-coff.initrd"
111
if [ "$CDIMAGE_DVD" != 1 ]; then
112
rm -f "$subarch/vmlinuz-chrp.initrd"
113
rm -f "$subarch/vmlinuz-prep.initrd" "$subarch/vmlinuz-ppcbug.initrd"
116
if [ "$CDIMAGE_LIVE" = 1 ]; then
119
casper_subarch=powerpc
120
casper_initrd_var=CASPER_POWERPC_INITRD
123
casper_subarch=powerpc64-smp
124
casper_initrd_var=CASPER_POWERPC64_INITRD
127
mkdir -p "$CDDIR/casper/$subarch"
128
mv "$CDDIR/casper/filesystem.kernel-$casper_subarch" \
129
"$CDDIR/casper/$subarch/vmlinux"
130
eval "$casper_initrd_var=/casper/$subarch/initrd$(initrd_suffix "$CDDIR/casper/filesystem.kernel-$casper_subarch")"
131
eval mv "$CDDIR/casper/filesystem.initrd-$casper_subarch" \
132
"$CDDIR\$$casper_initrd_var"
136
if [ "$CDIMAGE_LIVE" = 1 ]; then
137
timeout='timeout=300'
143
# generate/download images for "powerpc"
144
# (missing: bootvars1.3b.sit.hqx, BootX_1.2.2.sit, boot-floppy-hfs.img)
145
BUILD_DATE="${CDIMAGE_DATE:-$(date +%Y%m%d)}"
146
(if [ "$CDIMAGE_DVD" = 1 ] && [ "$CDIMAGE_LIVE" = 1 ]; then
147
cat $BASEDIR/data/$CODENAME/yaboot/boot.msg.dvd
148
elif [ "$CDIMAGE_INSTALL" = 1 ]; then
149
cat $BASEDIR/data/$CODENAME/yaboot/boot.msg.install
150
elif [ "$CDIMAGE_LIVE" = 1 ]; then
151
cat $BASEDIR/data/$CODENAME/yaboot/boot.msg.live
153
| sed "s/\${MEDIA_TYPE}/CDROM/" \
154
| sed "s/\${DEBIAN_VERSION}/${DEBVERSION}/g" \
155
| sed "s/\${CODENAME}/${CAPCODENAME}/g" \
156
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
157
| sed "s#Ubuntu#$HUMANPROJECT#g" \
159
(if [ "$CDIMAGE_LIVE" = 1 ]; then
160
sed 's/\${DEFAULT}/live/g' $BASEDIR/data/$CODENAME/yaboot/yaboot.conf
162
sed 's/\${DEFAULT}/install/g' $BASEDIR/data/$CODENAME/yaboot/yaboot.conf
164
if [ "$CDIMAGE_LIVE" = 1 ]; then
165
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.live
167
if [ "$CDIMAGE_INSTALL" = 1 ]; then
168
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.install
169
if [ "$PROJECT" = edubuntu ]; then
170
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.workstation
172
if [ "$PROJECT" != edubuntu ]; then
173
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.oem
176
if [ "$CDIMAGE_INSTALL_BASE" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
177
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.cli
179
if [ "$CDIMAGE_INSTALL" = 1 ] && ([ "$PROJECT" = ubuntu ] || [ "$PROJECT" = xubuntu ]); then
180
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.ltsp
182
if [ "$CDIMAGE_LIVE" = 1 ]; then
183
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.check-live
184
elif [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
185
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.check
187
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
188
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.rescue
190
| sed "s/CODENAME/${CODENAME}/g" \
191
| sed "s,\${DEFAULT_PRESEED},${DEFAULT_PRESEED},g" \
192
| sed "s,\${TIMEOUT},${timeout},g" \
193
| sed "s,\${CASPER_POWERPC_INITRD},${CASPER_POWERPC_INITRD},g" \
194
| sed "s,\${CASPER_POWERPC64_INITRD},${CASPER_POWERPC64_INITRD},g" \
196
cp $BASEDIR/data/$CODENAME/yaboot/ofboot.b ofboot.b
200
cp -a "$CDDIR/install/yaboot.conf" "$CDDIR/etc/yaboot.conf"
202
< $BASEDIR/data/$CODENAME/yaboot/bootinfo.txt \
203
sed "s/\${HUMANPROJECT}/$HUMANPROJECT/g" \
204
| sed "s/\${CODENAME}/$CODENAME/g" \
205
> "$CDDIR/ppc/bootinfo.txt"
207
# Copy pegasos forth script, since pegasos machines don't support yaboot yet.
208
cat $BASEDIR/data/$DI_CODENAME/pegasos/pegasos \
209
| sed "s/\${MEDIA_TYPE}/CDROM/" \
210
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
211
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \