From f15d60da84f7ae6ea663e3042f79a2981369b036 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Thu, 7 Feb 2013 13:07:06 -0600 Subject: [PATCH] RootStock-NG: flags to enable firmware and deb src packages Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- RootStock-NG.sh | 6 ++++++ scripts/chroot.sh | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/RootStock-NG.sh b/RootStock-NG.sh index 5851e60b8..d3f83f5db 100755 --- a/RootStock-NG.sh +++ b/RootStock-NG.sh @@ -59,6 +59,9 @@ run_project () { apt_proxy="${apt_proxy}" base_pkg_list="${base_pkg_list}" + chroot_ENABLE_FIRMWARE="${chroot_ENABLE_FIRMWARE}" + chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}" + __EOF__ /bin/bash -e "${DIR}/scripts/install_dependencies.sh" || { exit 1 ; } @@ -79,6 +82,9 @@ a53t|zeus|hestia|poseidon) ;; esac +chroot_ENABLE_FIRMWARE="enable" +chroot_ENABLE_DEB_SRC="enable" + distro="debian" dpkg_arch="armel" diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 04fc81779..f33502f04 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -207,9 +207,15 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ install_pkg_updates install_pkgs - git_firmware - #dl_pkg_src + if [ "x${chroot_ENABLE_FIRMWARE}" == "xenable" ] ; then + git_firmware + fi + + if [ "x${chroot_ENABLE_DEB_SRC}" == "xenable" ] ; then + dl_pkg_src + fi + cleanup rm -f /chroot_script.sh || true __EOF__ @@ -221,6 +227,14 @@ sudo chroot ${tempdir} /bin/sh chroot_script.sh report_size chroot_umount +if [ "x${chroot_ENABLE_DEB_SRC}" == "xenable" ] ; then + cd ${tempdir}/tmp/pkg_src/ + sudo LANG=C tar --numeric-owner -cf ${DIR}/${distro}-${release}-${dpkg_arch}-src.tar . + cd ${tempdir} + sudo rm -rf ${tempdir}/tmp/pkg_src/ || true + report_size +fi + cd ${tempdir} sudo LANG=C tar --numeric-owner -cf ${DIR}/${distro}-${release}-${dpkg_arch}-rootfs.tar . cd ${DIR}/ -- GitLab