build scripts: adapt to new DEY images

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2016-02-05 11:41:09 +01:00
parent 5d123f8594
commit f0c62bbd7d
2 changed files with 15 additions and 10 deletions

View File

@ -16,7 +16,7 @@
# Parameters set by Jenkins: # Parameters set by Jenkins:
# 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 'dey-image-minimal') # DY_TARGET: Target image (the default is 'dey-image-qt')
# #
#=============================================================================== #===============================================================================
@ -29,7 +29,7 @@ MANIFEST_URL="https://github.com/digi-embedded/dey-manifest.git"
RM_WORK_CFG=" RM_WORK_CFG="
INHERIT += \"rm_work\" INHERIT += \"rm_work\"
# Exclude rm_work for some key packages (for debugging purposes) # Exclude rm_work for some key packages (for debugging purposes)
RM_WORK_EXCLUDE += \"dey-image-graphical dey-image-minimal linux-dey u-boot-dey\" RM_WORK_EXCLUDE += \"dey-image-qt linux-dey u-boot-dey\"
" "
X11_REMOVAL_CFG=" X11_REMOVAL_CFG="
@ -98,7 +98,7 @@ purge_sstate() {
# Set default values if not provided by Jenkins # Set default values if not provided by Jenkins
[ -z "${DY_PLATFORMS}" ] && DY_PLATFORMS="$(echo ${AVAILABLE_PLATFORMS})" [ -z "${DY_PLATFORMS}" ] && DY_PLATFORMS="$(echo ${AVAILABLE_PLATFORMS})"
[ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-graphical" [ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-qt"
YOCTO_IMGS_DIR="${WORKSPACE}/images" YOCTO_IMGS_DIR="${WORKSPACE}/images"
YOCTO_INST_DIR="${WORKSPACE}/dey.$(echo ${DY_REVISION} | tr '/' '_')" YOCTO_INST_DIR="${WORKSPACE}/dey.$(echo ${DY_REVISION} | tr '/' '_')"
@ -147,8 +147,8 @@ for platform in ${DY_PLATFORMS}; do
-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
printf "${RM_WORK_CFG}" >> conf/local.conf printf "${RM_WORK_CFG}" >> conf/local.conf
# Remove 'x11' distro feature if building minimal images # Remove 'x11' distro feature if building framebuffer images
if echo "${DY_TARGET}" | grep -qs "dey-image-minimal"; then if [ "${DY_FB_IMAGE}" = "true" ]; then
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

View File

@ -20,7 +20,7 @@
# 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_RM_WORK: Remove the package working folders to save disk space. # DY_RM_WORK: Remove the package working folders to save disk space.
# DY_TARGET: Target image (the default is 'dey-image-minimal') # DY_TARGET: Target image (the default is 'dey-image-qt')
# DY_USE_MIRROR: Use internal Digi mirror to download packages # DY_USE_MIRROR: Use internal Digi mirror to download packages
# #
#=============================================================================== #===============================================================================
@ -42,7 +42,7 @@ BB_GENERATE_MIRROR_TARBALLS = \"1\"
RM_WORK_CFG=" RM_WORK_CFG="
INHERIT += \"rm_work\" INHERIT += \"rm_work\"
# Exclude rm_work for some key packages (for debugging purposes) # Exclude rm_work for some key packages (for debugging purposes)
RM_WORK_EXCLUDE += \"dey-image-graphical dey-image-minimal linux-dey u-boot-dey\" RM_WORK_EXCLUDE += \"dey-image-qt linux-dey u-boot-dey\"
" "
X11_REMOVAL_CFG=" X11_REMOVAL_CFG="
@ -116,12 +116,17 @@ purge_sstate() {
[ -z "${WORKSPACE}" ] && error "WORKSPACE not specified" [ -z "${WORKSPACE}" ] && error "WORKSPACE not specified"
# Set default settings if Jenkins does not do it # Set default settings if Jenkins does not do it
[ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-minimal" [ -z "${DY_TARGET}" ] && DY_TARGET="dey-image-qt"
[ -z "${DY_DISTRO}" ] && DY_DISTRO="dey" [ -z "${DY_DISTRO}" ] && DY_DISTRO="dey"
# If DY_BUILD_TCHAIN is unset, set it for release jobs # If DY_BUILD_TCHAIN is unset, set it for release jobs
[ -z "${DY_BUILD_TCHAIN}" ] && [[ "${JOB_NAME}" =~ dey-.*-release ]] && DY_BUILD_TCHAIN="true" [ -z "${DY_BUILD_TCHAIN}" ] && [[ "${JOB_NAME}" =~ dey-.*-release ]] && DY_BUILD_TCHAIN="true"
# If DY_FB_IMAGE is unset, set it depending on the job name
if [ -z "${DY_FB_IMAGE}" ] && echo ${JOB_NAME} | grep -qs 'dey.*fb'; then
DY_FB_IMAGE="true"
fi
# Per-platform variants # Per-platform variants
while read _pl _var; do while read _pl _var; do
# DY_BUILD_VARIANTS comes from Jenkins environment: # DY_BUILD_VARIANTS comes from Jenkins environment:
@ -207,8 +212,8 @@ for platform in ${DY_PLATFORMS}; do
if [ "${DY_RM_WORK}" = "true" ]; then if [ "${DY_RM_WORK}" = "true" ]; then
printf "${RM_WORK_CFG}" >> conf/local.conf printf "${RM_WORK_CFG}" >> conf/local.conf
fi fi
# Remove 'x11' distro feature if building minimal and tiny images # Remove 'x11' distro feature if building framebuffer images
if echo "${DY_TARGET}" | grep -qs "^dey-image-\(minimal\|tiny\)"; then if [ "${DY_FB_IMAGE}" = "true" ]; then
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