From 7db92fc4762493ff478229cf074d6245cdf937ea Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Mon, 20 Jun 2016 19:15:58 +0200 Subject: [PATCH] build.sh: allow to define per platform bitbake image target Instead of having one default image target for all platforms allow to define this per platform. This is needed because for example for the 'ccimx6ulstarter' we want to define a default command line image instead of a QT-based one. Signed-off-by: Javier Viguera --- sdk/build.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sdk/build.sh b/sdk/build.sh index 2405d337d..8e5596d37 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -70,7 +70,9 @@ copy_images() { else cp -r tmp/deploy/images ${1}/ if [ "${DY_BUILD_TCHAIN}" = "true" ]; then - cp -r tmp/deploy/sdk ${1}/ + if [ -d tmp/deploy/sdk ]; then + cp -r tmp/deploy/sdk ${1}/ + fi fi fi @@ -116,7 +118,6 @@ purge_sstate() { [ -z "${WORKSPACE}" ] && error "WORKSPACE not specified" # Set default settings if Jenkins does not do it -[ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-qt" [ -z "${DY_DISTRO}" ] && DY_DISTRO="dey" # If DY_BUILD_TCHAIN is unset, set it for release jobs @@ -127,8 +128,8 @@ if [ -z "${DY_FB_IMAGE}" ] && echo ${JOB_NAME} | grep -qs 'dey.*fb'; then DY_FB_IMAGE="true" fi -# Per-platform variants -while read _pl _var; do +# Per-platform data +while read _pl _var _tgt; do # DY_BUILD_VARIANTS comes from Jenkins environment: # 'false': don't build variants (only the default) # : build all the variants supported by the platform @@ -140,11 +141,13 @@ while read _pl _var; do _var="${DY_BUILD_VARIANTS}" fi fi + [ -n "${DY_TARGET}" ] && _tgt="${DY_TARGET}" || true eval "${_pl}_var=\"${_var}\"" + eval "${_pl}_tgt=\"${_tgt}\"" done<<-_EOF_ - ccardimx28js - e w wb web web1 - ccimx6sbc DONTBUILDVARIANTS - ccimx6ulstarter DONTBUILDVARIANTS + ccardimx28js - e w wb web web1 dey-image-qt + ccimx6sbc DONTBUILDVARIANTS dey-image-qt + ccimx6ulstarter DONTBUILDVARIANTS core-image-base _EOF_ YOCTO_IMGS_DIR="${WORKSPACE}/images" @@ -181,6 +184,7 @@ fi rm -rf ${YOCTO_IMGS_DIR} ${YOCTO_PROJ_DIR} for platform in ${DY_PLATFORMS}; do eval platform_variants="\${${platform}_var}" + eval platform_targets="\${${platform}_tgt}" for variant in ${platform_variants}; do _this_prj_dir="${YOCTO_PROJ_DIR}/${platform}" _this_img_dir="${YOCTO_IMGS_DIR}/${platform}" @@ -217,7 +221,7 @@ for platform in ${DY_PLATFORMS}; do if [ "${DY_FB_IMAGE}" = "true" ]; then printf "${X11_REMOVAL_CFG}" >> conf/local.conf fi - for target in ${DY_TARGET}; do + for target in ${platform_targets}; do printf "\n[INFO] Building the ${target} target.\n" time bitbake ${target} # Build the toolchain for DEY images