Patchwork [meta-fsl-arm,2/2] barebox: move environment deployment to its own task

login
register
mail settings
Submitter Alexandre Belloni
Date Aug. 7, 2013, 10:27 a.m.
Message ID <1375871266-19867-2-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/55269/
State Superseded
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - Aug. 7, 2013, 10:27 a.m.
Introduce a new task ito deploy the environment to allow inheriting
recipes to override it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 recipes-bsp/barebox/barebox.inc | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Patch

diff --git a/recipes-bsp/barebox/barebox.inc b/recipes-bsp/barebox/barebox.inc
index e52b463..00595cc 100644
--- a/recipes-bsp/barebox/barebox.inc
+++ b/recipes-bsp/barebox/barebox.inc
@@ -39,13 +39,10 @@  do_compile () {
 do_deploy () {
 	install -d ${DEPLOY_DIR_IMAGE}
 	install ${S}/${BAREBOX_BINARY} ${DEPLOY_DIR_IMAGE}/${BAREBOX_IMAGE}
-	install ${S}/barebox_default_env ${DEPLOY_DIR_IMAGE}/${BAREBOXENV_BIN}
 
 	cd ${DEPLOY_DIR_IMAGE}
 	rm -f ${BAREBOX_SYMLINK}
-	rm -f ${BAREBOXENV_SYMLINK}
 	ln -sf ${BAREBOX_IMAGE} ${BAREBOX_SYMLINK}
-	ln -sf ${BAREBOXENV_BIN} ${BAREBOXENV_SYMLINK}
 
 	install -d ${STAGING_BINDIR_NATIVE}
 	cd ${S}
@@ -55,3 +52,12 @@  do_deploy () {
 
 do_deploy[dirs] = "${S}"
 addtask deploy before do_build after do_compile
+
+do_env_deploy() {
+	install ${S}/barebox_default_env ${DEPLOY_DIR_IMAGE}/${BAREBOXENV_BIN}
+
+	cd ${DEPLOY_DIR_IMAGE}
+	rm -f ${BAREBOXENV_SYMLINK}
+	ln -sf ${BAREBOXENV_BIN} ${BAREBOXENV_SYMLINK}
+}
+addtask env_deploy before do_build after do_deploy