Fix ppc64 iso creation. Add console machine_type for ppc yaboot separation.
authorEric Edgar <rocket@gentoo.org>
Fri, 27 Jan 2006 22:49:10 +0000 (22:49 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 27 Jan 2006 22:49:10 +0000 (22:49 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1051 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
livecd/cdtar/yaboot-1.3.11-ppc-cdtar.tar.bz2 [new file with mode: 0644]
modules/generic_stage_target.py
targets/support/bootloader-setup.sh
targets/support/create-iso.sh

index d9b6f591fa2f33539c522fec03084a334bb69b0c..91e648b87c0e03d330c3fd1f703de1a617ae78a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.536 2006/01/27 15:04:07 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.537 2006/01/27 22:49:10 rocket Exp $
+
+  27 Jan 2006; Eric Edgar <rocket@gentoo.org>
+  +livecd/cdtar/yaboot-1.3.11-ppc-cdtar.tar.bz2,
+  modules/generic_stage_target.py, targets/support/bootloader-setup.sh,
+  targets/support/create-iso.sh:
+  Fix ppc64 iso creation.  Add console machine_type for ppc yaboot separation.
+
+  27 Jan 2006; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, targets/support/bootloader-setup.sh:
+  Add ppc console and  machine_type=ibm
 
   27 Jan 2006; Eric Edgar <rocket@gentoo.org>
   modules/generic_stage_target.py:
diff --git a/livecd/cdtar/yaboot-1.3.11-ppc-cdtar.tar.bz2 b/livecd/cdtar/yaboot-1.3.11-ppc-cdtar.tar.bz2
new file mode 100644 (file)
index 0000000..dfb7472
Binary files /dev/null and b/livecd/cdtar/yaboot-1.3.11-ppc-cdtar.tar.bz2 differ
index 6d232426fa215cc064777953810ccb5b502fdc92..608a992a1dd213ba25ad8d666c8a08b0135ce251 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.124 2006/01/27 15:04:07 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.125 2006/01/27 22:49:10 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -483,6 +483,8 @@ class generic_stage_target(generic_target):
                                self.valid_values.append("boot/kernel/"+x+"/gk_action")
                                self.valid_values.append("boot/kernel/"+x+"/initramfs_overlay")
                                self.valid_values.append("boot/kernel/"+x+"/softlevel")
+                               self.valid_values.append("boot/kernel/"+x+"/console")
+                               self.valid_values.append("boot/kernel/"+x+"/machine_type")
                                self.valid_values.append("boot/kernel/"+x+"/postconf")
                                if addlargs.has_key("boot/kernel/"+x+"/postconf"):
                                        print "boot/kernel/"+x+"/postconf is deprecated"
index b58c1126f8c89dc7a196e2a1f190e3f326afbeec..c0c9ca1135033d51b1ccc26848142ad822ccec73 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.26 2006/01/26 21:53:55 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.27 2006/01/27 22:49:10 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
 
@@ -40,7 +40,7 @@ case ${clst_mainarch} in
                echo "--bootloader=boot/iplboot" >> ${icfg}
                echo "--ramdisk=boot/${first}.igz" >> ${icfg}
                ;;
-       ppc)
+       ppc|ppc64)
                # NO SOFTLEVEL SUPPORT YET
                
                # PPC requirements: 
@@ -63,34 +63,130 @@ case ${clst_mainarch} in
 
                icfg=$1/boot/yaboot.conf
                kmsg=$1/boot/boot.msg
+
                echo "default ${first}" > ${icfg}
                echo "timeout 300" >> ${icfg}
                echo "device=cd:" >> ${icfg}
                echo "root=/dev/ram" >> ${icfg}
                echo "fgcolor=white" >> ${icfg}
                echo "bgcolor=black" >> ${icfg}
