X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fenvsetup.sh;h=85069543a12c0ac34bd844494404b06893a4ca20;hb=f431a64246282e068570519b137cc8670521addd;hp=d00330128f8bd26392ab50ef2c497a17b666ce5f;hpb=6df1067fd87f68e67dad5cf5bd85acfea4a17abb;p=AGL%2Fmeta-agl.git diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index d00330128..85069543a 100644 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh @@ -5,7 +5,10 @@ if [ -z $1 ]; then return 1 fi -case "$1" in +MACHINE="$1" +echo "MACHINE=$MACHINE" + +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,24 +21,63 @@ 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 + ;; + "porter-nogfx") + MACHINE="porter" + 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") + ;; + "minnowboard") + # alias for minnowboardmax + MACHINE="intel-corei7-64" + ;; + "qemux86") ;; "qemux86-64") - # template conf for QEMU x86-64 - TEMPLATECONF=$PWD/meta-agl-demo/conf + ;; + "dra7xx-evm") + ;; + "vayu") + # nickname for dra7xx-evm + MACHINE="dra7xx-evm" + ;; + "wandboard") ;; *) # 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" +echo "TEMPALTECONF=$TEMPLATECONF" +# set template conf for each +if [ -z "$TEMPLATECONF" ]; then + # lookup meta-agl-demo first + if [ -d "$PWD/meta-agl-demo/templates/$MACHINE/conf" ]; then + TEMPLATECONF="$PWD/meta-agl-demo/templates/$MACHINE/conf" + # lookup meta-agl 2nd + elif [ -d "$PWD/meta-agl/templates/$MACHINE/conf" ]; then + TEMPLATECONF="$PWD/meta-agl/templates/$MACHINE/conf" + fi +fi +echo "TEMPLATECONF=$TEMPLATECONF" + +echo "envsetup: Set '$1' as MACHINE." +export MACHINE + +# fallback +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'" @@ -62,3 +104,4 @@ fi export BB_ENV_EXTRAWHITE +unset TEMPLATECONF