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 [ "$CDIMAGE_LIVE" = 1 ]; then
92
# generate/download images for "powerpc"
93
# (missing: bootvars1.3b.sit.hqx, BootX_1.2.2.sit, boot-floppy-hfs.img)
94
BUILD_DATE="${CDIMAGE_DATE:-$(date +%Y%m%d)}"
95
(if [ "$CDIMAGE_DVD" = 1 ] && [ "$CDIMAGE_LIVE" = 1 ]; then
96
cat $BASEDIR/data/$CODENAME/yaboot/boot.msg.dvd
97
elif [ "$CDIMAGE_INSTALL" = 1 ]; then
98
cat $BASEDIR/data/$CODENAME/yaboot/boot.msg.install
99
elif [ "$CDIMAGE_LIVE" = 1 ]; then
100
cat $BASEDIR/data/$CODENAME/yaboot/boot.msg.live
102
| sed "s/\${MEDIA_TYPE}/CDROM/" \
103
| sed "s/\${DEBIAN_VERSION}/${DEBVERSION}/g" \
104
| sed "s/\${CODENAME}/${CAPCODENAME}/g" \
105
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
106
| sed "s#Ubuntu#$HUMANPROJECT#g" \
108
(if [ "$CDIMAGE_LIVE" = 1 ]; then
109
sed 's/\${DEFAULT}/live/g' $BASEDIR/data/$CODENAME/yaboot/yaboot.conf
111
sed 's/\${DEFAULT}/install/g' $BASEDIR/data/$CODENAME/yaboot/yaboot.conf
113
if [ "$CDIMAGE_LIVE" = 1 ]; then
114
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.live
116
if [ "$CDIMAGE_INSTALL" = 1 ]; then
117
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.install
118
if [ "$PROJECT" = edubuntu ]; then
119
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.workstation
121
if [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then
122
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.oem
125
if [ "$CDIMAGE_INSTALL_BASE" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
126
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.cli
128
if [ "$CDIMAGE_INSTALL" = 1 ] && ([ "$PROJECT" = ubuntu ] || [ "$PROJECT" = xubuntu ]); then
129
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.ltsp
131
if [ "$CDIMAGE_LIVE" = 1 ]; then
132
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.check-live
133
elif [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
134
cat $BASEDIR/data/$CODENAME/yaboot/yaboot.conf.check
136
| sed "s/CODENAME/${CODENAME}/g" \
137
| sed "s,\${DEFAULT_PRESEED},${DEFAULT_PRESEED},g" \
138
| sed "s,\${TIMEOUT},${timeout},g" \
140
cp $BASEDIR/data/$CODENAME/yaboot/ofboot.b ofboot.b
144
cp -a "$CDDIR/install/yaboot.conf" "$CDDIR/etc/yaboot.conf"
146
< $BASEDIR/data/$CODENAME/yaboot/bootinfo.txt \
147
sed "s/\${HUMANPROJECT}/$HUMANPROJECT/g" \
148
| sed "s/\${CODENAME}/$CODENAME/g" \
149
> "$CDDIR/ppc/bootinfo.txt"
151
if [ ! "$DI_WWW_HOME" ]; then
152
cp -a "$DI_PATH/current/images/udeb.list" .
154
wget "$DI_WWW_HOME/udeb.list"
157
for subarch in powerpc powerpc64
159
if [ ! "$DI_WWW_HOME" ];then
160
DI_DIR="$DI_PATH/current/images/$subarch/cdrom"
163
for image in initrd.gz vmlinux; do
164
dir="$(dirname "$image")"
165
mkdir -p "$DI_DIR/$dir"
166
wget "$DI_WWW_HOME/$subarch/cdrom/$image" -O "$DI_DIR/$image"
169
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
170
cp -dR --preserve=mode,timestamps "$DI_DIR" "$subarch"
172
# Remove special initrds we don't want. OldWorld isn't supported due to
173
# the lack of boot support, and space restrictions are too tight to
174
# support CHRP (including Pegasos) and PReP except on DVDs.
175
rm -f "$subarch/vmlinuz-coff.initrd"
176
if [ "$CDIMAGE_DVD" != 1 ]; then
177
rm -f "$subarch/vmlinuz-chrp.initrd"
178
rm -f "$subarch/vmlinuz-prep.initrd" "$subarch/vmlinuz-ppcbug.initrd"
181
if [ "$CDIMAGE_LIVE" = 1 ]; then
184
casper_subarch=powerpc
187
casper_subarch=powerpc64-smp
190
mkdir -p "$CDDIR/casper/$subarch"
191
mv "$CDDIR/casper/filesystem.kernel-$casper_subarch" \
192
"$CDDIR/casper/$subarch/vmlinux"
193
mv "$CDDIR/casper/filesystem.initrd-$casper_subarch" \
194
"$CDDIR/casper/$subarch/initrd.gz"
198
# Copy pegasos forth script, since pegasos machines don't support yaboot yet.
199
cat $BASEDIR/data/$DI_CODENAME/pegasos/pegasos \
200
| sed "s/\${MEDIA_TYPE}/CDROM/" \
201
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
202
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \