From b48fe3ed766250dac8564a0f6bd0b05988e35f5c Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 18 Aug 2017 14:27:37 +0300 Subject: scripts/envsetup.sh: Use machine specific local.conf Use the configurations for local.conf provided by layer meta-updater-* (depending on the machine) if variable TEMPLATECONF has not been set. Otherwise, if the variable is not set or if the layer does not provide any configurations then the default will be used (just as before this change). Signed-off-by: Leon Anavi --- scripts/envsetup.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index ff78681..260b048 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh @@ -24,7 +24,15 @@ fi METADIR="${SOURCEDIR}/../.." if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then - source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" + if [ -z "$TEMPLATECONF" ] && [ -d ${METADIR}/meta-updater-${MACHINE}/conf ]; then + # Use the template configurations for the specified machine + TEMPLATECONF=${METADIR}/meta-updater-${MACHINE}/conf + source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" + unset TEMPLATECONF + else + # Use the default configurations or TEMPLATECONF set by the user + source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" + fi echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf -- cgit v1.2.3-54-g00ecf