X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL%2Fmeta-agl.git;a=blobdiff_plain;f=scripts%2Fenvsetup.sh;h=89713d968351e07fae4619eeb26731a07f2073c9;hp=adde54010c2d7af764d0f521a8673aeda2168beb;hb=8cd9f905fe9a7ba21d792dbb3961d9997c2dd3b7;hpb=59fb43fa95a212af20009247332b4c5c34302b1f diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index adde54010..89713d968 100644 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh @@ -5,7 +5,14 @@ if [ -z $1 ]; then return 1 fi -case "$1" in +MACHINE="$1" + +# set template conf for each +if [ -z "$TEMPLATECONF" ]; then + TEMPLATECONF="$PWD/meta-agl-demo/templates/$MACHINE/conf" +fi + +case "$MACHINE" in "porter") # setup proprietary gfx drivers and multimedia packages COPY_MM_SCRIPT=meta-renesas/meta-rcar-gen2/scripts/setup_mm_packages.sh @@ -18,28 +25,30 @@ case "$1" in fi fi - # template conf for R-Car2 M2 Porter board - TEMPLATECONF=$PWD/meta-renesas/meta-rcar-gen2/conf + if [ ! -d "$TEMPLATECONF" ]; then + # set template conf for R-Car2 M2 Porter board + TEMPLATECONF="$PWD/meta-renesas/meta-rcar-gen2/conf" + fi ;; "intel-corei7-64") - # template conf for MinnowBoard MAX - TEMPLATECONF=$PWD/meta-agl-demo/conf + ;; + "qemux86") ;; "qemux86-64") - # template conf for QEMU x86-64 - TEMPLATECONF=$PWD/meta-agl-demo/conf ;; *) # nothing to do here - echo "WARN: '$1' is not tested by AGL Distro" - if [ -z $TEMPLATECONF ]; then - TEMPLATECONF=$PWD/meta-agl-demo/conf - fi + echo "WARN: '$MACHINE' is not tested by AGL Distro" ;; esac echo "envsetup: Set '$1 as MACHINE." -export MACHINE="$1" +export MACHINE + +if [ ! -d "$TEMPLATECONF" ]; then + # Allow to use templates at meta-agl-demo/conf + TEMPLATECONF="$PWD/meta-agl-demo/conf" +fi echo "envsetup: Using templates for local.conf & bblayers.conf from :" echo " '$TEMPLATECONF'"