From 24fb7f5bd454dd48093ff42b5ffcb74b1339399c Mon Sep 17 00:00:00 2001 From: Diego Escalona Date: Mon, 18 Jul 2016 13:21:17 +0200 Subject: [PATCH] build.sh: add support for the manufacturing build job - Added a checker with the job name to declare the manufacturing var - Changed the name of the repo manifest file for the manufacturing job - Added a checker to updated the bblayers.conf file with the mfg layer Signed-off-by: Diego Escalona --- sdk/build.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sdk/build.sh b/sdk/build.sh index 8e5596d37..c668c50ef 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -128,6 +128,11 @@ if [ -z "${DY_FB_IMAGE}" ] && echo ${JOB_NAME} | grep -qs 'dey.*fb'; then DY_FB_IMAGE="true" fi +# If DY_MFG_IMAGE is unset, set it depending on the job name +if [ -z "${DY_MFG_IMAGE}" ] && echo ${JOB_NAME} | grep -qs 'dey.*mfg'; then + DY_MFG_IMAGE="true" +fi + # Per-platform data while read _pl _var _tgt; do # DY_BUILD_VARIANTS comes from Jenkins environment: @@ -174,7 +179,11 @@ if pushd ${YOCTO_INST_DIR}; then error "Revision \"${DY_REVISION}\" not found" fi fi - yes "" 2>/dev/null | ${REPO} init --no-repo-verify -u ${MANIFEST_URL} ${repo_revision} + # If it is a manufacturing job, specify the manufacturing manifest name + if [ "${DY_MFG_IMAGE}" = "true" ]; then + mfg_xml="-m manufacturing.xml" + fi + yes "" 2>/dev/null | ${REPO} init --no-repo-verify -u ${MANIFEST_URL} ${repo_revision} ${mfg_xml} ${REPO} forall -p -c 'git remote prune $(git remote)' time ${REPO} sync -d ${MAKE_JOBS} popd @@ -221,6 +230,10 @@ for platform in ${DY_PLATFORMS}; do if [ "${DY_FB_IMAGE}" = "true" ]; then printf "${X11_REMOVAL_CFG}" >> conf/local.conf fi + # Add the manufacturing layer to bblayers.conf file if it is a manufacturing job + if [ "${DY_MFG_IMAGE}" = "true" ]; then + sed -i -e "/meta-digi-dey/a\ ${YOCTO_INST_DIR}/sources/meta-digi-mfg \\\\" conf/bblayers.conf + fi for target in ${platform_targets}; do printf "\n[INFO] Building the ${target} target.\n" time bitbake ${target}