From 747c65e35433b54e51b10207b34f3535268ddafe Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Sat, 4 Aug 2012 17:47:47 +0000 Subject: [PATCH] * Tweak powerpc boot options, using 32/64 bit detection in yaboot at boot time. Thanks to Milan Kupcevic for the patch. Closes: #678066 --- data/wheezy/yaboot/boot.msg | 18 ++++++------ data/wheezy/yaboot/ofboot.b | 9 +++++- data/wheezy/yaboot/yaboot.conf | 54 ++++++++++++++++------------------ debian/changelog | 2 ++ tools/boot/wheezy/boot-powerpc | 30 ++++++++++++------- 5 files changed, 64 insertions(+), 49 deletions(-) diff --git a/data/wheezy/yaboot/boot.msg b/data/wheezy/yaboot/boot.msg index fe9a2b9d..46c601f8 100644 --- a/data/wheezy/yaboot/boot.msg +++ b/data/wheezy/yaboot/boot.msg @@ -3,16 +3,16 @@ Welcome to Debian GNU/Linux ${DEBIAN_VERSION}! This is a Debian installation ${MEDIA_TYPE}, built on ${BUILD_DATE}. + Enter one of the following options to begin: -install 32-bit processor (G4 or earlier) -install64 64-bit processor (G5 or IBM POWER3/4/5) -expert expert mode on 32-bit processor -expert64 expert mode on 64-bit processor +install 64-bit processor (G5 or POWER3/4/5/6/7) +install32 32-bit processor (G4 or earlier) + +Press TAB for a full list of options. + + +If the system fails to boot with a white screen +which doesn't go away, add 'video=ofonly'. -If the system fails to boot at all (the typical -symptom is a white screen which doesn't go away), -add 'video=ofonly'. -Press the Tab key for a full list of options, or enter -'help' for help. diff --git a/data/wheezy/yaboot/ofboot.b b/data/wheezy/yaboot/ofboot.b index 179602d9..7b8e6ba0 100644 --- a/data/wheezy/yaboot/ofboot.b +++ b/data/wheezy/yaboot/ofboot.b @@ -8,7 +8,14 @@ GNU/Linux PPC bootloader " screen" output load-base release-load-area -boot cd:,\install\yaboot +" /cpus/@0" find-package if + " 64-bit" rot get-package-property 0= if + 2drop + " boot cd:,\install\yaboot conf=cd:,\install\yaboot.conf" eval + else + " boot cd:,\install\yaboot conf=cd:,\install\mac32.conf" eval + then +then 1010 diff --git a/data/wheezy/yaboot/yaboot.conf b/data/wheezy/yaboot/yaboot.conf index 95dde72b..c161614a 100644 --- a/data/wheezy/yaboot/yaboot.conf +++ b/data/wheezy/yaboot/yaboot.conf @@ -1,70 +1,66 @@ ## This yaboot.conf is for CD booting only, do not use as reference. ## Debian GNU/Linux PowerPC (CODENAME) -# It is important not to have a comma after cd: -# Let's disable this one for now, as it breaks on IBM 64bit boxes, -# Not sure if it is ok on powermacs, but yaboot should be able to -# parse that from chosen/bootpath. -# device=cd: default=install - -# FIXME: will this be the correct path? message=/install/boot.msg -# PowerPC subarch -image=/install/powerpc/vmlinux +# 64-bit PowerPC subarch + +image=/install/powerpc64/vmlinux label=install - initrd=/install/powerpc/initrd.gz + initrd=/install/powerpc64/initrd.gz append="--" initrd-size=10240 read-only -image=/install/powerpc/vmlinux +image=/install/powerpc64/vmlinux label=expert - initrd=/install/powerpc/initrd.gz + initrd=/install/powerpc64/initrd.gz append="priority=low --" initrd-size=10240 read-only -image=/install/powerpc/vmlinux +image=/install/powerpc64/vmlinux label=rescue - initrd=/install/powerpc/initrd.gz + initrd=/install/powerpc64/initrd.gz append="rescue/enable=true --" initrd-size=10240 read-only -image=/install/powerpc/vmlinux +image=/install/powerpc64/vmlinux label=auto - initrd=/install/powerpc/initrd.gz + initrd=/install/powerpc64/initrd.gz append="auto=true priority=critical --" initrd-size=10240 read-only -# PowerPC 64bit subarch -image=/install/powerpc64/vmlinux - label=install64 - initrd=/install/powerpc64/initrd.gz + +# 32-bit PowerPC subarch + +image=/install/powerpc/vmlinux + label=install32 + initrd=/install/powerpc/initrd.gz append="--" initrd-size=10240 read-only -image=/install/powerpc64/vmlinux - label=expert64 - initrd=/install/powerpc64/initrd.gz +image=/install/powerpc/vmlinux + label=expert32 + initrd=/install/powerpc/initrd.gz append="priority=low --" initrd-size=10240 read-only -image=/install/powerpc64/vmlinux - label=rescue64 - initrd=/install/powerpc64/initrd.gz +image=/install/powerpc/vmlinux + label=rescue32 + initrd=/install/powerpc/initrd.gz append="rescue/enable=true --" initrd-size=10240 read-only -image=/install/powerpc64/vmlinux - label=auto64 - initrd=/install/powerpc64/initrd.gz +image=/install/powerpc/vmlinux + label=auto32 + initrd=/install/powerpc/initrd.gz append="auto=true priority=critical --" initrd-size=10240 read-only diff --git a/debian/changelog b/debian/changelog index b6e68172..2ae7e747 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ debian-cd (3.1.10) UNRELEASED; urgency=low option. Helps a lot with circular deps such as task-lxde-desktop -> task-desktop -> (task-gnome-desktop | task-lxde-desktop | etc.); in this case, of course task-lxde-desktop should satisfy the OR dep. + * Tweak powerpc boot options, using 32/64 bit detection in yaboot at + boot time. Thanks to Milan Kupcevic for the patch. Closes: #678066 [ Joey Hess ] * Clean up forcd1, removing twm, wmaker, wmakerconf, pump, diff --git a/tools/boot/wheezy/boot-powerpc b/tools/boot/wheezy/boot-powerpc index c4223c4f..5757acfd 100755 --- a/tools/boot/wheezy/boot-powerpc +++ b/tools/boot/wheezy/boot-powerpc @@ -75,16 +75,7 @@ fi # # generate/download images for "powerpc" # (missing: bootvars1.3b.sit.hqx, BootX_1.2.2.sit, boot-floppy-hfs.img) -cat $BASEDIR/data/$DI_CODENAME/yaboot/boot.msg \ - | sed "s/\${MEDIA_TYPE}/CDROM/" \ - | sed "s/\${DEBIAN_VERSION}/${CODENAME}/g" \ - | sed "s/\${BUILD_DATE}/${BUILD_DATE}/g" \ - > boot.msg -cat $BASEDIR/data/$DI_CODENAME/yaboot/yaboot.conf \ - | sed "s/CODENAME/${CODENAME}/g" > yaboot.conf -if [ -n "$KERNEL_PARAMS" ]; then - sed -i "/^[[:space:]]\+append=\"/ s|append=\"|append=\"$KERNEL_PARAMS |" yaboot.conf -fi + cp $BASEDIR/data/$DI_CODENAME/yaboot/ofboot.b ofboot.b for subarch in powerpc powerpc64 #prep @@ -92,11 +83,30 @@ 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" \ + > $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"