# 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 <zhen@gentoo.org>
+ 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 <zhen@gentoo.org> modules/generic_stage_target.py,
modules/livecd_stage2_target.py:
#!/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
[ -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"
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}
#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
#!/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
# 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)
;;
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
;;
# 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)
# 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
;;
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}
;;
# 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)
# 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
;;
# 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)
;;
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)
# 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)
;;
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)
# 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)
# 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 ]
;;
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
#!/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
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}" ]
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
#!/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
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}" ]
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
#!/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
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}" ]
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
+++ /dev/null
-# 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
#!/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
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}" ]
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
#!/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
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}" ]
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
#!/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
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}" ]
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