From: John P. Davis Date: Sat, 16 Oct 2004 13:38:09 +0000 (+0000) Subject: patches for gensplash support from Chris Gianelloni X-Git-Tag: CATALYST_2_0_6_916~907 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c66d586e94943c19e732eb1da21f12cbe5a9702;p=catalyst.git patches for gensplash support from Chris Gianelloni git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@466 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index fa9f7cd3..c1870d05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.96 2004/10/15 02:54:16 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.97 2004/10/16 13:38:09 zhen Exp $ + + 16 Oct 2004; livecd/files/x86-help.msg, + livecd/runscript/x86-archscript.sh, livecd/runscript-support/kmerge.sh, + livecd/runscript-support/livecdfs-update.sh, + modules/livecd_stage2_target.py: + patches for gensplash support from Chris Gianelloni 14 Oct 2004; livecd/runscript/x86-archscript.sh: acpi=off changed to acpi=ht. enables HT automatically for intel users, but diff --git a/livecd/files/x86-help.msg b/livecd/files/x86-help.msg index 9e3267fc..512d95aa 100755 --- a/livecd/files/x86-help.msg +++ b/livecd/files/x86-help.msg @@ -1,23 +1,23 @@ -Gentoo Linux Installation LiveCD boot options - [F1 to display available kernels] +Gentoo Linux LiveCD boot options - [F1 to display available kernels] -Many kernel profiles exist on a livecd. Please hit F1 +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. Additionally, the memtest86 boot option is available +and splash images. Additionally, the memtest86 boot option is available to test local RAM for errors. To use memtest86, just type 'memtest86'. Options available to pass to your kernel of choice. - agpgart loads agpgart (use if you have graphic problems,lockups) - acpi=on loads support for ACPI firmware - ide=nodma Force disabling of dma for malfunctioning ide devices - to umount /mnt/cdrom to mount another cdrom. - doscsi scan for scsi devices (breaks some ethernet cards) - doataraid loads ide raid modules from initrd - dopcmcia starts pcmcia service -- doapm disables apm module load +- doapm enables apm module load - dofirewire modprobes firewire modules in initrd (for firewire cdroms,etc) - dokeymap enable keymap selection for non-us keyboard layouts - docache Cache the entire runtime portion of cd in ram, allows you + to umount /mnt/cdrom to mount another cdrom. - nodetect causes hwsetup/kudzu and hotplug not to run - nousb disables usb module load from initrd, disables hotplug - nodhcp dhcp does not automatically start if nic detected diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index 2a01ee78..e66a2711 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.12 2004/10/15 02:41:03 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.13 2004/10/16 13:38:09 zhen Exp $ die() { echo "$1" @@ -13,13 +13,29 @@ build_kernel() { GK_ARGS="${clst_livecd_gk_mainargs} \ ${clst_livecd_gk_kernargs} \ --kerneldir=/usr/src/linux \ + --do-keymap-auto \ --kernel-config=/var/tmp/${clst_kname}.config \ --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all" # extra genkernel options that we have to test for - if [ -n "${clst_livecd_bootsplash}" ] + if [ "${clst_livecd_splash_type}" == "bootsplash" -a -n "${clst_livecd_splash_theme}" ] then - GK_ARGS="${GK_ARGS} --bootsplash=${clst_livecd_bootsplash}" + GK_ARGS="${GK_ARGS} --bootsplash=${clst_livecd_splash_theme}" + fi + + if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ] + then + GK_ARGS="${GK_ARGS} --gensplash=${clst_livecd_splash_theme}" + fi + + if [ -e "/var/tmp/${clst_kname}.postconf" ] + then + for x in $( cat /var/tmp/${clst_kname}.postconf ) + do + clst_kernel_postconf="${clst_kernel_postconf} ${x}" + done + + GK_ARGS="${GK_ARGS} ${clst_kernel_postconf}" fi if [ "${clst_livecd_devmanager}" == "udev" ] @@ -29,7 +45,8 @@ build_kernel() { # build with genkernel using the set options # callback is put here to avoid escaping issues - genkernel ${GK_ARGS} --callback="emerge ${clst_kernel_merge}" || exit 1 + genkernel ${GK_ARGS} --callback="emerge ${clst_kernel_merge}" \ + --postconf="emerge ${clst_kernel_postconf}" || exit 1 # pack up the modules for resuming tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \ diff --git a/livecd/runscript-support/livecdfs-update.sh b/livecd/runscript-support/livecdfs-update.sh index c2508778..78b3e667 100755 --- a/livecd/runscript-support/livecdfs-update.sh +++ b/livecd/runscript-support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.13 2004/10/15 02:41:03 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.14 2004/10/16 13:38:09 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -26,7 +26,7 @@ rc-update del consolefont rc-update add metalog default rc-update add modules default rc-update add pwgen default -[ -e /etc/init.d/bootsplash ] && rc-update add bootsplash default +[ -e /etc/init.d/splash ] && rc-update add splash default # switch the order of rcadd/ rcdel if [ -n "${clst_livecd_rcadd}" ] || [ -n "${clst_livecd_rcdel}" ] @@ -51,12 +51,24 @@ fi rm -rf /etc/localtime cp /usr/share/zoneinfo/GMT /etc/localtime echo "livecd" > /etc/hostname +echo "gentoo" > /etc/dnsdomainname -sed -i -e '/\/dev\/[RBS]*/ s/^/#/' /etc/fstab +# fstab tweaks +#sed -i -e '/\/dev\/[RBS]*/ s/^/#/' /etc/fstab echo "tmpfs / tmpfs defaults 0 0" >> /etc/fstab echo "tmpfs /usr/lib/hotplug/firmware tmpfs defaults 0 0" >> /etc/fstab sed -i -e '/dev-state/ s/^/#/' /etc/devfsd.conf +# tweak the livecd fstab so that users know not to edit it +# http://bugs.gentoo.org/show_bug.cgi?id=60887 +mv /etc/fstab /etc/fstab.old +echo "###############################################" >> /etc/fstab +echo "## ATTENTION: THIS IS THE FSTAB ON THE LIVECD" >> /etc/fstab +echo "## PLEASE EDIT THE FSTAB IN /mnt/gentoo/etc" >> /etc/fstab +echo "###############################################" >> /etc/fstab +cat /etc/fstab.old >> /etc/fstab +rm /etc/fstab.old + echo "alias cp='cp -i'" >> /etc/profile echo "alias ls='ls --color'" >> /etc/profile echo "alias mv='mv -i'" >> /etc/profile @@ -66,8 +78,8 @@ echo "alias rm='rm -i'" >> /etc/profile # make sure we have the latest pci and hotplug ids if [ -d /usr/share/hwdata ] then - rm -f /usr/share/hwdata/pci.ids - rm -f /usr/share/hwdata/usb.ids + [ -f /usr/share/misc/pci.ids ] && rm -f /usr/share/hwdata/pci.ids + [ -f /usr/share/misc/usb.ids ] && rm -f /usr/share/hwdata/usb.ids ln -s /usr/share/misc/pci.ids /usr/share/hwdata/pci.ids ln -s /usr/share/misc/usb.ids /usr/share/hwdata/usb.ids fi @@ -94,26 +106,28 @@ fi rm -f /etc/generic.motd.txt /etc/universal.motd.txt /etc/minimal.motd.txt /etc/gamecd.motd.txt -# setup bootsplash (if called for) -if [ -n "${clst_livecd_bootsplash}" ] +# setup splash/bootsplash (if called for) +if [ "${clst_livecd_splash_type}" == "bootsplash" -a -n "${clst_livecd_splash_theme}" ] then - if [ -d "/etc/bootsplash/${clst_livecd_bootsplash}" ] + if [ -d "/etc/bootsplash/${clst_livecd_splash_theme}" ] then sed -i 's/BOOTSPLASH_THEME=\"gentoo\"/BOOTSPLASH_THEME=\"${clst_livecd_bootsplash}\"/' /etc/conf.d/bootsplash rm /etc/bootsplash/default - ln -s "/etc/bootsplash/${clst_livecd_bootsplash}" /etc/bootsplash/default + ln -s "/etc/bootsplash/${clst_livecd_splash_theme}" /etc/bootsplash/default else - echo "Error, cannot setup bootsplash theme ${clst_livecd_bootsplash}" + echo "Error, cannot setup bootsplash theme ${clst_livecd_splash_theme}" exit 1 fi -fi -# tweak the livecd fstab so that users know not to edit it -# http://bugs.gentoo.org/show_bug.cgi?id=60887 -mv /etc/fstab /etc/fstab.old -echo "###############################################" >> /etc/fstab -echo "## ATTENTION: THIS IS THE FSTAB ON THE LIVECD" >> /etc/fstab -echo "## PLEASE EDIT THE FSTAB IN /mnt/gentoo/etc" >> /etc/fstab -echo "###############################################" >> /etc/fstab -cat /etc/fstab.old >> /etc/fstab -rm /etc/fstab.old +elif [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ] +then + if [ -d "/etc/splash/${clst_livecd_splash_theme}" ] + then + sed -i 's/# SPLASH_THEME="gentoo"/SPLASH_THEME=\"${clst_livecd_bootsplash}\"/' /etc/conf.d/splash + rm /etc/splash/default + ln -s "/etc/splash/${clst_livecd_splash_theme}" /etc/splash/default + else + echo "Error, cannot setup splash theme ${clst_livecd_splash_theme}" + exit 1 + fi +fi diff --git a/livecd/runscript/x86-archscript.sh b/livecd/runscript/x86-archscript.sh index af566f52..9b4da5c1 100644 --- a/livecd/runscript/x86-archscript.sh +++ b/livecd/runscript/x86-archscript.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.12 2004/10/15 02:54:16 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.13 2004/10/16 13:38:09 zhen Exp $ case $1 in kernel) @@ -76,6 +76,14 @@ case $1 in echo >> ${icfg} echo "label ${x}" >> ${icfg} echo " kernel ${x}" >> ${icfg} + + if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ] + then + echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc acpi=ht ${cmdline_opts} ${custom_kopts} cdroot vga=791 splash=silent,theme:${clst_livecd_splash_theme}" >> ${icfg} + else + echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc acpi=ht ${cmdline_opts} ${custom_kopts} cdroot vga=791 splash=silent" >> ${icfg} + fi + echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc acpi=ht ${cmdline_opts} ${custom_kopts} cdroot vga=791 splash=silent" >> ${icfg} echo >> ${icfg} echo " ${x}" >> ${kmsg} diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 9805cd2d..872b4ac9 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.22 2004/10/15 02:27:58 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.23 2004/10/16 13:38:09 zhen Exp $ """ Builder class for a LiveCD stage2 build. @@ -32,13 +32,14 @@ class livecd_stage2_target(generic_stage_target): self.valid_values.append("boot/kernel/"+x+"/packages") self.valid_values.append("boot/kernel/"+x+"/use") self.valid_values.append("boot/kernel/"+x+"/gk_kernargs") + self.valid_values.append("boot/kernel/"+x+"/postconf") self.valid_values.extend(self.required_values) self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm",\ "livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\ - "livecd/motd","livecd/overlay","livecd/modblacklist","livecd/bootsplash",\ + "livecd/motd","livecd/overlay","livecd/modblacklist","livecd/splash_theme",\ "livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc",\ - "livecd/root_overlay","livecd/devmanager"]) + "livecd/root_overlay","livecd/devmanager","livecd/splash_type"]) generic_stage_target.__init__(self,spec,addlargs) file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"]) @@ -218,7 +219,7 @@ class livecd_stage2_target(generic_stage_target): # write out /var/tmp/kname.(use|packages) files, used for kernel USE # and extra packages settings - for extra in ["use","packages","gk_kernargs"]: + for extra in ["use","packages","postconf","gk_kernargs"]: if self.settings.has_key("boot/kernel/"+kname+"/"+extra): myex=self.settings["boot/kernel/"+kname+"/"+extra] if type(myex)==types.ListType: