From 315e479b5ad3cb5547bb5282456799c378019621 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 30 Jan 2015 16:30:33 +0100 Subject: [PATCH] build.sh: support building platform variants Depending on DY_BUILD_VARIANTS variable (set by Jenkins): 'false': don't build variants (only the default) : build all the variants supported by the platform 'var1 var2': build the ones specified in the variable https://jira.digi.com/browse/DEL-1360 Signed-off-by: Javier Viguera (cherry picked from commit de58d3fac52448ee7b1828c6ac71c6c10a3442ff) --- sdk/build.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sdk/build.sh b/sdk/build.sh index 2f601cafb..7604e8cc2 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -111,7 +111,6 @@ purge_sstate() { } # Sanity check (Jenkins environment) -[ -z "${DY_BUILD_VARIANTS}" ] && error "DY_BUILD_VARIANTS not specified" [ -z "${DY_PLATFORMS}" ] && error "DY_PLATFORMS not specified" [ -z "${DY_REVISION}" ] && error "DY_REVISION not specified" [ -z "${DY_RM_WORK}" ] && error "DY_RM_WORK not specified" @@ -127,13 +126,23 @@ purge_sstate() { # Per-platform variants while read _pl _var; do - [ "${DY_BUILD_VARIANTS}" = "false" ] && _var="DONTBUILDVARIANTS" + # DY_BUILD_VARIANTS comes from Jenkins environment: + # 'false': don't build variants (only the default) + # : build all the variants supported by the platform + # 'var1 var2': build the ones specified in the variable + if [ -n "${DY_BUILD_VARIANTS}" ]; then + if echo "${DY_BUILD_VARIANTS}" | grep -qs "false"; then + _var="DONTBUILDVARIANTS" + else + _var="${DY_BUILD_VARIANTS}" + fi + fi eval "${_pl}_var=\"${_var}\"" done<<-_EOF_ ccardimx28js - e w wb web web1 ccimx51js 128 128a 128agv agv eagv w w128a w128agv wagv weagv ccimx53js - 128 4k e e4k w w128 we - ccimx6sbc - w wb + ccimx6sbc wbq1024 wbq512 wq1024 wdl256 q512 dl256 wdl512 wbdl1024 _EOF_ # Build alternative linux and u-boot