-if [ -z $1 ]; then
- echo -e "Usage: source envsetup.sh <board/device> [build dir]"
- return -1
-fi
-
-case "$1" in
- "porter")
- # setup proprietary gfx drivers and multimedia packages
- COPY_MM_SCRIPT=meta-renesas/meta-rcar-gen2/scripts/setup_mm_packages.sh
- if [ -f $COPY_MM_SCRIPT ]; then
- . $COPY_MM_SCRIPT
- copy_mm_packages $1
- if [ $? -ne 0 ]; then
- echo "Copying gfx drivers and multimedia packages for '$1' failed."
- return -1
- fi
- fi
-
- # template conf for R-Car2 M2 Porter board
- TEMPLATECONF=$PWD/meta-renesas/meta-rcar-gen2/conf
- ;;
- "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
- ;;
-esac
-
-echo "envsetup: Set '$1 as MACHINE."
-export MACHINE="$1"
-
-echo "envsetup: Using templates for local.conf & bblayers.conf from :"
-echo " '$TEMPLATECONF'"
-export TEMPLATECONF
-
-if [ -n "$2" ]; then
- BUILD_DIR="$2"
-else
- BUILD_DIR=build
-fi
+################################################################################
+#
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Stéphane Desneux <sdx@iot.bzh>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+################################################################################