build.sh: adapt script to build DEY toolchains

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2014-10-02 19:28:48 +02:00
parent 41feae9ad6
commit c4cc0c4329
1 changed files with 11 additions and 2 deletions

View File

@ -14,6 +14,7 @@
# !Description: Yocto autobuild script from Jenkins. # !Description: Yocto autobuild script from Jenkins.
# #
# Parameters set by Jenkins: # Parameters set by Jenkins:
# DY_BUILD_TCHAIN: Build toolchains for DEY images
# DY_BUILD_VARIANTS: Build all platform variants # DY_BUILD_VARIANTS: Build all platform variants
# DY_DISTRO: Distribution name (the default is 'dey') # DY_DISTRO: Distribution name (the default is 'dey')
# DY_PLATFORMS: Platforms to build # DY_PLATFORMS: Platforms to build
@ -73,7 +74,7 @@ copy_images() {
if echo ${JOB_NAME} | grep -qs 'dey.*release'; then if echo ${JOB_NAME} | grep -qs 'dey.*release'; then
cp -r tmp/deploy/* ${1}/ cp -r tmp/deploy/* ${1}/
else else
cp -r tmp/deploy/images ${1}/ cp -r tmp/deploy/{images,sdk} ${1}/
fi fi
# Jenkins artifact archiver does not copy symlinks, so remove them # Jenkins artifact archiver does not copy symlinks, so remove them
# beforehand to avoid ending up with several duplicates of the same # beforehand to avoid ending up with several duplicates of the same
@ -118,6 +119,9 @@ purge_sstate() {
[ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-minimal" [ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-minimal"
[ -z "${DY_DISTRO}" ] && DY_DISTRO="dey" [ -z "${DY_DISTRO}" ] && DY_DISTRO="dey"
# If DY_BUILD_TCHAIN is unset, set it for release jobs
[ -z "${DY_BUILD_TCHAIN}" ] && [[ "${JOB_NAME}" =~ dey-.*-release ]] && DY_BUILD_TCHAIN="true"
# Per-platform variants # Per-platform variants
while read _pl _var; do while read _pl _var; do
[ "${DY_BUILD_VARIANTS}" = "false" ] && _var="DONTBUILDVARIANTS" [ "${DY_BUILD_VARIANTS}" = "false" ] && _var="DONTBUILDVARIANTS"
@ -216,8 +220,13 @@ for platform in ${DY_PLATFORMS}; do
printf "${X11_REMOVAL_CFG}" >> conf/local.conf printf "${X11_REMOVAL_CFG}" >> conf/local.conf
fi fi
for target in ${DY_TARGET}; do for target in ${DY_TARGET}; do
printf "\n[INFO] Building the $target target.\n" printf "\n[INFO] Building the ${target} target.\n"
time bitbake ${target} time bitbake ${target}
# Build the toolchain for DEY images
if [ "${DY_BUILD_TCHAIN}" = "true" ] && echo "${target}" | grep -qs '^dey-image-[^-]\+$'; then
printf "\n[INFO] Building the toolchain for ${target}.\n"
time bitbake -c populate_sdk ${target}
fi
done done
purge_sstate purge_sstate
) )