run_merge -o "${clst_embedded_packages}"
export clst_root_path="${DESTROOT}"
-export INSTALL_MASK="${clst_install_mask}"
+export INSTALL_MASK="${clst_install_mask}"
run_merge -1 -O "${clst_embedded_packages}"
# package)
# export root_fs_path="${clst_chroot_path}/tmp/mergeroot"
# install -d ${clst_image_path}
-
+
# ${clst_sharedir}/targets/embedded/embedded-fs-runscript.sh \
# ${clst_embedded_fs_type} || exit 1
# imagesize=`du -sk ${clst_image_path}/root.img | cut -f1`
${clst_sharedir}/targets/support/bootloader-setup.sh ${1}
;;
-
+
iso)
shift
${clst_sharedir}/targets/support/create-iso.sh ${1}
enter)
${clst_CHROOT} ${clst_chroot_path}
;;
+
run)
shift
export clst_grp_type=$1
clean)
exit 0
;;
-
+
*)
exit 1
;;
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
echo "${clst_packages}" > ${clst_chroot_path}/tmp/packages.txt
;;
+
clean)
find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
;;
# Sets up the build environment before any kernels are compiled
exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
;;
+
post-kmerge)
# Cleans up the build environment after the kernels are compiled
exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
;;
+
kernel)
shift
export clst_kname="$1"
fi
;;
esac
-
+
# move over the environment
cp -f ${clst_sharedir}/livecd/files/livecd-bashrc \
${clst_chroot_path}/root/.bashrc
${clst_chroot_path}/root/.bash_profile
cp -f ${clst_sharedir}/livecd/files/livecd-local.start \
${clst_chroot_path}/etc/conf.d/local.start
-
+
# execute copy gamecd.conf if we're a gamecd
if [ "${clst_livecd_type}" = "gentoo-gamecd" ]
then
fi
fi
;;
+
livecd-update)
# Now, finalize and tweak the livecd fs (inside of the chroot)
exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
${clst_chroot_path}/etc/X11/xinit/xinitrc
fi
;;
+
rc-update)
exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
;;
+
fsscript)
exec_in_chroot ${clst_fsscript}
;;
+
clean)
if [ "${clst_livecd_type}" = "gentoo-gamecd" ] \
|| [ "${clst_livecd_type}" = "gentoo-release-minimal" ] \
grep -v 'libgcc_eh.a' | xargs rm -f
rm -f ${clst_chroot_path}/tmp/packages.txt
;;
+
bootloader)
shift
# Here is where we poke in our identifier
${clst_sharedir}/targets/support/bootloader-setup.sh $1
;;
+
unmerge)
shift
export clst_packages="$*"
exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh
;;
+
target_image_setup)
shift
${clst_sharedir}/targets/support/target_image_setup.sh $1
;;
+
iso)
shift
${clst_sharedir}/targets/support/create-iso.sh $1
alpha)
# Until aboot is patched this is broken currently.
# please use catalyst 1.1.5 or older
-
+
#TEST TEST TEST TEST
#http://lists.debian.org/debian-alpha/2004/07/msg00094.html
#make \
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
+
busybox)
# Custom busybox config support
if [ -f "${clst_netboot_busybox_config}" ]
mkdir -p ${clst_chroot_path}/etc/busybox/${clst_CHOST}
cp -v ${clst_netboot_busybox_config} \
${clst_chroot_path}/etc/busybox/${clst_CHOST}/busybox.config
- clst_use="savedconfig"
+ clst_use="savedconfig"
fi
# Main Busybox emerge
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
+
pre-kmerge)
# Sets up the build environment before any kernels are compiled
#exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
;;
+
post-kmerge)
# Cleans up the build environment after the kernels are compiled
#exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
;;
+
kernel)
shift
export clst_kname="$1"
#exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
#extract_kernels kernels
;;
+
image)
#Creates the base initrd image for the netboot
shift
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-image.sh
;;
+
finish)
${clst_sharedir}/targets/${clst_target}/${clst_target}-combine.sh
;;
+
clean)
exit 0;;
+
*)
exit 1;;
esac
echo "Copying files to ${clst_root_path}"
clst_files="/bin/busybox ${clst_files} "
for f in ${clst_files}
-do
+do
copy_file ${f}
done
echo "Done copying files"
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-pkg.sh
;;
+
pre-kmerge)
# Sets up the build environment before any kernels are compiled
exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
;;
+
post-kmerge)
# Cleans up the build environment after the kernels are compiled
exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
;;
+
kernel)
shift
export clst_kname="$1"
#16:13 <@solar> eval clst_boot_kernel_${kernel_name}_config=bar
#16:13 <@solar> eval echo \$clst_boot_kernel_${kernel_name}_config
;;
+
image)
# Creates the base initramfs image for the netboot
echo -e ">>> Preparing Image ..."
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-copyfile.sh
;;
+
final)
# For each arch, fetch the kernel images and put them in builds/
echo -e ">>> Copying completed kernels to ${clst_target_path} ..."
${clst_sharedir}/targets/support/netboot2-final.sh
;;
+
clean)
exit 0;;
+
*)
exit 1;;
esac
echo ">>> Copying initramfs files to ${clst_merge_path} (in chroot) ..."
[ ! -d "${clst_merge_path}" ] && mkdir -p ${clst_merge_path}
for f in ${clst_files}
-do
+do
# copy it to the merge path
cp -pPRf --parents $(eval echo ${f}) ${clst_merge_path}
case $1 in
enter)
;;
+
run)
cp ${clst_sharedir}/targets/stage1/build.py ${clst_chroot_path}/tmp
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh \
|| exit 1
;;
+
preclean)
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh /tmp/stage1root || exit 1
;;
+
clean)
# Clean out man, info and doc files
rm -rf usr/share/{man,doc,info}/*
grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | \
grep -v 'libgcc_eh.a' | xargs rm -f
;;
+
*)
exit 1
;;
## START BUILD
/usr/portage/scripts/bootstrap.sh ${bootstrap_opts} || exit 1
-
enter)
${clst_CHROOT} ${clst_chroot_path}
;;
+
run)
shift
export clst_packages="$*"
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
+
preclean)
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
;;
+
clean)
exit 0
;;
+
*)
exit 1
;;
enter)
${clst_CHROOT} ${clst_chroot_path}
;;
+
run)
shift
export clst_packages="$*"
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
+
preclean)
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
;;
+
clean)
exit 0
;;
+
*)
exit 1
;;
enter)
${clst_CHROOT} ${clst_chroot_path}
;;
+
pre-kmerge)
# Sets up the build environment before any kernels are compiled
exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
;;
+
post-kmerge)
# Cleans up the build environment after the kernels are compiled
exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
;;
+
kernel)
shift
export clst_kname="$1"
# Do we need this one?
# extract_kernel ${clst_chroot_path}/boot ${clst_kname}
;;
+
build_packages)
shift
export clst_packages="$*"
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
+
preclean)
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
;;
+
rc-update)
exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
;;
+
fsscript)
exec_in_chroot ${clst_fsscript}
;;
+
livecd-update)
# Now, finalize and tweak the livecd fs (inside of the chroot)
exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
${clst_chroot_path}/etc/X11/xinit/xinitrc
fi
;;
+
bootloader)
exit 0
;;
+
target_image_setup)
shift
${clst_sharedir}/targets/support/target_image_setup.sh $1
;;
+
unmerge)
shift
export clst_packages="$*"
- exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh
+ exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh
;;
+
iso)
shift
${clst_sharedir}/targets/support/create-iso.sh $1
;;
+
clean)
exit 0
;;
+
*)
exit 1
;;
#!/bin/bash
+
source ${clst_sharedir}/targets/support/functions.sh
source ${clst_sharedir}/targets/support/filesystem-functions.sh
# ROOT is / by default, so remove any ROOT= settings from make.conf
sed -i '/ROOT=/d' /etc/portage/make.conf
export ROOT=/
- if [ "${1}" != "/" -a -n "${1}" ]
+ if [ "${1}" != "/" -a -n "${1}" ]
then
echo "ROOT=\"${1}\"" >> /etc/portage/make.conf
export ROOT=${1}
# should be in the cdtar, otherwise use the new style.
if [ -x ${clst_target_path}/boot/mkisofs.sparc.fu ]
then
- mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp
+ mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp
echo "Running mkisofs.sparc.fu to create iso image...."
echo "/tmp/mkisofs.sparc.fu ${mkisofs_zisofs_opts} -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V \"${clst_iso_volume_id}\" ${clst_target_path}"
/tmp/mkisofs.sparc.fu ${mkisofs_zisofs_opts} -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V "${clst_iso_volume_id}" ${clst_target_path} || die "Cannot make ISO image"
elif [ -e ${clst_target_path}/gentoo.efimg ]
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}"
+ 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
echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} ${clst_target_path}"
|| die "Couldn't mount loopback ext2 filesystem"
sync; sync; sleep 3 # Try to work around 2.6.0+ loopback bug
echo "cp -pPR ${source_path}/* ${destination_path}/loopmount"
- cp -pPR ${source_path}/* ${destination_path}/loopmount
+ cp -pPR ${source_path}/* ${destination_path}/loopmount
[ $? -ne 0 ] && { umount ${destination_path}/${loopname}; \
die "Couldn't copy files to loopback ext2 filesystem"; }
umount ${destination_path}/loopmount \
# Backup pristine system
rsync -avx --exclude "/root/" --exclude "/tmp/" --exclude "/usr/portage/" / \
- /tmp/rsync-bak/
+ /tmp/rsync-bak/
for x in ${clst_tinderbox_packages}
do
if [ "$?" != "0" ]
then
- echo "! $x" >> /tmp/tinderbox.log
+ echo "! $x" >> /tmp/tinderbox.log
else
echo "$x" >> /tmp/tinderbox.log
fi