build.sh: remove support for building variants
This is dead code used in the past for the ccardimx28. It is not used in any other platform, so just remove it. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
cd9e12da32
commit
021e80d1e1
159
sdk/build.sh
159
sdk/build.sh
|
|
@ -154,37 +154,25 @@ if [ -n "${DY_MACHINES_LAYER}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Per-platform data
|
# Per-platform data
|
||||||
while read _pl _var _tgt; do
|
while read _pl _tgt; do
|
||||||
# DY_BUILD_VARIANTS comes from Jenkins environment:
|
|
||||||
# 'false': don't build variants (only the default)
|
|
||||||
# <empty>: 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
|
|
||||||
[ -n "${DY_TARGET}" ] && _tgt="${DY_TARGET}" || true
|
[ -n "${DY_TARGET}" ] && _tgt="${DY_TARGET}" || true
|
||||||
# Dashes are not allowed in variables so let's substitute them on
|
# Dashes are not allowed in variables so let's substitute them on
|
||||||
# the fly with underscores.
|
# the fly with underscores.
|
||||||
eval "${_pl//-/_}_var=\"${_var//,/ }\""
|
|
||||||
eval "${_pl//-/_}_tgt=\"${_tgt//,/ }\""
|
eval "${_pl//-/_}_tgt=\"${_tgt//,/ }\""
|
||||||
done<<-_EOF_
|
done<<-_EOF_
|
||||||
ccimx8mm-dvk DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx8mm-dvk dey-image-qt,dey-image-crank
|
||||||
ccimx8mn-dvk DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx8mn-dvk dey-image-qt,dey-image-crank
|
||||||
ccimx8mp-dvk DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx8mp-dvk dey-image-qt,dey-image-crank
|
||||||
ccimx8x-sbc-pro DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx8x-sbc-pro dey-image-qt,dey-image-crank
|
||||||
ccimx8x-sbc-express DONTBUILDVARIANTS dey-image-qt
|
ccimx8x-sbc-express dey-image-qt
|
||||||
ccimx6qpsbc DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx6qpsbc dey-image-qt,dey-image-crank
|
||||||
ccimx6sbc DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx6sbc dey-image-qt,dey-image-crank
|
||||||
ccimx6ulsbc DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccimx6ulsbc dey-image-qt,dey-image-crank
|
||||||
ccimx6ulstarter DONTBUILDVARIANTS core-image-base
|
ccimx6ulstarter core-image-base
|
||||||
ccimx6ulsom DONTBUILDVARIANTS dey-image-mft-module-min
|
ccimx6ulsom dey-image-mft-module-min
|
||||||
ccimx6ulrftest DONTBUILDVARIANTS dey-image-mft-module-rf
|
ccimx6ulrftest dey-image-mft-module-rf
|
||||||
ccmp15-dvk DONTBUILDVARIANTS dey-image-qt,dey-image-crank
|
ccmp15-dvk dey-image-qt,dey-image-crank
|
||||||
ccmp13-dvk DONTBUILDVARIANTS core-image-base
|
ccmp13-dvk core-image-base
|
||||||
_EOF_
|
_EOF_
|
||||||
|
|
||||||
YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
||||||
|
|
@ -232,71 +220,62 @@ rm -rf ${YOCTO_IMGS_DIR} ${YOCTO_PROJ_DIR}
|
||||||
|
|
||||||
# Create projects and build
|
# Create projects and build
|
||||||
for platform in ${DY_PLATFORMS}; do
|
for platform in ${DY_PLATFORMS}; do
|
||||||
# The variables <platform>_var|tgt got their dashes converted to
|
# The variable <platform>_tgt got its dashes converted to
|
||||||
# underscores, so we must convert also the ones in ${platform}.
|
# underscores, so we must convert also the ones in ${platform}.
|
||||||
eval platform_variants=\"\${${platform//-/_}_var}\"
|
|
||||||
eval platform_targets=\"\${${platform//-/_}_tgt}\"
|
eval platform_targets=\"\${${platform//-/_}_tgt}\"
|
||||||
for variant in ${platform_variants}; do
|
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}"
|
||||||
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}"
|
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}"
|
||||||
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}"
|
mkdir -p ${_this_img_dir} ${_this_prj_dir}
|
||||||
if [ "${variant}" != "DONTBUILDVARIANTS" ]; then
|
if pushd ${_this_prj_dir}; then
|
||||||
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}_${variant}"
|
# Configure and build the project in a sub-shell to avoid
|
||||||
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}_${variant}"
|
# mixing environments between different platform's projects
|
||||||
_this_var_arg="-v ${variant}"
|
(
|
||||||
[ "${variant}" = "-" ] && _this_var_arg="-v \\"
|
export TEMPLATECONF="${TEMPLATECONF:+${TEMPLATECONF}/${platform}}"
|
||||||
fi
|
MKP_PAGER="" . ${YOCTO_INST_DIR}/mkproject.sh -p ${platform} ${MACHINES_LAYER} <<< "y"
|
||||||
mkdir -p ${_this_img_dir} ${_this_prj_dir}
|
# Set a common DL_DIR and SSTATE_DIR for all platforms
|
||||||
if pushd ${_this_prj_dir}; then
|
sed -i -e "/^#DL_DIR ?=/cDL_DIR ?= \"${YOCTO_DOWNLOAD_DIR}\"" \
|
||||||
# Configure and build the project in a sub-shell to avoid
|
-e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \
|
||||||
# mixing environments between different platform's projects
|
conf/local.conf
|
||||||
(
|
# Set the DISTRO and remove 'meta-digi-dey' layer if distro is not DEY based
|
||||||
export TEMPLATECONF="${TEMPLATECONF:+${TEMPLATECONF}/${platform}}"
|
sed -i -e "/^DISTRO ?=/cDISTRO ?= \"${DY_DISTRO}\"" conf/local.conf
|
||||||
MKP_PAGER="" . ${YOCTO_INST_DIR}/mkproject.sh -p ${platform} ${MACHINES_LAYER} ${_this_var_arg} <<< "y"
|
if ! echo "${DY_DISTRO}" | grep -qs "dey"; then
|
||||||
# Set a common DL_DIR and SSTATE_DIR for all platforms
|
sed -i -e '/meta-digi-dey/d' conf/bblayers.conf
|
||||||
sed -i -e "/^#DL_DIR ?=/cDL_DIR ?= \"${YOCTO_DOWNLOAD_DIR}\"" \
|
fi
|
||||||
-e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \
|
if [ "${DY_USE_MIRROR}" = "true" ]; then
|
||||||
conf/local.conf
|
sed -i -e "s,^#DIGI_INTERNAL_GIT,DIGI_INTERNAL_GIT,g" conf/local.conf
|
||||||
# Set the DISTRO and remove 'meta-digi-dey' layer if distro is not DEY based
|
printf "${DIGI_PREMIRROR_CFG}" >> conf/local.conf
|
||||||
sed -i -e "/^DISTRO ?=/cDISTRO ?= \"${DY_DISTRO}\"" conf/local.conf
|
fi
|
||||||
if ! echo "${DY_DISTRO}" | grep -qs "dey"; then
|
if [ "${DY_RM_WORK}" = "true" ]; then
|
||||||
sed -i -e '/meta-digi-dey/d' conf/bblayers.conf
|
printf "${RM_WORK_CFG}" >> conf/local.conf
|
||||||
fi
|
fi
|
||||||
if [ "${DY_USE_MIRROR}" = "true" ]; then
|
printf "${ZIP_INSTALLER_CFG}" >> conf/local.conf
|
||||||
sed -i -e "s,^#DIGI_INTERNAL_GIT,DIGI_INTERNAL_GIT,g" conf/local.conf
|
# Append extra configuration macros if provided from build environment
|
||||||
printf "${DIGI_PREMIRROR_CFG}" >> conf/local.conf
|
if [ -n "${DY_EXTRA_LOCAL_CONF}" ]; then
|
||||||
fi
|
printf "%s\n" "${DY_EXTRA_LOCAL_CONF}" >> conf/local.conf
|
||||||
if [ "${DY_RM_WORK}" = "true" ]; then
|
fi
|
||||||
printf "${RM_WORK_CFG}" >> conf/local.conf
|
# Add build timestamp
|
||||||
fi
|
if [ -n "${BUILD_TIMESTAMP}" ]; then
|
||||||
printf "${ZIP_INSTALLER_CFG}" >> conf/local.conf
|
printf "${BUILD_TIMESTAMP}" >> conf/local.conf
|
||||||
# Append extra configuration macros if provided from build environment
|
fi
|
||||||
if [ -n "${DY_EXTRA_LOCAL_CONF}" ]; then
|
# Check if it is a manufacturing job and, if the mfg layer is not there, add it
|
||||||
printf "%s\n" "${DY_EXTRA_LOCAL_CONF}" >> conf/local.conf
|
if [ "${DY_MFG_IMAGE}" = "true" ] && ! grep -qs "meta-digi-mfg" conf/bblayers.conf; then
|
||||||
fi
|
sed -i -e "/meta-digi-dey/a\ ${YOCTO_INST_DIR}/sources/meta-digi-mfg \\\\" conf/bblayers.conf
|
||||||
# Add build timestamp
|
fi
|
||||||
if [ -n "${BUILD_TIMESTAMP}" ]; then
|
printf "\n[INFO] Show customized local.conf.\n"
|
||||||
printf "${BUILD_TIMESTAMP}" >> conf/local.conf
|
cat conf/local.conf
|
||||||
fi
|
|
||||||
# Check if it is a manufacturing job and, if the mfg layer is not there, add it
|
|
||||||
if [ "${DY_MFG_IMAGE}" = "true" ] && ! grep -qs "meta-digi-mfg" conf/bblayers.conf; then
|
|
||||||
sed -i -e "/meta-digi-dey/a\ ${YOCTO_INST_DIR}/sources/meta-digi-mfg \\\\" conf/bblayers.conf
|
|
||||||
fi
|
|
||||||
printf "\n[INFO] Show customized local.conf.\n"
|
|
||||||
cat conf/local.conf
|
|
||||||
|
|
||||||
for target in ${platform_targets}; do
|
for target in ${platform_targets}; do
|
||||||
printf "\n[INFO] Building the ${target} target.\n"
|
printf "\n[INFO] Building the ${target} target.\n"
|
||||||
time bitbake ${target} $(swu_recipe_name ${target})
|
time bitbake ${target} $(swu_recipe_name ${target})
|
||||||
# Build the toolchain for DEY images
|
# Build the toolchain for DEY images
|
||||||
if [ "${DY_BUILD_TCHAIN}" = "true" ] && echo "${target}" | grep -qs '^\(core\|dey\)-image-[^-]\+$'; then
|
if [ "${DY_BUILD_TCHAIN}" = "true" ] && echo "${target}" | grep -qs '^\(core\|dey\)-image-[^-]\+$'; then
|
||||||
printf "\n[INFO] Building the toolchain for ${target}.\n"
|
printf "\n[INFO] Building the toolchain for ${target}.\n"
|
||||||
time bitbake -c populate_sdk ${target}
|
time bitbake -c populate_sdk ${target}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
purge_sstate
|
purge_sstate
|
||||||
)
|
)
|
||||||
copy_images ${_this_img_dir}
|
copy_images ${_this_img_dir}
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue