From 95f65c1b26a84578d5ad0de02d1ff9b46e846c9b Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Mon, 21 Nov 2005 17:14:32 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@903 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 8 +++++++- targets/support/bootloader-setup.sh | 21 +++++++++++++-------- targets/support/functions.sh | 11 ++++++++++- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68fce54b..25055742 100644 --- 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 + 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 modules/generic_stage_target.py: diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index 18688260..ae15edcd 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -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 diff --git a/targets/support/functions.sh b/targets/support/functions.sh index ca412b5c..15489c8d 100755 --- a/targets/support/functions.sh +++ b/targets/support/functions.sh @@ -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-* ] -- 2.26.2