diff --git a/configs/OpenROV_debian_stable_armhf.conf b/configs/OpenROV_debian_stable_armhf.conf index 936b032754ead9113fe1c2b60577257289f01e4d..752012e5275cde5176798b33cdad8cc786fb1e02 100644 --- a/configs/OpenROV_debian_stable_armhf.conf +++ b/configs/OpenROV_debian_stable_armhf.conf @@ -44,6 +44,7 @@ repo_external_components="main" repo_external_key="debian.beagleboard.org-archive-keyring.asc" repo_external_pkg_list="nodejs nodejs-legacy npm" chroot_COPY_SETUP_SDCARD="enable" -chroot_hook="" +chroot_before_hook="" +chroot_after_hook="" chroot_script="OpenROV.sh" chroot_tarball="enable" diff --git a/configs/bb.org-console-debian-stable.conf b/configs/bb.org-console-debian-stable.conf index f845f0ad5d0daeaacb7017ddaadc87ea5fce5d56..854f120b2b00d48dd7652f3e6cae6518603a7428 100644 --- a/configs/bb.org-console-debian-stable.conf +++ b/configs/bb.org-console-debian-stable.conf @@ -47,7 +47,8 @@ repo_external_key="debian.beagleboard.org-archive-keyring.asc" #repo_external_pkg_list="beaglebone" # chroot_COPY_SETUP_SDCARD="enable" -chroot_hook="" +chroot_before_hook="" +chroot_after_hook="" chroot_script="beagleboard.org-console.sh" chroot_post_uenv_txt="post_beagleboard.org.txt" chroot_tarball="enable" diff --git a/configs/bb.org-console-debian-testing.conf b/configs/bb.org-console-debian-testing.conf index 11e0c828e175ff4558cb9d802cc8daf6321d51f8..eb5de243ff3ff14c954f798e6df20b9c77d79e74 100644 --- a/configs/bb.org-console-debian-testing.conf +++ b/configs/bb.org-console-debian-testing.conf @@ -46,7 +46,8 @@ include_firmware="enable" #repo_external_pkg_list="beaglebone" # chroot_COPY_SETUP_SDCARD="enable" -chroot_hook="" +chroot_before_hook="" +chroot_after_hook="" #chroot_script="beagleboard.org-console-testing.sh" #chroot_uenv_txt="beagleboard.org.txt" #chroot_flasher_uenv_txt="beagleboard.org-flasher.txt" diff --git a/configs/bb.org-debian-stable.conf b/configs/bb.org-debian-stable.conf index 40bd70dea452d0557ed550e4790722dd2b73f6fc..e787d650600c89a5a81e707b090f6aa8cfd2ea67 100644 --- a/configs/bb.org-debian-stable.conf +++ b/configs/bb.org-debian-stable.conf @@ -47,7 +47,8 @@ repo_external_key="debian.beagleboard.org-archive-keyring.asc" repo_external_pkg_list="beaglebone" # chroot_COPY_SETUP_SDCARD="enable" -chroot_hook="" +chroot_before_hook="" +chroot_after_hook="" chroot_script="beagleboard.org.sh" chroot_post_uenv_txt="post_beagleboard.org.txt" chroot_tarball="enable" diff --git a/configs/bb.org-debian-testing.conf b/configs/bb.org-debian-testing.conf index 5d287db49186b30aaf028077e4d33ae3a0fc8fef..73344e17dbabe41846753733e9ad2a21623af25a 100644 --- a/configs/bb.org-debian-testing.conf +++ b/configs/bb.org-debian-testing.conf @@ -46,7 +46,8 @@ include_firmware="enable" #repo_external_pkg_list="beaglebone" # chroot_COPY_SETUP_SDCARD="enable" -chroot_hook="" +chroot_before_hook="" +chroot_after_hook="" chroot_script="beagleboard.org.sh" #chroot_uenv_txt="beagleboard.org-testing.txt" #chroot_flasher_uenv_txt="beagleboard.org-flasher.txt" diff --git a/configs/machinekit-debian-stable.conf b/configs/machinekit-debian-stable.conf index 18b5e9daa9f3c77183605cdfa44eef6a3a012b78..3f03f09c239153fbd014908ad940d9e8fdf96eab 100644 --- a/configs/machinekit-debian-stable.conf +++ b/configs/machinekit-debian-stable.conf @@ -41,7 +41,8 @@ repo_external_key="debian.beagleboard.org-archive-keyring.asc" repo_external_pkg_list="beaglebone" # chroot_COPY_SETUP_SDCARD="enable" -chroot_hook="machinekit/chroot_hook.sh" +chroot_before_hook="" +chroot_after_hook="machinekit/chroot_hook.sh" chroot_script="beagleboard.org.sh" chroot_uenv_txt="machinekit.txt" chroot_flasher_uenv_txt="eMMC-flasher.txt" diff --git a/releases.sh b/releases.sh index 68b2e347ce62109008b2fe00e3057952cd20325f..e2cbf3969e88ead308d95533eec0f7ea66d4ff8e 100644 --- a/releases.sh +++ b/releases.sh @@ -48,7 +48,8 @@ machinekit_release () { rfs_username="machinekit" rfs_password="machinekit" rfs_fullname="Kit Ex Machina" - chroot_hook="machinekit/chroot_hook.sh" + chroot_before_hook="" + chroot_after_hook="machinekit/chroot_hook.sh" deb_mirror="ftp.us.debian.org/debian/" diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 147162e9b618531cfc82cc129b541521e219592e..d08c2f6142e0b3f4a74b5eef07dfb19124cd33d5 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -791,6 +791,13 @@ if [ ! "x${rfs_opt_scripts}" = "x" ] ; then fi fi +if [ -n "${chroot_before_hook}" -a -r "${DIR}/${chroot_before_hook}" ] ; then + report_size + echo "Calling chroot_before_hook script: ${chroot_before_hook}" + . "${DIR}/${chroot_before_hook}" + chroot_before_hook="" +fi + if [ -n "${chroot_script}" -a -r "${DIR}/target/chroot/${chroot_script}" ] ; then report_size echo "Calling chroot_script script: ${chroot_script}" @@ -814,11 +821,11 @@ fi mkdir -p ${DIR}/deploy/${export_filename}/ || true cp -v ${DIR}/.project ${DIR}/deploy/${export_filename}/image-builder.project -if [ -n "${chroot_hook}" -a -r "${DIR}/${chroot_hook}" ] ; then +if [ -n "${chroot_after_hook}" -a -r "${DIR}/${chroot_after_hook}" ] ; then report_size - echo "Calling chroot_hook script: ${chroot_hook}" - . "${DIR}/${chroot_hook}" - chroot_hook="" + echo "Calling chroot_after_hook script: ${chroot_after_hook}" + . "${DIR}/${chroot_after_hook}" + chroot_after_hook="" fi #add /boot/uEnv.txt update script