Introduce TI DRA7 vayu and cleanup template files
[AGL/meta-agl.git] / scripts / envsetup.sh
index 4925ef7..8506954 100644 (file)
@@ -6,11 +6,7 @@ if [ -z $1 ]; then
 fi
 
 MACHINE="$1"
-
-# set template conf for each <board/device>
-if [ -z "$TEMPLATECONF" ]; then
-    TEMPLATECONF="$PWD/meta-agl-demo/templates/$MACHINE/conf"
-fi
+echo "MACHINE=$MACHINE"
 
 case "$MACHINE" in
         "porter")
@@ -25,6 +21,13 @@ case "$MACHINE" in
                         fi
                 fi
 
+                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"
@@ -32,10 +35,20 @@ case "$MACHINE" in
                 ;;
         "intel-corei7-64")
                 ;;
+        "minnowboard")
+                # alias for minnowboardmax
+                MACHINE="intel-corei7-64"
+                ;;
         "qemux86")
                 ;;
         "qemux86-64")
                 ;;
+        "dra7xx-evm")
+                ;;
+        "vayu")
+                # nickname for dra7xx-evm
+                MACHINE="dra7xx-evm"
+                ;;
         "wandboard")
                 ;;
         *)
@@ -44,9 +57,23 @@ case "$MACHINE" in
                 ;;
 esac
 
-echo "envsetup: Set '$1 as MACHINE."
+echo "TEMPALTECONF=$TEMPLATECONF"
+# set template conf for each <board/device>
+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"
@@ -62,6 +89,11 @@ else
   BUILD_DIR=build
 fi
 
+echo "envsetup: Setup build environment for poky/oe."
+echo -e
+
+source poky/oe-init-build-env $BUILD_DIR
+
 if [ -n "$DL_DIR" ]; then
         BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE DL_DIR"
 fi
@@ -72,9 +104,4 @@ fi
 
 export BB_ENV_EXTRAWHITE
 
-echo "envsetup: Setup build environment for poky/oe."
-echo -e
-
-source poky/oe-init-build-env $BUILD_DIR
-
 unset TEMPLATECONF