-               echo "message=/boot/boot.msg" >> ${icfg}
+               echo "message=/boot" >> ${icfg}
+               
+               # Setup the IBM yaboot.conf     
+               etc_icfg=$1/etc/yaboot.conf
+               mkdir -p $1/etc 
+               IBM_YABOOT="FALSE"
+               echo "default ${first}" > ${etc_icfg}
+               echo "timeout 300" >> ${etc_icfg}
+               echo "device=cd:" >> ${etc_icfg}
+               echo "root=/dev/ram" >> ${etc_icfg}
+               echo "fgcolor=white" >> ${etc_icfg}
+               echo "bgcolor=black" >> ${etc_icfg}
+               echo "message=/boot/boot.msg" >> ${etc_icfg}
+               
                for x in ${clst_boot_kernel}
                do      
+                       eval "clst_kernel_console=\$clst_boot_kernel_${x}_console"
+                       eval "clst_kernel_machine_type=\$clst_boot_kernel_${x}_machine_type"
                        eval custom_kopts=\$${x}_kernelopts
+                               
                        echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
-                       echo >> ${icfg}
-                       echo "image=/boot/${x}" >> ${icfg}
-
-                       if [ -e "$1/boot/${x}.igz" ]
+                       if [ "${clst_kernel_machine_type}" == "ibm" ]
                        then
-                               echo "initrd=/boot/${x}.igz" >> ${icfg}
-                       fi
+                               IBM_YABOOT="true"
+                               if [ -n "${clst_kernel_console}" ]
+                               then
+                                       for y in ${clst_kernel_console}
+                                       do
+                                               echo ${y}
+                                               echo >> ${etc_icfg}
+                                               echo "image=/boot/${x}" >> ${etc_icfg}
 
-                       echo "label=${x}" >> ${icfg}
-                       echo "read-write" >> ${icfg}
-                       if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
-                       then
-                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${icfg}
+                                               if [ -e "$1/boot/${x}.igz" ]
+                                               then
+                                                       echo "initrd=/boot/${x}.igz" >> ${etc_icfg}
+                                               fi
+
+                                               echo "label=${x} [${y}] " >> ${etc_icfg}
+                                               echo "read-write" >> ${icfg}
+                                               if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
+                                               then
+                                                       echo "append=\"${default_append_line} console=${y} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${etc_icfg}
+                                               else
+                                                       echo "append=\"${default_append_line} console=${y} splash=silent\"" >> ${etc_icfg}
+                                               fi
+                                       done
+                               else
+                                       echo >> ${etc_icfg}
+                                       echo "image=/boot/${x}" >> ${etc_icfg}
+
+                                       if [ -e "$1/boot/${x}.igz" ]
+                                       then
+                                               echo "initrd=/boot/${x}.igz" >> ${etc_icfg}
+                                       fi
+
+                                       echo "label=${x}" >> ${etc_icfg}
+                                       echo "read-write" >> ${etc_icfg}
+                                       if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
+                                       then
+                                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${etc_icfg}
+                                       else
+                                               echo "append=\"${default_append_line} splash=silent\"" >> ${etc_icfg}
+                                       fi
+                               fi
                        else
-                               echo "append=\"${default_append_line} splash=silent\"" >> ${icfg}
+                               if [ -n "${clst_kernel_console}" ]
+                               then
+                                       for y in ${clst_kernel_console}
+                                       do
+                                               echo >> ${icfg}
+                                               echo "image=/boot/${x}" >> ${icfg}
+
+                                               if [ -e "$1/boot/${x}.igz" ]
+                                               then
+                                                       echo "initrd=/boot/${x}.igz" >> ${icfg}
+                                               fi
+
+                                               echo "label=${x} [${y}] " >> ${icfg}
+                                               echo "read-write" >> ${icfg}
+                                               if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
+                                               then
+                                                       echo "append=\"${default_append_line} console=${y} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${icfg}
+                                               else
+                                                       echo "append=\"${default_append_line} console=${y} splash=silent\"" >> ${icfg}
+                                               fi
+                                       done
+                               else
+                                       echo >> ${icfg}
+                                       echo "image=/boot/${x}" >> ${icfg}
+
+                                       if [ -e "$1/boot/${x}.igz" ]
+                                       then
+                                               echo "initrd=/boot/${x}.igz" >> ${icfg}
+                                       fi
+
+                                       echo "label=${x}" >> ${icfg}
+                                       echo "read-write" >> ${icfg}
+                                       if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
+                                       then
+                                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme}\"" >> ${icfg}
+                                       else
+                                               echo "append=\"${default_append_line} splash=silent\"" >> ${icfg}
+                                       fi
+                               fi
                        fi
                done
