From 6cb94fe22c6c85765bf5cf1a631048ece6130678 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 24 Jan 2017 16:10:18 +0100 Subject: [PATCH] build.sh: add support to build firmware update packages https://jira.digi.com/browse/DEL-3449 Signed-off-by: Javier Viguera --- sdk/build-github.sh | 13 ++++++++++++- sdk/build.sh | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/sdk/build-github.sh b/sdk/build-github.sh index a61e472ac..d2f16f66e 100755 --- a/sdk/build-github.sh +++ b/sdk/build-github.sh @@ -92,6 +92,17 @@ purge_sstate() { bitbake -k -c cleansstate ${PURGE_PKGS} >/dev/null 2>&1 || true } +# +# For a given image recipe print the SWU recipe (if it exists) +# +# $1: image recipe +# +swu_recipe_name() { + if [ -n "$(find ${YOCTO_INST_DIR}/sources/meta-digi -type f -name "${1}-swu.bb")" ]; then + printf "${1}-swu" + fi +} + # Sanity checks (Jenkins environment) [ -z "${DY_REVISION}" ] && error "DY_REVISION not specified" [ -z "${WORKSPACE}" ] && error "WORKSPACE not specified" @@ -164,7 +175,7 @@ for platform in ${DY_PLATFORMS}; do fi for target in ${platform_targets}; do printf "\n[INFO] Building the ${target} target.\n" - time bitbake ${target} + time bitbake ${target} $(swu_recipe_name ${target}) done purge_sstate ) diff --git a/sdk/build.sh b/sdk/build.sh index 91109fc94..a39856427 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -110,6 +110,17 @@ purge_sstate() { bitbake -k -c cleansstate ${PURGE_PKGS} >/dev/null 2>&1 || true } +# +# For a given image recipe print the SWU recipe (if it exists) +# +# $1: image recipe +# +swu_recipe_name() { + if [ -n "$(find ${YOCTO_INST_DIR}/sources/meta-digi -type f -name "${1}-swu.bb")" ]; then + printf "${1}-swu" + fi +} + # Sanity check (Jenkins environment) [ -z "${DY_PLATFORMS}" ] && error "DY_PLATFORMS not specified" [ -z "${DY_REVISION}" ] && error "DY_REVISION not specified" @@ -237,7 +248,7 @@ for platform in ${DY_PLATFORMS}; do fi for target in ${platform_targets}; do printf "\n[INFO] Building the ${target} target.\n" - time bitbake ${target} + time bitbake ${target} $(swu_recipe_name ${target}) # Build the toolchain for DEY images if [ "${DY_BUILD_TCHAIN}" = "true" ] && echo "${target}" | grep -qs '^\(core\|dey\)-image-[^-]\+$'; then printf "\n[INFO] Building the toolchain for ${target}.\n"