X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fenvsetup.sh;h=0b783e9a2a0fca2cf9161eb3f8836d02bc658e6a;hb=d33e1cc64a0b204bbacca793569b581024133061;hp=adde54010c2d7af764d0f521a8673aeda2168beb;hpb=91f7784cfd26ca7d26e1006d78c067e74c7dc92a;p=AGL%2Fmeta-agl.git diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index adde54010..0b783e9a2 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" + + +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 +21,44 @@ 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 + ;; + "minnowboard") + # alias for minnowboardmax + MACHINE="intel-corei7-64" + ;; + "qemux86") ;; "qemux86-64") - # template conf for QEMU x86-64 - TEMPLATECONF=$PWD/meta-agl-demo/conf + ;; + "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 +# set template conf for each +if [ -z "$TEMPLATECONF" ]; then + if [ -d "$PWD/meta-agl-demo/templates/$MACHINE/conf" ]; then + TEMPLATECONF="$PWD/meta-agl-demo/templates/$MACHINE/conf" + fi +fi + echo "envsetup: Set '$1 as MACHINE." -export MACHINE="$1" +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'" @@ -51,11 +70,6 @@ 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 @@ -66,3 +80,9 @@ 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