+
+               if [ "${IBM_YABOOT}" == "FALSE" ]
+               then 
+                       rm ${etc_kmsg}
+                       rmdir $1/etc
+                       if [ -d $1/ppc ]
+                       then
+                               rm -r $1/ppc
+                       fi
+               fi
+
                ;;
        sparc*)
                # NO SOFTLEVEL SUPPORT YET
index e6a4ebda5ffe477954902b6f379a03007c0d8496..e7b0faeacc062428cc8be0589b1be4ee790541e6 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.24 2006/01/26 23:39:26 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.25 2006/01/27 22:49:10 rocket Exp $
 
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
@@ -192,7 +192,7 @@ case ${clst_mainarch} in
                        *) die "SGI LiveCDs only support the 'normal' fstype!"  ;;
                esac
        ;;
-       ppc*)
+       ppc)
                case ${clst_livecd_cdfstype} in
                        zisofs)
                                echo "Running mkisofs to create iso image...."
@@ -222,6 +222,43 @@ case ${clst_mainarch} in
                        ;;
                esac
        ;;
+       ppc64)
+               if [ -f ${clst_target_path}/ppc/bootinfo.txt ]
+               then
+                       echo "bootinfo.txt found .. updating it"
+                       sed -i ${clst_target_path}/ppc/bootinfo.txt -e 's#^<description>.*</description>$#<description>'"${clst_iso_volume_id}"'</description>#'
+                       sed -i ${clst_target_path}/ppc/bootinfo.txt -e 's#^<os-name>.*</os-name>$#<os-name>'"${clst_iso_volume_id}"'</os-name>#'
+               fi
+
+               case ${clst_livecd_cdfstype} in
+                       zisofs)
+                               echo "Running mkisofs to create iso image...."
+                               echo "mkisofs -J -r -U -z -chrp-boot -netatalk -hfs -probe \
+                                       -map ${clst_target_path}/boot/map.hfs -part -no-desktop \
+                                       -hfs-volid \"${clst_iso_volume_id}\" -hfs-bless \
+                                       ${clst_target_path}/boot -V \"${clst_iso_volume_id}\" -o \
+                                       ${1} ${clst_target_path}"
+                               mkisofs -J -r -U -z -chrp-boot -netatalk -hfs -probe -map \
+                                       ${clst_target_path}/boot/map.hfs -part -no-desktop \
+                                       -hfs-volid "${clst_iso_volume_id}" -hfs-bless \
+                                       ${clst_target_path}/boot -V "${clst_iso_volume_id}" -o \
+                                       ${1} ${clst_target_path} || die "Cannot make ISO image"
+                       ;;
+                       *)
+                               echo "Running mkisofs to create iso image...."
+                               echo "mkisofs -J -r -U -chrp-boot -netatalk -hfs -probe -map \
+                                       ${clst_target_path}/boot/map.hfs -part -no-desktop \
+                                       -hfs-volid \"${clst_iso_volume_id}\" -hfs-bless \
+                                       ${clst_target_path}/boot -V \"${clst_iso_volume_id}\" -o \
+                                       ${1} ${clst_target_path}"
+                               mkisofs -J -r -U -chrp-boot -netatalk -hfs -probe -map \
+                                       ${clst_target_path}/boot/map.hfs -part -no-desktop \
+                                       -hfs-volid "${clst_iso_volume_id}" -hfs-bless \
+                                       ${clst_target_path}/boot -V "${clst_iso_volume_id}" -o \
+                                       ${1} ${clst_target_path} || die "Cannot make ISO image"
+                       ;;
+               esac
+       ;;
        sparc*)
                # Old silo + patched mkisofs fubar magic
                # Only silo 1.2.x seems to work for most hardware