Improve instructions to build AGL Distribution 09/4109/3
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Thu, 1 Oct 2015 12:31:57 +0000 (21:31 +0900)
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Tue, 6 Oct 2015 07:21:09 +0000 (16:21 +0900)
New build instructions are avairable.
 - Using 'repo' to download all repositories.
 - Only 1 shell script need to be run.

To install Repo:
    $ mkdir ~/bin
    $ export PATH=~/bin:$PATH

    $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo

To build meta-agl/meta-agl-demo:
    $ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
    $ repo sync
    $ source meta-agl/scripts/envsetup.sh <porter|qemux86-64|...> [build-dir]
    $ bitbake <target>

Note: currently AGL Distro supports only 2 machines, porter and qemux86-64.

Note for porter: Anyone who want to build for R-Car2 M2 Porter should
download Grahics Drivers and Multimedia Softwares from Renesas.
If not, envsetup.sh will stop and show some instruction, then
please follow it.

Change-Id: I1213130333e9a316bc3be5913cf2511c0cfb2853
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
scripts/envsetup.sh [new file with mode: 0644]

diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh
new file mode 100644 (file)
index 0000000..27d73a7
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+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
+
+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
+
+if [ -n "$SSTATE_DIR" ]; then
+        BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR"
+fi
+
+export BB_ENV_EXTRAWHITE
+