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 <alex.gonzalez@digi.com>
This commit is contained in:
parent
68fd85851f
commit
a6a3a9a220
|
|
@ -15,6 +15,7 @@
|
||||||
#
|
#
|
||||||
# Parameters set by Jenkins:
|
# Parameters set by Jenkins:
|
||||||
# DY_BUILD_VARIANTS: Build all platform variants
|
# DY_BUILD_VARIANTS: Build all platform variants
|
||||||
|
# DY_DISTRO: Distribution name (the default is 'del')
|
||||||
# DY_PLATFORMS: Platforms to build
|
# DY_PLATFORMS: Platforms to build
|
||||||
# DY_REVISION: Revision of the manifest repository (for 'repo init')
|
# 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')
|
||||||
|
|
@ -69,8 +70,9 @@ copy_images() {
|
||||||
[ -z "${DY_USE_MIRROR}" ] && error "DY_USE_MIRROR not specified"
|
[ -z "${DY_USE_MIRROR}" ] && error "DY_USE_MIRROR not specified"
|
||||||
[ -z "${WORKSPACE}" ] && error "WORKSPACE 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_TARGET}" ] && DY_TARGET="del-image-minimal"
|
||||||
|
[ -z "${DY_DISTRO}" ] && DY_DISTRO="del"
|
||||||
|
|
||||||
# Per-platform variants
|
# Per-platform variants
|
||||||
while read _pl _var; do
|
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\"" \
|
sed -i -e "/^#DL_DIR ?=/cDL_DIR ?= \"${YOCTO_PROJ_DIR}/downloads\"" \
|
||||||
-e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \
|
-e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \
|
||||||
conf/local.conf
|
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_USE_MIRROR}" = "true" ] && printf "${DIGI_PREMIRROR_CFG}" >> conf/local.conf
|
||||||
[ "${DY_BUILD_VARIANTS}" = "true" ] && printf "\nINHERIT += \"rm_work\"\n" >> conf/local.conf
|
[ "${DY_BUILD_VARIANTS}" = "true" ] && printf "\nINHERIT += \"rm_work\"\n" >> conf/local.conf
|
||||||
time bitbake ${DY_TARGET}
|
time bitbake ${DY_TARGET}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue