Fix pegasos kernelz rename;fix default_append_line to not include initrd= as too...
authorEric Edgar <rocket@gentoo.org>
Mon, 21 Nov 2005 17:14:32 +0000 (17:14 +0000)
committerEric Edgar <rocket@gentoo.org>
Mon, 21 Nov 2005 17:14:32 +0000 (17:14 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@903 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/support/bootloader-setup.sh
targets/support/functions.sh

index 68fce54b81e0b3123ada8fc7674d2e2d6decdcc9..25055742371e65d61fccc8888fcd2bae2aecc88b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.391 2005/11/18 22:30:22 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.392 2005/11/21 17:14:32 rocket Exp $
+
+  21 Nov 2005; Eric Edgar <rocket@gentoo.org>
+  targets/support/bootloader-setup.sh, targets/support/functions.sh:
+  Fix pegasos kernelz rename;fix default_append_line to not include initrd= as
+  too many arches dont use it by default, test for an initrd in the yaboot
+  config.
 
   18 Nov 2005; Eric Edgar <rocket@gentoo.org>
   modules/generic_stage_target.py:
index 186882609f2864c7736073382ce7386abbdec949..ae15edcd511e6b05cee5a08145c025e664cd02fa 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.18 2005/11/18 22:09:55 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/bootloader-setup.sh,v 1.19 2005/11/21 17:14:32 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
 
@@ -13,7 +13,7 @@ check_dev_manager
 check_bootargs
 check_filesystem_type
 
-default_append_line="initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
+default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
 
 case ${clst_mainarch} in
        alpha)
@@ -68,7 +68,12 @@ case ${clst_mainarch} in
                        echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
                        echo >> ${icfg}
                        echo "image=/boot/${x}" >> ${icfg}
-                       echo "initrd=/boot/${x}.igz" >> ${icfg}
+                       
+                       if [ -e "/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}" ]
@@ -111,12 +116,12 @@ case ${clst_mainarch} in
                do
                        echo "image=/efi/boot/${x}" >> ${iacfg}
                        echo "  label=${x}" >> ${iacfg}
-                       echo '  append="'${default_append_line}'"' >> ${iacfg}
+                       echo '  append="'initrd=${x}.igz ${default_append_line}'"' >> ${iacfg}
                        echo "  initrd=/efi/boot/${x}.igz" >> ${iacfg}
                        echo >> ${iacfg}
                        echo "image=/efi/boot/${x}" >> ${iacfg}
                        echo "  label=${x}-serial">> ${iacfg}
-                       echo '  append="'${default_append_line}' console=tty0 console=ttyS0,9600"' >> ${iacfg}
+                       echo '  append="'initrd=${x}.igz ${default_append_line}' console=tty0 console=ttyS0,9600"' >> ${iacfg}
                        echo "  initrd=/efi/boot/${x}.igz" >> ${iacfg}
                        echo >> ${iacfg}
                done
@@ -160,16 +165,16 @@ case ${clst_mainarch} in
                                echo "  kernel ${x}" >> ${icfg}
                                if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
                                then
-                                       echo "  append ${default_append_line} vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg}
+                                       echo "  append ${default_append_line} initrd=${x}.igz vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg}
                                else
-                                       echo "  append ${default_append_line} vga=791 splash=silent" >> ${icfg}
+                                       echo "  append ${default_append_line} initrd=${x}.igz vga=791 splash=silent" >> ${icfg}
                                fi
                        
                                echo >> ${icfg}
                                echo "   ${x}" >> ${kmsg}
                                echo "label ${x}-nofb" >> ${icfg}
                                echo "  kernel ${x}" >> ${icfg}
-                               echo "  append ${default_append_line}" >> ${icfg}
+                               echo "  append ${default_append_line} initrd=${x}.igz" >> ${icfg}
                                echo >> ${icfg}
                                echo "   ${x}-nofb" >> ${kmsg}
                        done
index ca412b5c4d362acff29a350ee7dc84d6997e1434..15489c8daa7b0884b4c9b2588d2fd0a0b777fd29 100755 (executable)
@@ -109,7 +109,16 @@ extract_kernels() {
                rm ${1}/config-* 
                
                # change kernel name from "kernel" to "gentoo", for example
-               mv ${1}/kernel-* ${1}/${x}
+               if [ -e ${1}/kernel-* ]
+               then
+                   mv ${1}/kernel-* ${1}/${x}
+               fi
+               
+               # change kernel name from "kernelz" to "gentoo", for example
+               if [ -e ${1}/kernelz-* ]
+               then
+                   mv ${1}/kernelz-* ${1}/${x}
+               fi
 
                # change initrd name from "initrd" to "gentoo.igz", for example
                if [ -e ${1}/initrd-* ]