From: Brad House Date: Wed, 25 Feb 2004 19:22:36 +0000 (+0000) Subject: allow custom kernel opts per kernel, and amd64 spec file updates, and make USE=-X... X-Git-Tag: CATALYST_2_0_6_916~1111 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7674327bf72ace221700f67a37859287656ee697;p=catalyst.git allow custom kernel opts per kernel, and amd64 spec file updates, and make USE=-X when emerging stuff for each kernel git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@262 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/examples/livecd/amd64/amd64-livecd-stage1-20040223.spec b/examples/livecd/amd64/amd64-livecd-stage1-20040223.spec index 756108bb..8537e7b2 100644 --- a/examples/livecd/amd64/amd64-livecd-stage1-20040223.spec +++ b/examples/livecd/amd64/amd64-livecd-stage1-20040223.spec @@ -16,6 +16,7 @@ livecd/packages: kudzu module-init-tools hotplug + >=glib-2 irssi aumix metalog @@ -55,4 +56,4 @@ livecd/packages: livecd-tools ucl wireless-tools - gpart +# gpart diff --git a/examples/livecd/amd64/amd64-livecd-stage2-20040223.spec b/examples/livecd/amd64/amd64-livecd-stage2-20040223.spec index 308d9282..fbc54f45 100644 --- a/examples/livecd/amd64/amd64-livecd-stage2-20040223.spec +++ b/examples/livecd/amd64/amd64-livecd-stage2-20040223.spec @@ -14,14 +14,17 @@ boot/kernel/gentoo/sources: =sys-kernel/gentoo-dev-sources-2.6.3-r2 boot/kernel/gentoo/config: /usr/share/genkernel/x86_64/kernel-config-2.6 boot/kernel/gentoo/packages: >=sys-apps/pcmcia-cs-3.2.7 boot/kernel/gentoo/extraversion: up +boot/kernel/gentoo/kernelopts: boot/kernel/smp/sources: =sys-kernel/gentoo-dev-sources-2.6.3-r2 boot/kernel/smp/config: /usr/share/genkernel/x86_64/kernel-config-2.6-smp boot/kernel/smp/packages: >=sys-apps/pcmcia-cs-3.2.7 boot/kernel/smp/extraversion: smp +boot/kernel/smp/kernelopts: boot/kernel/emachines/sources: =sys-kernel/gentoo-dev-sources-2.6.3-r2 boot/kernel/emachines/config: /usr/share/genkernel/x86_64/kernel-config-2.6-emachines boot/kernel/emachines/packages: >=sys-apps/pcmcia-cs-3.2.7 boot/kernel/emachines/extraversion: emachines +boot/kernel/emachines/kernelopts: pci=noacpi noapic livecd/unmerge: autoconf automake bin86 binutils libtool m4 bison ld.so make perl patch linux-headers man-pages @@ -64,3 +67,8 @@ livecd/rm: /usr/lib/*.a /usr/lib/gcc-lib/*/*/libgcj* /usr/X11R6/lib/*.a + /usr/share/genkernel + /usr/share/gtk-doc + /boot/kernel* + /boot/initrd* + diff --git a/examples/livecd/runscript/default-runscript.sh b/examples/livecd/runscript/default-runscript.sh index 5eed71f1..39a940fc 100644 --- a/examples/livecd/runscript/default-runscript.sh +++ b/examples/livecd/runscript/default-runscript.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/default-runscript.sh,v 1.16 2004/02/14 22:21:58 brad_mssw Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/default-runscript.sh,v 1.17 2004/02/25 19:22:36 brad_mssw Exp $ #return codes to be used by archscript @@ -148,7 +148,7 @@ EOF # we don't want to use the pkgcache for these since the results # are kernel-dependent. echo DEBUG emerge "\$x" - emerge "\$x" + USE="-X" emerge "\$x" done fi cd /usr/src diff --git a/examples/livecd/runscript/x86-archscript.sh b/examples/livecd/runscript/x86-archscript.sh index f0d7cbbf..345d6e3e 100644 --- a/examples/livecd/runscript/x86-archscript.sh +++ b/examples/livecd/runscript/x86-archscript.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/x86-archscript.sh,v 1.4 2004/01/26 18:15:50 brad_mssw Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/x86-archscript.sh,v 1.5 2004/02/25 19:22:36 brad_mssw Exp $ case $1 in kernel) @@ -52,19 +52,22 @@ case $1 in echo "F2 help.msg" >> $icfg echo "Available kernels:" > $kmsg - echo "TEST HELP MESSAGE" > $hmsg + cp examples/livecd/runscript/x86-help.msg $hmsg for x in $clst_boot_kernel do + + eval custom_kopts=\$${x}_kernelopts + echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" echo >> $icfg echo "label $x" >> $icfg echo " kernel $x" >> $icfg - echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot vga=0x317 splash=silent" >> $icfg + echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot vga=0x317 splash=silent" >> $icfg echo >> $icfg echo " $x" >> $kmsg echo "label $x-nofb" >> $icfg echo " kernel $x" >> $icfg - echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot" >> $icfg + echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot" >> $icfg echo >> $icfg echo " ${x}-nofb" >> $kmsg done diff --git a/examples/livecd/runscript/x86-help.msg b/examples/livecd/runscript/x86-help.msg new file mode 100755 index 00000000..3e2ed792 --- /dev/null +++ b/examples/livecd/runscript/x86-help.msg @@ -0,0 +1,25 @@ +Gentoo Linux 2004.0 LiveCD boot options - [F1 to display available kernels] + +Many kernel profiles exist on a livecd. Please hit F1 +to see the available kernels on this livecd. Please note that +the -nofb counterparts to each kernel disable the framebuffer +and bootsplash. + +Options available to pass to your kernel of choice. +- agpgart loads agpgart (use if you have graphic problems,lockups) +- doscsi scan for scsi devices (breaks some ethernet cards) +- nodetect causes hwsetup/kudzu and hotplug not to run +- dofirewire modprobes firewire modules in initrd (for firewire cdroms,etc) +- nousb disables usb module load from initrd, disables hotplug +- nodhcp dhcp does not automatically start if nic detected +- doataraid loads ide raid modules from initrd +- dopcmcia starts pcmcia service +- noapm disables apm module load +- noraid disables loading of evms modules +- nohotplug disables loading hotplug service +- ide=nodma Force disabling of dma for malfunctioning ide devices +- cdcache Cache the entire runtime portion of cd in ram, allows you + to umount /mnt/cdrom to mount another cdrom. +- noraid disables autoloading of evms modules +- dokeymap enable keymap selection for non-us keyboard layouts +- noapic disable apic (try if having hardware problems ,nics,scsi,etc) diff --git a/modules/targets.py b/modules/targets.py index 5a22766f..8c33cdfd 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -1,6 +1,6 @@ # Distributed under the GNU General Public License version 2 # Copyright 2003-2004 Gentoo Technologies, Inc. -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/targets.py,v 1.90 2004/02/23 05:49:40 brad_mssw Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/targets.py,v 1.91 2004/02/25 19:22:36 brad_mssw Exp $ import os,string,imp,types,shutil from catalyst_support import * @@ -566,6 +566,17 @@ class livecd_stage2_target(generic_stage_target): if retval!=0: self.unbind() raise CatalystError, "Couldn't copy kernel config: "+self.settings["boot/kernel/"+kname+"/config"] + + # If we need to pass special options to the bootloader for this kernel + # put them into the environment. + if self.settings.has_key("boot/kernel/"+kname+"/kernelopts"): + myopts=self.settings["boot/kernel/"+kname+"/kernelopts"] + if type(myopts) != types.StringType: + myopts = string.join(myopts) + os.putenv(kname+"_kernelopts", myopts) + else: + os.putenv(kname+"_kernelopts", "") + try: cmd("/bin/bash "+self.settings["livecd/runscript"]+" kernel "+list_bashify(args),"runscript kernel build failed") cmd("/bin/bash "+self.settings["livecd/runscript"]+" bootloader","bootloader runscript failed.")