X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fenvsetup.sh;h=b30e0a66b3d6cdab763cc62e16ec396e246c0451;hb=04b8509c8a8f77d4fe3fed8883ceda61eb69069b;hp=27d73a7e232ef2ceb218a1a3af2fb6d3b17d61ba;hpb=97765246af0a6ddb65aaedaf585fc7cc1fcc0ccc;p=AGL%2Fmeta-agl.git diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index 27d73a7e2..b30e0a66b 100644 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh @@ -2,10 +2,13 @@ if [ -z $1 ]; then echo -e "Usage: source envsetup.sh [build dir]" - return -1 + 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 @@ -14,28 +17,55 @@ case "$1" in copy_mm_packages $1 if [ $? -ne 0 ]; then echo "Copying gfx drivers and multimedia packages for '$1' failed." - return -1 + return 1 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 + ;; + "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'" @@ -47,11 +77,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 @@ -62,3 +87,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