build.sh: add support to build firmware update packages

https://jira.digi.com/browse/DEL-3449

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2017-01-24 16:10:18 +01:00
parent 85efbb87e2
commit 6cb94fe22c
2 changed files with 24 additions and 2 deletions

View File

@ -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
)

View File

@ -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"