2005-05-05 16:15:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Do install stuff for powerpc, including making bootable CDs
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
Merge of changes from Steve's development branch to take us to
debian-cd version 3.0.0. Highlights:
* Support now added for multi-arch CDs/DVDs, including mixed
binary/source discs. Multi-arch discs should be bootable on those
multiple arches, modulo boot-sector clashes. Extra support added
in boot-i386 and boot-amd64 to make the 2 main arches happily
co-exist.
* Disc sizing is now much more intelligent - sizes are defined
depending on the disk type chosen at the start, and discs are now
filled exactly to those sizes while files are added rather than
the old up-front guessing method. Equally, the metadata on the
disc (Packages, Packages.gz, Sources, Sources.gz, md5sums.txt) is
generated as much as possible while this is happening to make the
sizing code incredibly accurate. Using this method of disc sizing
means that customising discs should be much easier/safer - either
add custom contents at the start and debian-cd will fill the
remainder of the disc, or afterwards roll back the packages on the
disc and add extras later.
* Source is now treated as (almost) just another arch, with most of
the special casing for source hidden internally. If asking for
source-only discs, they will simply be built using all the
available sources. If combined with other arches, the sources will
automatically be chosen to match the binary packages. Meeting GPL
requirements was never so easy!
* Removed lots of old cruft to clean up the codebase:
+ non-US support
+ woody support
+ lots of old support scripts that have been made redundant
+ significantly simpler Makefile, much easier to follow
+ old boot-$ARCH.calc files for estimating boot-file sizes are now
(obviously) obsolete and therefore gone
2006-12-07 22:09:01 -01:00
|
|
|
#set -x
|
2005-05-05 16:15:44 +00:00
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
INSTALLDIR=$CDDIR/install
|
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
2006-06-24 12:31:04 +00:00
|
|
|
DI_WWW_HOME="http://people.debian.org/~wouter/d-i/powerpc/daily"
|
2005-09-20 15:10:06 +00:00
|
|
|
if [ -n "$DI_DIR" ];then
|
2005-09-20 17:26:10 +00:00
|
|
|
DI_DIR="$DI_DIR/~${DI_WWW_HOME#*~}"
|
2005-05-17 16:08:15 +00:00
|
|
|
DI_WWW_HOME=""
|
|
|
|
fi
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
Merge of changes from Steve's development branch to take us to
debian-cd version 3.0.0. Highlights:
* Support now added for multi-arch CDs/DVDs, including mixed
binary/source discs. Multi-arch discs should be bootable on those
multiple arches, modulo boot-sector clashes. Extra support added
in boot-i386 and boot-amd64 to make the 2 main arches happily
co-exist.
* Disc sizing is now much more intelligent - sizes are defined
depending on the disk type chosen at the start, and discs are now
filled exactly to those sizes while files are added rather than
the old up-front guessing method. Equally, the metadata on the
disc (Packages, Packages.gz, Sources, Sources.gz, md5sums.txt) is
generated as much as possible while this is happening to make the
sizing code incredibly accurate. Using this method of disc sizing
means that customising discs should be much easier/safer - either
add custom contents at the start and debian-cd will fill the
remainder of the disc, or afterwards roll back the packages on the
disc and add extras later.
* Source is now treated as (almost) just another arch, with most of
the special casing for source hidden internally. If asking for
source-only discs, they will simply be built using all the
available sources. If combined with other arches, the sources will
automatically be chosen to match the binary packages. Meeting GPL
requirements was never so easy!
* Removed lots of old cruft to clean up the codebase:
+ non-US support
+ woody support
+ lots of old support scripts that have been made redundant
+ significantly simpler Makefile, much easier to follow
+ old boot-$ARCH.calc files for estimating boot-file sizes are now
(obviously) obsolete and therefore gone
2006-12-07 22:09:01 -01:00
|
|
|
# Only disk 1* bootable
|
|
|
|
#if [ $N != 1 -a $N != 1_NONUS ]; then
|
|
|
|
# # we don't need HFS cruft on anything but CD 1
|
|
|
|
# :> $N.mkisofs_opts
|
|
|
|
# exit 0
|
|
|
|
#fi
|
2006-11-27 08:43:10 -01:00
|
|
|
|
2005-05-05 16:15:44 +00:00
|
|
|
install_languages $CDDIR
|
|
|
|
|
2006-11-27 01:15:29 -01:00
|
|
|
add_mkisofs_opt $N.mkisofs_opts "--iso-level 2"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "--chrp-boot"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "--netatalk"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-hfs"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-probe"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-map $BASEDIR/data/hfs.map"
|
|
|
|
|
2005-05-05 16:15:44 +00:00
|
|
|
# For newworld Mac booting - Note, no spaces in volid!
|
2006-11-27 01:15:29 -01:00
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-part"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-no-desktop"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-hfs-bless CD$N/install"
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-hfs-volid Debian/PowerPC_${CODENAME}"
|
|
|
|
|
2005-05-05 16:15:44 +00:00
|
|
|
# Recommended size for a HFS Catalog is 4 megas per giga, defaults to 4 megas
|
Merge of changes from Steve's development branch to take us to
debian-cd version 3.0.0. Highlights:
* Support now added for multi-arch CDs/DVDs, including mixed
binary/source discs. Multi-arch discs should be bootable on those
multiple arches, modulo boot-sector clashes. Extra support added
in boot-i386 and boot-amd64 to make the 2 main arches happily
co-exist.
* Disc sizing is now much more intelligent - sizes are defined
depending on the disk type chosen at the start, and discs are now
filled exactly to those sizes while files are added rather than
the old up-front guessing method. Equally, the metadata on the
disc (Packages, Packages.gz, Sources, Sources.gz, md5sums.txt) is
generated as much as possible while this is happening to make the
sizing code incredibly accurate. Using this method of disc sizing
means that customising discs should be much easier/safer - either
add custom contents at the start and debian-cd will fill the
remainder of the disc, or afterwards roll back the packages on the
disc and add extras later.
* Source is now treated as (almost) just another arch, with most of
the special casing for source hidden internally. If asking for
source-only discs, they will simply be built using all the
available sources. If combined with other arches, the sources will
automatically be chosen to match the binary packages. Meeting GPL
requirements was never so easy!
* Removed lots of old cruft to clean up the codebase:
+ non-US support
+ woody support
+ lots of old support scripts that have been made redundant
+ significantly simpler Makefile, much easier to follow
+ old boot-$ARCH.calc files for estimating boot-file sizes are now
(obviously) obsolete and therefore gone
2006-12-07 22:09:01 -01:00
|
|
|
# MAXDISKBLOCKS is measured in 2K blocks
|
|
|
|
newsize=`echo "$MAXDISKBLOCKS * 2048 / 256" | bc`
|
|
|
|
add_mkisofs_opt $N.mkisofs_opts "-hfs-parms MAX_XTCSIZE=$newsize"
|
2005-05-05 16:15:44 +00:00
|
|
|
|
|
|
|
cd $INSTALLDIR
|
|
|
|
# Extract yaboot from the archive
|
|
|
|
if [ -z "$YABOOT_DEBUG" ]; then
|
|
|
|
YADEB="$($BASEDIR/tools/apt-selection cache show yaboot | \
|
|
|
|
grep ^Filename | awk '{print $2}')"
|
|
|
|
(ar p "${MIRROR}/${YADEB}" data.tar.gz | \
|
|
|
|
tar zxf - -C . ./usr/lib/yaboot/yaboot)
|
|
|
|
mv usr/lib/yaboot/yaboot .
|
|
|
|
rm -rf usr
|
|
|
|
else
|
|
|
|
cp -f $YABOOT_DEBUG yaboot
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# generate/download images for "powerpc"
|
|
|
|
# (missing: bootvars1.3b.sit.hqx, BootX_1.2.2.sit, boot-floppy-hfs.img)
|
2005-10-18 08:27:19 +00:00
|
|
|
cat $BASEDIR/data/$DI_CODENAME/yaboot/boot.msg \
|
2005-05-05 16:15:44 +00:00
|
|
|
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
|
|
|
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
|
|
|
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
|
|
|
> boot.msg
|
2005-10-18 08:27:19 +00:00
|
|
|
cat $BASEDIR/data/$DI_CODENAME/yaboot/yaboot.conf \
|
2005-05-05 16:15:44 +00:00
|
|
|
| sed "s/CODENAME/${CODENAME}/g" > yaboot.conf
|
2005-10-18 08:27:19 +00:00
|
|
|
cp $BASEDIR/data/$DI_CODENAME/yaboot/ofboot.b ofboot.b
|
2005-05-05 16:15:44 +00:00
|
|
|
|
2006-12-04 09:30:40 -01:00
|
|
|
for subarch in powerpc powerpc64 prep
|
2005-05-05 16:15:44 +00:00
|
|
|
do
|
2006-12-04 09:30:40 -01:00
|
|
|
case $subarch in
|
|
|
|
powerpc|prep)
|
|
|
|
bitness=
|
|
|
|
;;
|
|
|
|
powerpc64)
|
|
|
|
bitness=64
|
|
|
|
;;
|
|
|
|
esac
|
2005-05-05 16:15:44 +00:00
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
2005-05-17 16:08:15 +00:00
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
2006-08-29 14:09:19 +00:00
|
|
|
if ! cp -a "$DI_DIR/$subarch/cdrom" "$subarch" && [ "$bitness" ]; then
|
|
|
|
cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch"
|
|
|
|
fi
|
2005-05-05 16:15:44 +00:00
|
|
|
else
|
2006-08-29 14:09:19 +00:00
|
|
|
if ! wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom/" && [ "$bitness" ]; then
|
|
|
|
wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom${bitness}/"
|
|
|
|
fi
|
2005-05-05 16:15:44 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
2006-12-04 09:30:40 -01:00
|
|
|
if [ -f prep/vmlinuz-prep.initrd ]; then
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-prep-boot install/prep/vmlinuz-prep.initrd"
|
|
|
|
elif [ -f powerpc/vmlinuz-prep.initrd ]; then
|
2006-04-27 14:05:22 +00:00
|
|
|
# We are still missing this for prep
|
2006-11-27 01:15:29 -01:00
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-prep-boot install/powerpc/vmlinuz-prep.initrd"
|
2006-04-27 14:05:22 +00:00
|
|
|
fi
|
|
|
|
|
2005-06-10 21:45:45 +00:00
|
|
|
# Copy pegasos forth script, since pegasos machines don't support yaboot yet.
|
2005-10-18 08:27:19 +00:00
|
|
|
cat $BASEDIR/data/$DI_CODENAME/pegasos/pegasos \
|
2005-06-10 21:45:45 +00:00
|
|
|
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
|
|
|
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
|
|
|
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
|
|
|
> pegasos
|
|
|
|
|
2005-09-14 17:55:39 +00:00
|
|
|
# Let's copy the IBM CHRP stuff into place now.
|
|
|
|
cd $CDDIR
|
|
|
|
mkdir ppc
|
|
|
|
mkdir ppc/chrp
|
2005-10-18 08:27:19 +00:00
|
|
|
cp $BASEDIR/data/$DI_CODENAME/chrp/bootinfo.txt ppc
|
2005-09-14 17:55:39 +00:00
|
|
|
mkdir etc
|
|
|
|
cp $INSTALLDIR/yaboot.conf etc
|
|
|
|
|
2005-05-05 16:15:44 +00:00
|
|
|
exit 0
|