Switch bootloader from yaboot to grub-ieee1275 on powerpc
This commit is contained in:
parent
6544f2d076
commit
4940b6b64d
|
@ -13,6 +13,7 @@ debian-cd (3.1.24) UNRELEASED; urgency=medium
|
|||
* Add grub-efi{,{-ia64,{-bin}}} to tools/generate_di+k_list on ia64
|
||||
* Remove elilo from tools/generate_di+k_list on {i386,ia64}
|
||||
* Switch bootloader from elilo to grub-efi-ia64 on ia64
|
||||
* Switch bootloader from yaboot to grub-ieee1275 on powerpc
|
||||
|
||||
-- Holger Levsen <holger@debian.org> Wed, 20 Feb 2019 14:12:16 +0100
|
||||
|
||||
|
|
|
@ -15,6 +15,19 @@ N=$1
|
|||
CDDIR=$2
|
||||
INSTALLDIR=$CDDIR/install
|
||||
|
||||
# Common mkisofs options when creating CDs
|
||||
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"
|
||||
|
||||
# mkisofs options specific to powerpc
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfsplus -apm-block-size 2048"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfsplus-file-creator-type chrp tbxi /System/Library/CoreServices/BootX"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs-bless-by p /System/Library/CoreServices"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-sysid PPC -graft-points"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "/System/Library/CoreServices/BootX=$CDDIR/../CD1/boot/grub/powerpc-ieee1275/grub.chrp"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "/System/Library/CoreServices/grub.elf=$CDDIR/../CD1/boot/grub/powerpc.elf"
|
||||
|
||||
# Exit if this is not CD#1/DVD#1
|
||||
if [ $N != "1" ]; then
|
||||
exit 0
|
||||
|
@ -27,125 +40,50 @@ else
|
|||
DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
|
||||
fi
|
||||
|
||||
case "$MKISOFS" in
|
||||
*xorriso*)
|
||||
XORRISO_VER=$(xorriso_version)
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: debian-cd now depends on xorriso for making powerpc bootable CDs."
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
|
||||
cd $CDDIR/..
|
||||
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--iso-level 4"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--netatalk"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-probe"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-map $BASEDIR/data/hfs.map"
|
||||
BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinux cdrom/debian-cd_info.tar.gz"
|
||||
|
||||
# Recommended size for a HFS Catalog is 4 megas per giga, defaults to 4 megas
|
||||
# MAXDISKBLOCKS is measured in 2K blocks
|
||||
newsize=`echo "$MAXDISKBLOCKS * 2048 / 256" | bc`
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs-parms MAX_XTCSIZE=$newsize"
|
||||
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--chrp-boot"
|
||||
# For newworld Mac booting - Note, no spaces in volid!
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-part"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-desktop"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs-bless CD$N/install"
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs-volid Debian/PowerPC_${CODENAME}"
|
||||
|
||||
cd $INSTALLDIR
|
||||
# Extract yaboot from the archive
|
||||
if [ -z "$YABOOT_DEBUG" ]; then
|
||||
YADEB=$(find_pkg_file yaboot)
|
||||
if [ -z "$YADEB" ]; then
|
||||
echo "ERROR: the yaboot package is required." >&2
|
||||
exit 1
|
||||
fi
|
||||
(dpkg --fsys-tarfile "$MIRROR/$YADEB" | \
|
||||
tar xf - -C . ./usr/lib/yaboot/yaboot)
|
||||
mv usr/lib/yaboot/yaboot .
|
||||
rm -rf usr
|
||||
|
||||
if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
|
||||
echo $YADEB >> $CDDIR/../$N.pkgs_extracted
|
||||
find_pkg_file yaboot source >> $CDDIR/../$N.pkgs_extracted
|
||||
fi
|
||||
|
||||
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)
|
||||
|
||||
cp $BASEDIR/data/$DI_CODENAME/yaboot/ofboot.b ofboot.b
|
||||
|
||||
if [ "$DESKTOP"x = ""x ] || [ "$DESKTOP"x = "all"x ] ; then
|
||||
DEFAULT_DESKTOP="$UNSPEC_DESKTOP_DEFAULT"
|
||||
else
|
||||
DEFAULT_DESKTOP="$DESKTOP"
|
||||
fi
|
||||
|
||||
for subarch in powerpc powerpc64 #prep
|
||||
do
|
||||
case $subarch in
|
||||
powerpc|prep)
|
||||
bitness=
|
||||
yabootconf=mac32.conf
|
||||
yabootmsg=boot32.msg
|
||||
;;
|
||||
powerpc64)
|
||||
bitness=64
|
||||
yabootconf=yaboot.conf
|
||||
yabootmsg=boot.msg
|
||||
;;
|
||||
esac
|
||||
|
||||
cat $BASEDIR/data/$DI_CODENAME/yaboot/$yabootconf \
|
||||
| sed "s/CODENAME/${CODENAME}/g" \
|
||||
> $yabootconf
|
||||
|
||||
cat $BASEDIR/data/$DI_CODENAME/yaboot/$yabootmsg \
|
||||
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
||||
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
||||
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
||||
| sed "s/\${DEFAULT_DESKTOP}/${DEFAULT_DESKTOP}/g" \
|
||||
> $yabootmsg
|
||||
|
||||
if [ -n "$KERNEL_PARAMS" ]; then
|
||||
sed -i "/^[[:space:]]\+append=\"/ s|append=\"|append=\"$KERNEL_PARAMS |" $yabootconf
|
||||
fi
|
||||
|
||||
if [ ! "$DI_WWW_HOME" ];then
|
||||
if [ ! "$DI_DIR" ];then
|
||||
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
||||
# Download boot images.
|
||||
for image in $BOOT_IMAGES; do
|
||||
if [ ! -e "$image" ]; then
|
||||
dir=$(dirname $image)
|
||||
mkdir -p $dir
|
||||
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
|
||||
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
|
||||
elif [ ! "$DI_WWW_HOME" ];then
|
||||
if [ ! "$DI_DIR" ];then
|
||||
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
||||
fi
|
||||
cp "$DI_DIR/$image" "$image"
|
||||
else
|
||||
$WGET "$DI_WWW_HOME/$image" -O "$image"
|
||||
fi
|
||||
if ! cp -a "$DI_DIR/$subarch/cdrom" "$subarch" && [ "$bitness" ]; then
|
||||
cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch"
|
||||
fi
|
||||
else
|
||||
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
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
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
|
||||
# We are still missing this for prep
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-prep-boot install/powerpc/vmlinuz-prep.initrd"
|
||||
# Boot setup including config and help files comes from d-i.
|
||||
mkdir -pv $PWD/CD$N
|
||||
cat cdrom/debian-cd_info.tar.gz | (cd CD$N/; tar zx)
|
||||
|
||||
# Copy kernel and initrd
|
||||
mkdir -p $INSTALLDIR
|
||||
cp -lf cdrom/vmlinux $INSTALLDIR/
|
||||
cp -lf cdrom/initrd.gz $INSTALLDIR/
|
||||
|
||||
# Add CHRP boot header
|
||||
if [ -f CD$N/ppc/bootinfo.txt ] ; then
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-chrp-boot-part"
|
||||
fi
|
||||
|
||||
# Copy pegasos forth script, since pegasos machines don't support yaboot yet.
|
||||
cat $BASEDIR/data/$DI_CODENAME/pegasos/pegasos \
|
||||
| sed "s/\${MEDIA_TYPE}/CDROM/" \
|
||||
| sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \
|
||||
| sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \
|
||||
> pegasos
|
||||
|
||||
# Let's copy the IBM CHRP stuff into place now.
|
||||
cd $CDDIR
|
||||
mkdir ppc
|
||||
mkdir ppc/chrp
|
||||
cp $BASEDIR/data/$DI_CODENAME/chrp/bootinfo.txt ppc
|
||||
mkdir etc
|
||||
cp $INSTALLDIR/yaboot.conf etc
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -265,7 +265,6 @@ grub-ieee1275
|
|||
busybox
|
||||
laptop-detect
|
||||
quik
|
||||
yaboot
|
||||
powerpc-utils
|
||||
hfsutils
|
||||
mkvmlinuz
|
||||
|
|
Loading…
Reference in New Issue