echo "fgcolor=white" >> ${icfg}
echo "bgcolor=black" >> ${icfg}
echo "message=/boot/boot.msg" >> ${icfg}
-
+
# Here is where I fix up the boot.msg file.
sed -e 's/ARCH/PowerPC/' \
-e 's/HARDWARE/Apple and IBM hardware/' \
-i $kmsg
- # Setup the IBM yaboot.conf
+ # Setup the IBM yaboot.conf
etc_icfg=$1/etc/yaboot.conf
- mkdir -p $1/etc
+ mkdir -p $1/etc
IBM_YABOOT="FALSE"
echo "root=/dev/ram" >> ${etc_icfg}
echo "fgcolor=white" >> ${etc_icfg}
echo "bgcolor=black" >> ${etc_icfg}
echo "message=/boot/boot.msg" >> ${etc_icfg}
-
+
for x in ${clst_boot_kernel}
- do
+ do
eval "clst_kernel_console=\$clst_boot_kernel_${x}_console"
eval "clst_kernel_machine_type=\$clst_boot_kernel_${x}_machine_type"
eval custom_kopts=\$${x}_kernelopts
-
+
echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
if [ "${clst_kernel_machine_type}" == "ibm" ]
then
echo "label=${x}" >> ${icfg}
echo "read-write" >> ${icfg}
echo "append=\"${default_append_line}\"" >> ${icfg}
-
+
for y in ${clst_kernel_console}
do
echo >> ${icfg}
done
if [ "${IBM_YABOOT}" == "FALSE" ]
- then
+ then
rm ${etc_kmsg}
rmdir $1/etc
if [ -d $1/ppc ]
eval custom_kopts=\$${x}_kernelopts
echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
echo >> ${icfg}
-
+
eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel"
if [ -n "${clst_kernel_softlevel}" ]
eval custom_kopts=\$${x}_kernelopts
echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
echo >> ${icfg}
-
+
eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel"
-
+
if [ -n "${clst_kernel_softlevel}" ]
then
for y in ${clst_kernel_softlevel}
# Sets up the ROOT= parameter
# with no options ROOT=/
make_destpath ${clst_root_path}
-
- export EMERGE_WARNING_DELAY=0
+
+ export EMERGE_WARNING_DELAY=0
export CLEAN_DELAY=0
export EBEEP_IGNORE=0
export EPAUSE_IGNORE=0
STACK=${2}
[ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 ))
- if [ ${STACK} -le 0 ]
+ if [ ${STACK} -le 0 ]
then
echo "WARNING : ${TARGET} : too many levels of symbolic links !"
return
mkdir -p ${clst_root_path}/`dirname ${1}`
[ ! -e ${clst_root_path}/${1} ] && \
cp -vfdp ${1} ${clst_root_path}/${1}
-
+
if [[ -n $(type -p realpath) ]]; then
TARGET=`realpath ${1}`
else
# We do this everywhere, so why not put it in this script
run_default_funcs
-
then
echo 'Creating ISO using EFI bootloader'
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path}"
- mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path} || die "Cannot make ISO image"
- else
+ mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path} || die "Cannot make ISO image"
+ else
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} ${clst_target_path}"
mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image"
fi
chroot_path=${clst_chroot_path}${subdir}
copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \
${subdir}/tmp/
- echo "Running ${file_name} in chroot ${chroot_path}"
+ echo "Running ${file_name} in chroot ${chroot_path}"
${clst_CHROOT} ${chroot_path} /tmp/${file_name} || exit 1
else
copy_to_chroot ${1} tmp/
chroot_path=${clst_chroot_path}
copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \
tmp/
- echo "Running ${file_name} in chroot ${chroot_path}"
+ echo "Running ${file_name} in chroot ${chroot_path}"
${clst_CHROOT} ${chroot_path}/ /tmp/${file_name} || exit 1
fi
[ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
mkdir -p ${1}/
- tar xjf ${kbinary} -C ${1}/
+ tar xjf ${kbinary} -C ${1}/
# change config name from "config-*" to "gentoo", for example
#mv ${1}/config-* ${1}/${x}-config
- rm ${1}/config-*
-
+ rm ${1}/config-*
+
# change kernel name from "kernel" to "gentoo", for example
if [ -e ${1}/kernel-* ]
then
# change initrd name from "initrd" to "gentoo.igz", for example
if [ -e ${1}/initrd-* ]
- then
+ then
mv ${1}/initrd-* ${1}/${x}.igz
fi
if [ -e ${1}/initramfs-* ]
- then
+ then
mv ${1}/initramfs-* ${1}/${x}.igz
fi
extract_modules() {
# $1 = Destination
- # $2 = kname
+ # $2 = kname
kmodules="${clst_chroot_path}/tmp/kerncache/${2}-modules-${clst_version_stamp}.tar.bz2"
if [ -f "${kmodules}" ]
cmdline_opts="${cmdline_opts} looptype=cramfs loop=/image.cramfs"
;;
esac
-}
+}
run_crossdev() {
crossdev ${clst_CHOST}
echo
echo "Killing process(es)"
echo "pid: process name"
- for pid in ${pids[@]}
- do
+ for pid in ${pids[@]}
+ do
P_NAME=$(ls -la --color=never /proc/${pid} 2>&1 |grep exe|grep ${clst_chroot_path}|awk '{print $11}')
echo ${pid}: ${P_NAME}
done
- echo
+ echo
echo "Press Ctrl-C within 10 seconds to abort"
-
+
sleep 10
- for pid in ${pids[@]}
+ for pid in ${pids[@]}
do
kill -9 ${pid}
done
then
GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc"
fi
-
+
if [ -n "${clst_linuxrc}" ]
then
GK_ARGS="${GK_ARGS} --linuxrc=/tmp/linuxrc"
setup_gk_args
#echo "The GK_ARGS are"
- #echo ${GK_ARGS}
+ #echo ${GK_ARGS}
export clst_kernel_merge
export clst_initramfs_overlay
# Build our list of kernel packages
# USE variables (and thus different patches enabled/disabled.) Also, there's no
# real benefit in using the pkgcache for kernel source ebuilds.
-USE_MATCH=0
+USE_MATCH=0
if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
then
STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
if [ "${STR1}" = "${STR2}" ]
- then
+ then
#echo "USE Flags match"
- USE_MATCH=1
+ USE_MATCH=1
else
if [ -n "${clst_KERNCACHE}" ]
then
STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
STR2=${clst_kextraversion}
if [ "${STR1}" = "${STR2}" ]
- then
+ then
if [ -n "${clst_KERNCACHE}" ]
then
#echo "EXTRAVERSION match"
STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'`
if [ "${STR1}" = "${STR2}" ]
- then
+ then
if [ -n "${clst_KERNCACHE}" ]
then
#echo "CONFIG match"
mkdir -p /etc/portage/profile
echo "${KERNELVERSION}" > /etc/portage/profile/package.provided
else
- if ( ! grep -q "^${KERNELVERSION}\$" /etc/portage/profile/package.provided )
+ if ( ! grep -q "^${KERNELVERSION}\$" /etc/portage/profile/package.provided )
then
echo "${KERNELVERSION}" >> /etc/portage/profile/package.provided
fi
echo "Setting extraversion to ${clst_kextraversion}"
sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
- else
+ else
touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
fi
fi
# touch /etc/asound.state
touch /etc/asound.state
-# Tweak the MOTD for Gentoo releases
+# Tweak the MOTD for Gentoo releases
case ${clst_livecd_type} in
gentoo-release-universal)
cat /etc/generic.motd.txt /etc/universal.motd.txt \
dbg="debug {\n\
\tdescription\t\"Debug Shell\";\n\
\timage\t\t\"\";\n\
-\tappend\t\t\"real_root=shell\" \"nox\";\n}\n\n"
+\tappend\t\t\"real_root=shell\" \"nox\";\n}\n\n"
cmt1="comment\t\t\"\\\n\\\n\";\n\
comment\t\t\"Bootable Images & Options:\\\n\\\r\\\n\\\r\";\n"