From a6a3a9a22088fe6c85ebee7b513f8ee5ef440035 Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Thu, 23 May 2013 11:51:21 +0200 Subject: [PATCH] build.sh: Parametrize the distribution to build. This allows to build for all supported distributions: del (del-image-minimal) del-gui (del-image-graphical poky (core-image-minimal etc.) dbl (dbl-image-base) https://jira.digi.com/browse/DEL-481 Signed-off-by: Alex Gonzalez --- sdk/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/build.sh b/sdk/build.sh index 73e308054..ffffc72f5 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -15,9 +15,10 @@ # # Parameters set by Jenkins: # DY_BUILD_VARIANTS: Build all platform variants +# DY_DISTRO: Distribution name (the default is 'del') # DY_PLATFORMS: Platforms to build # DY_REVISION: Revision of the manifest repository (for 'repo init') -# DY_TARGET: Target image (the default is 'del-image-minimal') +# DY_TARGET: Target image (the default is 'del-image-minimal') # DY_USE_MIRROR: Use internal Digi mirror to download packages # #=============================================================================== @@ -69,8 +70,9 @@ copy_images() { [ -z "${DY_USE_MIRROR}" ] && error "DY_USE_MIRROR not specified" [ -z "${WORKSPACE}" ] && error "WORKSPACE not specified" -# Set default build target if Jenkins does not set it +# Set default settings if Jenkins does not do it [ -z "${DY_TARGET}" ] && DY_TARGET="del-image-minimal" +[ -z "${DY_DISTRO}" ] && DY_DISTRO="del" # Per-platform variants while read _pl _var; do @@ -136,6 +138,8 @@ for platform in ${DY_PLATFORMS}; do sed -i -e "/^#DL_DIR ?=/cDL_DIR ?= \"${YOCTO_PROJ_DIR}/downloads\"" \ -e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \ conf/local.conf + # Set the specified distro if different from del. + [ "${DY_DISTRO}" != "del" ] && sed -i -e "/^DISTRO ?=/cDISTRO ?= \"${DY_DISTRO}\"" conf/local.conf [ "${DY_USE_MIRROR}" = "true" ] && printf "${DIGI_PREMIRROR_CFG}" >> conf/local.conf [ "${DY_BUILD_VARIANTS}" = "true" ] && printf "\nINHERIT += \"rm_work\"\n" >> conf/local.conf time bitbake ${DY_TARGET}