[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#678066: Proposal to simplify PowerPC CD/DVD boot options



Package: debian-cd
Tags: patch d-i wheezy
Severity: wishlist


Hello,

I would like to propose a slight change in the way PowerPC CD/DVD boots.

CD/DVD boot-script, which runs on PowerPC Mac machines, can detect whether it runs on 32-bit or 64-bit processor, then offer boot options accordingly. This proposed change makes 32-bit Macs offer 32-bit boot options only. Therefore, pressing ENTER or typing 'install' would load 32-bit kernel. On the other hand, 64-bit PowerPC Macs and IBM CHRP machines would offer 64-bit boot options by default. Therefore, pressing ENTER or typing 'install' would load 64-bit kernel, but it would also offer 32-bit boot options such as install32 or expert32.

Attached diff introduces two new files:

boot32.msg - Boot prompt for 32-bit Macs.
mac32.conf - Options offered on 32-bit Macs.

Diff stats:

data/wheezy/yaboot/boot.msg    |   18 +++++------
data/wheezy/yaboot/boot32.msg  |   16 ++++++++++
data/wheezy/yaboot/mac32.conf  |   35 ++++++++++++++++++++++
data/wheezy/yaboot/ofboot.b    |    9 +++++
data/wheezy/yaboot/yaboot.conf |   54 +++++++++++++++-------------------
tools/boot/wheezy/boot-powerpc |   30 ++++++++++++------
6 files changed, 113 insertions(+), 49 deletions(-)

Any comments?

Milan
Index: data/wheezy/yaboot/mac32.conf
===================================================================
--- data/wheezy/yaboot/mac32.conf	(revision 0)
+++ data/wheezy/yaboot/mac32.conf	(revision 0)
@@ -0,0 +1,35 @@
+## This file is for CD booting only, do not use as reference.
+## Debian GNU/Linux PowerPC (CODENAME)
+
+default=install
+message=/install/boot32.msg
+
+# 32-bit PowerPC subarch 
+
+image=/install/powerpc/vmlinux
+	label=install
+	initrd=/install/powerpc/initrd.gz
+	append="--"
+	initrd-size=10240
+	read-only
+
+image=/install/powerpc/vmlinux
+	label=expert
+	initrd=/install/powerpc/initrd.gz
+	append="priority=low --"
+	initrd-size=10240
+	read-only
+
+image=/install/powerpc/vmlinux
+	label=rescue
+	initrd=/install/powerpc/initrd.gz
+	append="rescue/enable=true --"
+	initrd-size=10240
+	read-only
+
+image=/install/powerpc/vmlinux
+	label=auto
+	initrd=/install/powerpc/initrd.gz
+	append="auto=true priority=critical --"
+	initrd-size=10240
+	read-only
Index: data/wheezy/yaboot/boot32.msg
===================================================================
--- data/wheezy/yaboot/boot32.msg	(revision 0)
+++ data/wheezy/yaboot/boot32.msg	(revision 0)
@@ -0,0 +1,16 @@
+Welcome to Debian GNU/Linux ${DEBIAN_VERSION}!
+
+This is a Debian installation ${MEDIA_TYPE},
+built on ${BUILD_DATE}.
+
+
+Press ENTER to continue, or press TAB for a
+full list of options.
+
+
+If the system fails to boot with a white screen
+which doesn't go away, type: 
+
+install video=ofonly 
+
+
Index: data/wheezy/yaboot/yaboot.conf
===================================================================
--- data/wheezy/yaboot/yaboot.conf	(revision 2346)
+++ data/wheezy/yaboot/yaboot.conf	(working copy)
@@ -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
Index: data/wheezy/yaboot/boot.msg
===================================================================
--- data/wheezy/yaboot/boot.msg	(revision 2346)
+++ data/wheezy/yaboot/boot.msg	(working copy)
@@ -3,16 +3,16 @@
 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)
 
-If the system fails to boot at all (the typical
-symptom is a white screen which doesn't go away),
-add 'video=ofonly'.
+Press TAB for a full list of options.
 
-Press the Tab key for a full list of options, or enter
-'help' for help.
+
+If the system fails to boot with a white screen
+which doesn't go away, add 'video=ofonly'.
+
+
Index: data/wheezy/yaboot/ofboot.b
===================================================================
--- data/wheezy/yaboot/ofboot.b	(revision 2346)
+++ data/wheezy/yaboot/ofboot.b	(working copy)
@@ -8,7 +8,14 @@
 <BOOT-SCRIPT>
 " 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
 </BOOT-SCRIPT>
 <OS-BADGE-ICONS>
 1010
Index: tools/boot/wheezy/boot-powerpc
===================================================================
--- tools/boot/wheezy/boot-powerpc	(revision 2346)
+++ tools/boot/wheezy/boot-powerpc	(working copy)
@@ -75,16 +75,7 @@
 #
 # 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 @@
   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"

Reply to: