From: John P. Davis Date: Wed, 8 Sep 2004 15:58:12 +0000 (+0000) Subject: see changelog, big changes and fixed bug #56581 X-Git-Tag: CATALYST_2_0_6_916~940 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=787038358c6586496ec3a15d9ee6305a29230cf2;p=catalyst.git see changelog, big changes and fixed bug #56581 git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@433 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index c3ad9119..14d0abec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,21 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.80 2004/09/07 14:04:24 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.81 2004/09/08 15:58:12 zhen Exp $ + + 08 Sep 2004; John Davis + livecd/runscript/alpha-archscript.sh, livecd/runscript/hppa-archscript.sh, + livecd/runscript/ppc-archscript.sh, livecd/runscript/sparc-archscript.sh, + livecd/runscript/sparc64-archscript.sh, livecd/runscript/x86-archscript.sh, + livecd/runscript-support/kmerge.sh, livecd/runscript-support/pre-kmerge.sh, + targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh, + targets/livecd-stage1/livecd-stage1-chroot.sh, + -targets/livecd-stage2/unmerge.sh, targets/stage1/stage1-chroot.sh, + targets/stage3/stage3-chroot.sh, targets/tinderbox/tinderbox-chroot.sh: + lots of changes in this revision. first of all, major cosmetic fixups to the + archscripts. i also fixed a non-reported bug where pkgcache was not being used + for distcc or ccache builds in most of the targets. bug #56581 is finially + closed (kernel caching for multiple runs of the livecd-stage2 build) - big + performance enhancement here. 07 Sep 2004; John Davis modules/generic_stage_target.py, modules/livecd_stage2_target.py: diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index 84943428..20a9f86b 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,13 +1,37 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # 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.8 2004/07/21 05:03:42 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.9 2004/09/08 15:58:12 zhen Exp $ die() { echo "$1" exit 1 } +build_kernel() { + if [ -n "${clst_livecd_bootsplash}" ] + then + genkernel --bootsplash=${clst_livecd_bootsplash} \ + --callback="emerge ${clst_kernel_merge}" ${clst_livecd_gk_mainargs} \ + ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux \ + --kernel-config=/var/tmp/${clst_kname}.config \ + --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all \ + || exit 1 + + tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \ + /lib/modules/"${1}" || die "Could not package kernel modules, exiting" + else + genkernel --callback="emerge ${clst_kernel_merge}" \ + ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} \ + --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config \ + --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all \ + || exit 1 + + tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \ + /lib/modules/"${1}" || die "Could not package kernel modules, exiting" + fi +} + # Script to build each kernel, kernel-related packages /usr/sbin/env-update source /etc/profile @@ -22,10 +46,10 @@ ln -s /usr/share/zoneinfo/UTC /etc/localtime [ -e "/var/tmp/${clst_kname}.use" ] && export USE="$( cat /var/tmp/${clst_kname}.use )" || unset USE [ -e "/var/tmp/${clst_kname}.gk_kernargs" ] && source /var/tmp/${clst_kname}.gk_kernargs + # Don't use pkgcache here, as the kernel source may get emerge with different USE variables # (and thus different patches enabled/disabled.) Also, there's no real benefit in using the # pkgcache for kernel source ebuilds. - emerge "${clst_ksource}" || exit 1 [ ! -e /usr/src/linux ] && die "Can't find required directory /usr/src/linux" @@ -59,18 +83,38 @@ then done fi -if [ -n "${clst_livecd_bootsplash}" ] +# kernel building happens here +# does the old config exist? if it does not, we build by default +if [ -e "/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config" ] then - genkernel --bootsplash=${clst_livecd_bootsplash} \ - --callback="emerge ${clst_kernel_merge}" ${clst_livecd_gk_mainargs} \ - ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux \ - --kernel-config=/var/tmp/${clst_kname}.config \ - --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 + # test to see if the kernel .configs are the same, if so, then we skip kernel building + test1=$(md5sum /var/tmp/${clst_kname}.config | cut -d " " -f 1) + test2=$(md5sum /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config | cut -d " " -f 1) + if [ "${test1}" == "${test2}" ] + then + echo + echo "No kernel configuration change, skipping kernel build..." + echo + sleep 5 + + # copy over our config file so that kernel_merge packages like pcmcia don't complain + #cp /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config /usr/src/linux/.config + #emerge ${clst_kernel_merge} + + # unpack our modules to the LiveCD fs + echo + echo "Unpacking kernel modules from the previous build..." + echo + [ ! -d /lib/modules ] && mkdir /lib/modules + tar xvjpf /usr/portage/packages/gk_binaries/${clst_fudgeuname}-modules-${clst_version_stamp}.tar.bz2 \ + -C / || die "Could not unpack kernel modules" + else + build_kernel ${clst_fudgeuname} + fi + else - genkernel --callback="emerge ${clst_kernel_merge}" \ - ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} \ - --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config \ - --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 + build_kernel ${clst_fudgeuname} + fi /sbin/modules-update --assume-kernel=${clst_fudgeuname} @@ -78,3 +122,6 @@ fi #now the unmerge... (wipe db entry) emerge -C ${clst_ksource} unset USE + +# keep the config around so that we can resume at some point +cp /var/tmp/${clst_kname}.config /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config diff --git a/livecd/runscript-support/pre-kmerge.sh b/livecd/runscript-support/pre-kmerge.sh index 6fadff03..cb107635 100755 --- a/livecd/runscript-support/pre-kmerge.sh +++ b/livecd/runscript-support/pre-kmerge.sh @@ -1,11 +1,11 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/pre-kmerge.sh,v 1.2 2004/06/10 15:55:11 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/pre-kmerge.sh,v 1.3 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile -emerge genkernel -install -d /tmp/binaries +emerge -k -b genkernel +install -d /usr/portage/packages/gk_binaries rm -f /usr/src/linux diff --git a/livecd/runscript/alpha-archscript.sh b/livecd/runscript/alpha-archscript.sh index ff77aee2..59c259fc 100755 --- a/livecd/runscript/alpha-archscript.sh +++ b/livecd/runscript/alpha-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/livecd/runscript/Attic/alpha-archscript.sh,v 1.3 2004/05/17 01:44:37 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/alpha-archscript.sh,v 1.4 2004/09/08 15:58:12 zhen Exp $ case $1 in kernel) @@ -16,48 +16,41 @@ case $1 in ;; bootloader) - # Time to create a filesystem tree for the ISO at - # $clst_cdroot_path. We extract the "cdtar" to this directory, + # Create a filesystem tree for the ISO at + # ${clst_cdroot_path}. We extract the "cdtar" to this directory, # which will normally contains a pre-built binary # boot-loader/filesystem skeleton for the ISO. - cdtar=$clst_livecd_cdtar - [ "$cdtar" = "" ] && die "No livecd/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die \ - "Couldn't extract cdtar $cdtar" - if [ "$clst_boot_kernel" = "" ] - then - echo "No boot/kernel setting defined, exiting." - exit 1 - fi + cdtar=${clst_livecd_cdtar} + [ -z "$cdtar" ] && die "Required key livecd/cdtar not specified, exiting" + tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" + + [ -z "${clst_boot_kernel}" ] && die "Required key boot/kernel not specified, exiting" + + # unpack the kernel(s) that were built in kmerge.sh first="" - for x in $clst_boot_kernel + for x in "${clst_boot_kernel}" do - if [ ! -e "$clst_chroot_path/tmp/binaries/$x.tar.bz2" ] - then - echo "Can't find kernel tarball at $clst_chroot_path/tmp/binaries/$x.tar.bz2" - exit 1 - fi - tar xjvf $clst_chroot_path/tmp/binaries/$x.tar.bz2 -C \ - $clst_cdroot_path/boot - # change kernel name from "kernel" to "gentoo", for - # example - mv $clst_cdroot_path/boot/kernel \ - $clst_cdroot_path/boot/$x - # change initrd name from "initrd" to "gentoo.igz", - # for example - mv $clst_cdroot_path/boot/initrd \ - $clst_cdroot_path/boot/$x.igz + kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" + [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" + + tar xjvf ${kbinary}/${x}.tar.bz2 -C ${clst_cdroot_path}/boot + + # change kernel name from "kernel" to "gentoo", for example + mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/boot/${x} + + # change initrd name from "initrd" to "gentoo.igz", for example + mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz done - acfg=$clst_cdroot_path/etc/aboot.conf + acfg=${clst_cdroot_path}/etc/aboot.conf bctr=0 - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - echo -n "${bctr}:/boot/$x " >> $acfg - echo -n "initrd=/boot/$x.igz root=/dev/ram0 " >> $acfg - echo "init=/linuxrc ${cmdline_opts} cdroot" >> $acfg - ((bctr=$bctr+1)) + echo -n "${bctr}:/boot/${x} " >> ${acfg} + echo -n "initrd=/boot/${x}.igz root=/dev/ram0 " >> ${acfg} + echo "init=/linuxrc ${cmdline_opts} cdroot" >> ${acfg} + ((bctr=${bctr}+1)) done ;; diff --git a/livecd/runscript/hppa-archscript.sh b/livecd/runscript/hppa-archscript.sh index 01c28d09..d6706bf6 100644 --- a/livecd/runscript/hppa-archscript.sh +++ b/livecd/runscript/hppa-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/livecd/runscript/Attic/hppa-archscript.sh,v 1.3 2004/05/17 01:44:37 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/hppa-archscript.sh,v 1.4 2004/09/08 15:58:12 zhen Exp $ case $1 in kernel) @@ -16,36 +16,39 @@ case $1 in # CDFSTYPE and loop_opts are exported from the default # runscript - # Time to create a filesystem tree for the ISO at $clst_cdroot_path. + # Create a filesystem tree for the ISO at $clst_cdroot_path. # We extract the "cdtar" to this directory, which will normally contains a pre-built # binary boot-loader/filesystem skeleton for the ISO. - cdtar=$clst_livecd_cdtar - [ "$cdtar" = "" ] && die "No livecd/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar" - [ "$clst_boot_kernel" = "" ] && die "No boot/kernel setting defined, exiting." + cdtar=${clst_livecd_cdtar} + [ -z "$cdtar" ] && die "Required key livecd/cdtar not specified, exiting" + tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" + + [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not specified, exiting" + + # install our kernel(s) that were built in kmerge.sh first="" - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - if [ "$first" = "" ] + kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" + if [ -z "$first" ] then - #grab name of first kernel - first="$x" + # grab name of first kernel + first="${x}" fi - [ ! -e "$clst_chroot_path/tmp/binaries/$x.tar.bz2" ] && die "Can't find kernel tarball at $clst_chroot_path/tmp/binaries/$x.tar.bz2" - tar xjvf $clst_chroot_path/tmp/binaries/$x.tar.bz2 -C $clst_cdroot_path/boot - #change kernel name from "kernel" to "gentoo", for example + [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" + tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot done + # THIS SHOULD BE IMPROVED ! - mv $clst_cdroot_path/boot/kernel $clst_cdroot_path/vmlinux - #change initrd name from "initrd" to "gentoo.igz", for example - mv $clst_cdroot_path/boot/initrd $clst_cdroot_path/initrd - icfg=$clst_cdroot_path/boot/palo.conf - kmsg=$clst_cdroot_path/boot/kernels.msg - hmsg=$clst_cdroot_path/boot/help.msg - echo "--commandline=0/$first initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts}" >> $icfg - echo "--bootloader=boot/iplboot" >> $icfg - echo "--ramdisk=boot/$x.igz" >> $icfg + mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/vmlinux + mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/initrd + icfg=${clst_cdroot_path}/boot/palo.conf + kmsg=${clst_cdroot_path}/boot/kernels.msg + hmsg=${clst_cdroot_path}/boot/help.msg + echo "--commandline=0/${first} initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts}" >> ${icfg} + echo "--bootloader=boot/iplboot" >> ${icfg} + echo "--ramdisk=boot/${x}.igz" >> ${icfg} # for x in $clst_boot_kernel # do @@ -70,7 +73,7 @@ case $1 in ;; iso) - #this is for the livecd-final target, and calls the proper command to build the iso file + #this is for the livecd-stage2 target, and calls the proper command to build the iso file mkisofs -J -R -l -o ${2} ${clst_cdroot_path} palo -f boot/palo.conf -C ${2} ;; diff --git a/livecd/runscript/ppc-archscript.sh b/livecd/runscript/ppc-archscript.sh index 60d4f810..a2784f56 100644 --- a/livecd/runscript/ppc-archscript.sh +++ b/livecd/runscript/ppc-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/livecd/runscript/Attic/ppc-archscript.sh,v 1.3 2004/05/17 01:44:37 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/ppc-archscript.sh,v 1.4 2004/09/08 15:58:12 zhen Exp $ case $1 in kernel) @@ -26,38 +26,29 @@ case $1 in # and prebuilt boot message. This can be enhanced later on # but the following suffices for now: - cdtar=$clst_livecd_cdtar - [ "$cdtar" = "" ] && die "No livecd/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die \ - "Couldn't extract cdtar $cdtar" - if [ "$clst_boot_kernel" = "" ] - then - echo "No boot/kernel setting defined, exiting." - exit 1 - fi + cdtar=${clst_livecd_cdtar} + [ -z "${cdtar}" ] && die "Required key livecd/cdtar not defined, exiting" + tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" + + [ -z "${clst_boot_kernel}" ] && die "Required key boot/kernel not defined, exiting." + first="" - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - if [ "$first" = "" ] - then - #grab name of first kernel - first="$x" - fi - if [ ! -e "$clst_chroot_path/tmp/binaries/$x.tar.bz2" ] + kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" + if [ -z "${first}" ] then - echo "Can't find kernel tarball at $clst_chroot_path/tmp/binaries/$x.tar.bz2" - exit 1 + # grab name of first kernel + first="${x}" fi - tar xjvf $clst_chroot_path/tmp/binaries/$x.tar.bz2 -C \ - $clst_cdroot_path/boot - # change kernel name from "kernel" to "gentoo", for - # example - mv $clst_cdroot_path/boot/kernel \ - $clst_cdroot_path/boot/$x - # change initrd name from "initrd" to "gentoo.igz", - # for example - mv $clst_cdroot_path/boot/initrd \ - $clst_cdroot_path/boot/initrd.img.gz + [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" + tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot + + # change kernel name from "kernel" to "gentoo", for example + mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/boot/${x} + + # change initrd name from "initrd" to "gentoo.igz", for example + mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/initrd.img.gz done ;; diff --git a/livecd/runscript/sparc-archscript.sh b/livecd/runscript/sparc-archscript.sh index 5e7031d2..1f816fe3 100644 --- a/livecd/runscript/sparc-archscript.sh +++ b/livecd/runscript/sparc-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/livecd/runscript/Attic/sparc-archscript.sh,v 1.3 2004/05/22 00:42:59 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/sparc-archscript.sh,v 1.4 2004/09/08 15:58:12 zhen Exp $ case $1 in kernel) @@ -13,63 +13,58 @@ case $1 in ;; bootloader) - # Time to create a filesystem tree for the ISO at + # Create a filesystem tree for the ISO at # $clst_cdroot_path. We extract the "cdtar" to this directory, # which will normally contains a pre-built binary # boot-loader/filesystem skeleton for the ISO. - cdtar=$clst_livecd_cdtar - [ "$cdtar" = "" ] && die "No livecd/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die \ - "Couldn't extract cdtar $cdtar" - if [ "$clst_boot_kernel" = "" ] - then - echo "No boot/kernel setting defined, exiting." - exit 1 - fi + cdtar=${clst_livecd_cdtar} + [ -z "$cdtar" ] && die "Required key livecd/cdtar not defined, exiting" + tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" + + [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not defined, exiting" + + # install the kernels built in kmerge.sh first="" - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - if [ "$first" = "" ] + kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" + + if [ -z "${first}" ] then - #grab name of first kernel - first="$x" + # grab name of first kernel + first="${x}" fi - if [ ! -e "$clst_chroot_path/tmp/binaries/$x.tar.bz2" ] - then - echo "Can't find kernel tarball at $clst_chroot_path/tmp/binaries/$x.tar.bz2" - exit 1 - fi - tar xjvf $clst_chroot_path/tmp/binaries/$x.tar.bz2 -C \ - $clst_cdroot_path/boot - # change kernel name from "kernel" to "gentoo", for - # example - mv $clst_cdroot_path/boot/kernel \ - $clst_cdroot_path/boot/$x - # change initrd name from "initrd" to "gentoo.igz", - # for example - mv $clst_cdroot_path/boot/initrd \ - $clst_cdroot_path/boot/$x.igz + + [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" + tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot + + # change kernel name from "kernel" to "gentoo", for example + mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/boot/${x} + + # change initrd name from "initrd" to "gentoo.igz", for example + mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz done - scfg=$clst_cdroot_path/boot/silo.conf - echo "default=\"help\"" > $scfg - echo "message=\"/boot/boot.msg\"" >> $scfg + + scfg=${clst_cdroot_path}/boot/silo.conf + echo "default=\"help\"" > ${scfg} + echo "message=\"/boot/boot.msg\"" >> ${scfg} - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - echo >> $icfg - echo "image=\"/boot/$x\"" >> $scfg - echo -e "\tlabel=\"$x\"" >> $scfg - echo -e "\tappend=\"initrd=/boot/$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> $scfg + echo >> ${icfg} + echo "image=\"/boot/${x}\"" >> ${scfg} + echo -e "\tlabel=\"${x}\"" >> ${scfg} + echo -e "\tappend=\"initrd=/boot/${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> ${scfg} done - echo "image=\"cat /boot/silo.conf\"" >> $scfg - echo -e "label=\"config\"" >> $scfg - echo "image=\"cat /boot/video.msg\"" >> $scfg - echo -e "label=\"video\"" >> $scfg - echo "image=\"cat /boot/help.msg\"" >> $scfg - echo -e "label=\"help\"" >> $scfg + echo "image=\"cat /boot/silo.conf\"" >> ${scfg} + echo -e "label=\"config\"" >> ${scfg} + echo "image=\"cat /boot/video.msg\"" >> ${scfg} + echo -e "label=\"video\"" >> ${scfg} + echo "image=\"cat /boot/help.msg\"" >> ${scfg} + echo -e "label=\"help\"" >> ${scfg} ;; cdfs) diff --git a/livecd/runscript/sparc64-archscript.sh b/livecd/runscript/sparc64-archscript.sh index f14b2a15..a9bf6e86 100644 --- a/livecd/runscript/sparc64-archscript.sh +++ b/livecd/runscript/sparc64-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/livecd/runscript/Attic/sparc64-archscript.sh,v 1.4 2004/05/22 00:42:59 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/sparc64-archscript.sh,v 1.5 2004/09/08 15:58:12 zhen Exp $ case $1 in kernel) @@ -13,63 +13,58 @@ case $1 in ;; bootloader) - # Time to create a filesystem tree for the ISO at + # Create a filesystem tree for the ISO at # $clst_cdroot_path. We extract the "cdtar" to this directory, # which will normally contains a pre-built binary # boot-loader/filesystem skeleton for the ISO. - cdtar=$clst_livecd_cdtar - [ "$cdtar" = "" ] && die "No livecd/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die \ - "Couldn't extract cdtar $cdtar" - if [ "$clst_boot_kernel" = "" ] - then - echo "No boot/kernel setting defined, exiting." - exit 1 - fi + cdtar=${clst_livecd_cdtar} + [ -z "$cdtar" ] && die "Required key livecd/cdtar not defined, exiting" + tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" + + [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not defined, exiting" + + # install the kernels built in kmerge.sh first="" - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - if [ "$first" = "" ] + kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" + + if [ -z "${first}" ] then - #grab name of first kernel - first="$x" + # grab name of first kernel + first="${x}" fi - if [ ! -e "$clst_chroot_path/tmp/binaries/$x.tar.bz2" ] - then - echo "Can't find kernel tarball at $clst_chroot_path/tmp/binaries/$x.tar.bz2" - exit 1 - fi - tar xjvf $clst_chroot_path/tmp/binaries/$x.tar.bz2 -C \ - $clst_cdroot_path/boot - # change kernel name from "kernel" to "gentoo", for - # example - mv $clst_cdroot_path/boot/kernel \ - $clst_cdroot_path/boot/$x - # change initrd name from "initrd" to "gentoo.igz", - # for example - mv $clst_cdroot_path/boot/initrd \ - $clst_cdroot_path/boot/$x.igz + + [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" + tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot + + # change kernel name from "kernel" to "gentoo", for example + mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/boot/${x} + + # change initrd name from "initrd" to "gentoo.igz", for example + mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz done - scfg=$clst_cdroot_path/boot/silo.conf - echo "default=\"help\"" > $scfg - echo "message=\"/boot/boot.msg\"" >> $scfg + + scfg=${clst_cdroot_path}/boot/silo.conf + echo "default=\"help\"" > ${scfg} + echo "message=\"/boot/boot.msg\"" >> ${scfg} - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - echo >> $icfg - echo "image=\"/boot/$x\"" >> $scfg - echo -e "\tlabel=\"$x\"" >> $scfg - echo -e "\tappend=\"initrd=/boot/$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> $scfg + echo >> ${icfg} + echo "image=\"/boot/${x}\"" >> ${scfg} + echo -e "\tlabel=\"${x}\"" >> ${scfg} + echo -e "\tappend=\"initrd=/boot/${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> ${scfg} done - echo "image=\"cat /boot/silo.conf\"" >> $scfg - echo -e "label=\"config\"" >> $scfg - echo "image=\"cat /boot/video.msg\"" >> $scfg - echo -e "label=\"video\"" >> $scfg - echo "image=\"cat /boot/help.msg\"" >> $scfg - echo -e "label=\"help\"" >> $scfg + echo "image=\"cat /boot/silo.conf\"" >> ${scfg} + echo -e "label=\"config\"" >> ${scfg} + echo "image=\"cat /boot/video.msg\"" >> ${scfg} + echo -e "label=\"video\"" >> ${scfg} + echo "image=\"cat /boot/help.msg\"" >> ${scfg} + echo -e "label=\"help\"" >> ${scfg} ;; cdfs) diff --git a/livecd/runscript/x86-archscript.sh b/livecd/runscript/x86-archscript.sh index 810e4b38..9746fbd9 100644 --- a/livecd/runscript/x86-archscript.sh +++ b/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/livecd/runscript/Attic/x86-archscript.sh,v 1.8 2004/06/13 15:48:51 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.9 2004/09/08 15:58:12 zhen Exp $ case $1 in kernel) @@ -20,54 +20,64 @@ case $1 in # We extract the "cdtar" to this directory, which will normally contains a pre-built # binary boot-loader/filesystem skeleton for the ISO. - cdtar=$clst_livecd_cdtar - [ "$cdtar" = "" ] && die "No livecd/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar" - [ "$clst_boot_kernel" = "" ] && die "No boot/kernel setting defined, exiting." + cdtar=${clst_livecd_cdtar} + [ -z "${cdtar}" ] && die "Required key livecd/cdtar not defined, exiting" + tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" + + [ -z "${clst_boot_kernel}" ] && die "Required key boot/kernel not defined, exiting." + first="" - for x in $clst_boot_kernel + for x in ${clst_boot_kernel} do - if [ "$first" = "" ] + kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" + + if [ -z "${first}" ] then - #grab name of first kernel - first="$x" + # grab name of first kernel + first="${x}" fi - [ ! -e "$clst_chroot_path/tmp/binaries/$x.tar.bz2" ] && die "Can't find kernel tarball at $clst_chroot_path/tmp/binaries/$x.tar.bz2" - tar xjvf $clst_chroot_path/tmp/binaries/$x.tar.bz2 -C $clst_cdroot_path/isolinux + + # unpack the kernel that was compiled in kmerge.sh + [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" + tar xjvf "${kbinary}" -C "${clst_cdroot_path}"/isolinux + #change kernel name from "kernel" to "gentoo", for example - mv $clst_cdroot_path/isolinux/kernel* $clst_cdroot_path/isolinux/$x + mv "${clst_cdroot_path}"/isolinux/kernel* "${clst_cdroot_path}"/isolinux/"${x}" + #change initrd name from "initrd" to "gentoo.igz", for example - mv $clst_cdroot_path/isolinux/initrd* $clst_cdroot_path/isolinux/$x.igz + mv "${clst_cdroot_path}"/isolinux/initrd* "${clst_cdroot_path}"/isolinux/"${x}".igz done - icfg=$clst_cdroot_path/isolinux/isolinux.cfg - kmsg=$clst_cdroot_path/isolinux/kernels.msg - hmsg=$clst_cdroot_path/isolinux/help.msg - echo "default $first" > $icfg - echo "timeout 150" >> $icfg - echo "prompt 1" >> $icfg - echo "display boot.msg" >> $icfg - echo "F1 kernels.msg" >> $icfg - echo "F2 help.msg" >> $icfg + + # the rest of this function sets up the config file for isolinux + icfg=${clst_cdroot_path}/isolinux/isolinux.cfg + kmsg=${clst_cdroot_path}/isolinux/kernels.msg + hmsg=${clst_cdroot_path}/isolinux/help.msg + echo "default ${first}" > ${icfg} + echo "timeout 150" >> ${icfg} + echo "prompt 1" >> ${icfg} + echo "display boot.msg" >> ${icfg} + echo "F1 kernels.msg" >> ${icfg} + echo "F2 help.msg" >> ${icfg} - echo "Available kernels:" > $kmsg - cp ${clst_sharedir}/livecd/files/x86-help.msg $hmsg + echo "Available kernels:" > ${kmsg} + cp ${clst_sharedir}/livecd/files/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 acpi=off ${cmdline_opts} ${custom_kopts} cdroot vga=791 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 acpi=off ${cmdline_opts} ${custom_kopts} cdroot" >> $icfg - echo >> $icfg - echo " ${x}-nofb" >> $kmsg + echo >> ${icfg} + echo "label ${x}" >> ${icfg} + echo " kernel ${x}" >> ${icfg} + echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc acpi=off ${cmdline_opts} ${custom_kopts} cdroot vga=791 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 acpi=off ${cmdline_opts} ${custom_kopts} cdroot" >> ${icfg} + echo >> ${icfg} + echo " ${x}-nofb" >> ${kmsg} done if [ -f ${clst_cdroot_path}/isolinux/memtest86 ] @@ -83,7 +93,7 @@ case $1 in ;; iso) - #this is for the livecd-final target, and calls the proper command to build the iso file + #this is for the livecd-stage2 target, and calls the proper command to build the iso file mkisofs -J -R -l -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -z ${clst_cdroot_path} ;; esac diff --git a/targets/embedded/embedded-chroot.sh b/targets/embedded/embedded-chroot.sh index 4ffb0168..27ff10b5 100755 --- a/targets/embedded/embedded-chroot.sh +++ b/targets/embedded/embedded-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.6 2004/07/12 15:01:17 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.7 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -14,7 +14,7 @@ fi if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - emerge --oneshot --nodeps ccache || exit 1 + emerge --oneshot --nodeps -b -k ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] @@ -22,7 +22,7 @@ then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1 + USE="-gtk -gnome" emerge --oneshot --nodeps -b -k distcc || exit 1 /usr/bin/distcc-config --install 2>&1 > /dev/null /usr/bin/distccd 2>&1 > /dev/null fi diff --git a/targets/grp/grp-chroot.sh b/targets/grp/grp-chroot.sh index 0a199eb5..1c6fa9c8 100755 --- a/targets/grp/grp-chroot.sh +++ b/targets/grp/grp-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.6 2004/08/31 01:40:24 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.7 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -14,7 +14,7 @@ fi if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - emerge --oneshot --nodeps ccache || exit 1 + emerge --oneshot --nodeps -b -k ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] @@ -22,7 +22,7 @@ then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 + USE="-gnome -gtk" emerge --oneshot --nodeps -b -k distcc || exit 1 /usr/bin/distcc-config --install 2>&1 > /dev/null /usr/bin/distccd 2>&1 > /dev/null fi diff --git a/targets/livecd-stage1/livecd-stage1-chroot.sh b/targets/livecd-stage1/livecd-stage1-chroot.sh index 6c7beeb7..d3afc9b9 100755 --- a/targets/livecd-stage1/livecd-stage1-chroot.sh +++ b/targets/livecd-stage1/livecd-stage1-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.5 2004/07/12 15:01:17 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.6 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -15,7 +15,7 @@ fi if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - emerge --oneshot --nodeps ccache || exit 1 + emerge --oneshot --nodeps -b -k ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] @@ -23,7 +23,7 @@ then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 + USE="-gnome -gtk" emerge --oneshot --nodeps -b -k distcc || exit 1 /usr/bin/distcc-config --install 2>&1 > /dev/null /usr/bin/distccd 2>&1 > /dev/null fi diff --git a/targets/livecd-stage2/unmerge.sh b/targets/livecd-stage2/unmerge.sh deleted file mode 100644 index 68cce185..00000000 --- a/targets/livecd-stage2/unmerge.sh +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 1999-2004 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/unmerge.sh,v 1.1 2004/01/20 23:56:43 drobbins Exp $ - -$clst_CHROOT $clst_chroot_path /bin/bash << EOF - emerge -C $* -EOF -exit 0 diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 6aac3b45..ef4ffead 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.20 2004/08/02 23:23:34 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.21 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -11,7 +11,7 @@ source /etc/profile if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - emerge -b -k --oneshot --nodeps ccache || exit 1 + emerge --oneshot --nodeps -b -k ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] @@ -19,7 +19,7 @@ then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gtk -gnome" emerge -b -k --oneshot --nodeps distcc || exit 1 + USE="-gtk -gnome" emerge --oneshot --nodeps -b -k distcc || exit 1 /usr/bin/distcc-config --install 2>&1 > /dev/null /usr/bin/distccd 2>&1 > /dev/null fi diff --git a/targets/stage3/stage3-chroot.sh b/targets/stage3/stage3-chroot.sh index 76ca9751..d388a092 100755 --- a/targets/stage3/stage3-chroot.sh +++ b/targets/stage3/stage3-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.8 2004/08/02 23:23:34 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.9 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -11,7 +11,7 @@ source /etc/profile if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - emerge -b -k --oneshot --nodeps ccache || exit 1 + emerge --oneshot --nodeps -b -k ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] @@ -19,7 +19,7 @@ then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge -b -k --oneshot --nodeps distcc || exit 1 + USE="-gnome -gtk" emerge --oneshot --nodeps -b -k distcc || exit 1 /usr/bin/distcc-config --install 2>&1 > /dev/null /usr/bin/distccd 2>&1 > /dev/null fi diff --git a/targets/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh index ea536bd7..7cd6f047 100755 --- a/targets/tinderbox/tinderbox-chroot.sh +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.5 2004/07/12 15:01:17 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.6 2004/09/08 15:58:12 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -15,7 +15,7 @@ fi if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - emerge --oneshot --nodeps ccache || exit 1 + emerge --oneshot --nodeps -b -k ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] @@ -23,7 +23,7 @@ then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - USE="-gnome -gtk" emerge --oneshot --nodeps distcc || exit 1 + USE="-gnome -gtk" emerge --oneshot --nodeps -b -k distcc || exit 1 /usr/bin/distcc-config --install 2>&1 > /dev/null /usr/bin/distccd 2>&1 > /dev/null fi