Changes to support the repo clone rework 01/21501/5
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 5 Jun 2019 14:06:59 +0000 (16:06 +0200)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 10 Jun 2019 19:21:05 +0000 (21:21 +0200)
To be merged together with:
https://gerrit.automotivelinux.org/gerrit/#/c/AGL/AGL-repo/+/21389/

v2: fix the aglsetup script
v3: fix scripts to extract m3ulcb
v4: use single folder for BSPs

Bug-AGL: SPEC-2450

Change-Id: I3227896c68ec1413f55cf67ad8f15a7adfe87a52
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
21 files changed:
meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf
meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
scripts/.aglsetup_genconfig.bash
templates/base/bblayers.conf.sample
templates/feature/agl-fossdriver/50_bblayers.conf.inc
templates/feature/agl-gplv2/50_bblayers.conf.inc
templates/feature/agl-profile-graphical-qt5/50_bblayers.conf.inc
templates/feature/agl-sota/50_bblayers.conf.inc
templates/machine/beaglebone/50_bblayers.conf.inc
templates/machine/cyclone5/50_bblayers.conf.inc
templates/machine/dra7xx-evm/50_bblayers.conf.inc
templates/machine/dragonboard-410c/50_bblayers.conf.inc
templates/machine/dragonboard-820c/50_bblayers.conf.inc
templates/machine/h3-salvator-x/50_bblayers.conf.inc
templates/machine/h3ulcb/50_bblayers.conf.inc
templates/machine/hsdk/40_bblayers.conf.inc
templates/machine/imx6qdlsabreauto/40_bblayers.conf.inc
templates/machine/intel-corei7-64/50_bblayers.conf.inc
templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc
templates/machine/m3ulcb/50_bblayers.conf.inc
templates/machine/raspberrypi3/50_bblayers.conf.inc

index 277186f..45fef2c 100644 (file)
@@ -3,8 +3,8 @@ BBPATH .= ":${LAYERDIR}"
 
 # We have a recipes directory, add to BBFILES
 BBFILES += " \
-    ${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bb \
-    ${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bbappend \
+    ${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bb \
+    ${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bbappend \
     ${LAYERDIR}/recipes-*/*/*.bb \
     ${LAYERDIR}/recipes-*/*/*.bbappend \
 "
index 739a5c6..798ebfb 100644 (file)
@@ -8,7 +8,7 @@ ARCHIVE_PREFIX_NAME="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux"
 ZIP_BUGFIX=$ARCHIVE_PREFIX_NAME"-weston5-20190516.zip"
 TAR_BUGFIX=$ARCHIVE_PREFIX_NAME"-20190516.tar.gz"
 
-COPY_SCRIPT="$METADIR/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh"
+COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh"
 
 test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
 DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
@@ -63,7 +63,7 @@ function copy_mm_packages() {
     fi
 
     if [ -f $COPY_SCRIPT ]; then
-        cd $METADIR/meta-renesas-rcar-gen3/
+        cd $METADIR/bsp/meta-renesas-rcar-gen3/
         $COPY_SCRIPT -d -f $EXTRACT_DIR
         cd ..
     else
@@ -105,7 +105,7 @@ function copy_mm_packages() {
     find $EXTRACT_DIR -name "$GFX_BINARIES_NAME" -exec mv -t $EXTRACT_DIR {} \;
     for f in `find $EXTRACT_DIR -name "$GFX_BINARIES_NAME" -exec basename {} \;`
     do
-        mv $EXTRACT_DIR/${f} "$METADIR/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module"/${f:4}
+        mv $EXTRACT_DIR/${f} "$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module"/${f:4}
     done;
 
     #Clean
index e95605a..c4dde42 100755 (executable)
@@ -51,11 +51,11 @@ function debug() { [[ $DEBUG == 1 ]] && echo "DEBUG: $@" >&2; return 0;}
 info "------------ $SCRIPT: Starting"
 
 #compute AGL_REPOSITORIES
-AGL_REPOSITORIES=$(for x in $(ls -d $METADIR/*/templates/{machine,feature}); do echo $(basename $(dirname $(dirname $x))); done | sort -u)
+AGL_REPOSITORIES=$(for x in $(ls -d $METADIR/meta-ag*/templates/{machine,feature} $METADIR/bsp/*/templates/machine); do echo $(basename $(dirname $(dirname $x))); done | sort -u)
 
 function list_machines() {
-       for x in $@; do
-               for y in $(ls -d $METADIR/$x/templates/machine/* 2>/dev/null); do
+       for a in $@; do
+               for y in $(ls -d $METADIR/{.,bsp}/$a/templates/machine/* 2>/dev/null); do
                        echo $(basename $y)
                done
        done
@@ -78,7 +78,7 @@ function validate_machines() {
        list_all_machines | sort | uniq -c | while read cnt machine; do
                [[ $cnt == 1 ]] && continue
                info "Machine $machine found in the following repositories:"
-               for x in $(ls -d $METADIR/*/templates/machine/$machine); do
+               for x in $(ls -d $METADIR/*/templates/machine/$machine $METADIR/bsp/*/templates/machine/$machine ); do
                        info "   - $x"
                done
                error "Multiple machine templates are not allowed"
@@ -104,7 +104,7 @@ function validate_features() {
        list_all_features | sort | uniq -c | while read cnt feature; do
                [[ $cnt == 1 ]] && continue;
                info "Feature $feature found in the following repositories:"
-               for x in $(ls -d $METADIR/*/templates/feature/$feature); do
+               for x in $(ls -d $METADIR/*/templates/feature/$feature ); do
                        info "   - $x"
                done
                error "Multiple feature templates are not allowed"
@@ -115,8 +115,10 @@ function validate_features() {
 function find_machine_dir() {
        machine=$1
        for x in $AGL_REPOSITORIES; do
-               dir=$METADIR/$x/templates/machine/$machine
-               [[ -d $dir ]] && { echo $dir; return 0; }
+               dirs=$(ls -d $METADIR/{.,bsp}/$x/templates/machine/$machine)
+               for dir in $dirs; do
+                   [[ -d $dir ]] && { echo $dir; return 0; }
+               done
        done
        return 1
 }
@@ -373,11 +375,11 @@ function genconfig() {
        # step 1: run usual OE setup to generate conf dir
        export TEMPLATECONF=$(cd $SCRIPTDIR/../templates/base && pwd -P)
        debug "running oe-init-build-env with TEMPLATECONF=$TEMPLATECONF"
-       info "   Running $METADIR/poky/oe-init-build-env"
+       info "   Running $METADIR/external/poky/oe-init-build-env"
        info "   Templates dir: $TEMPLATECONF"
 
        CURDIR=$(pwd -P)
-       . $METADIR/poky/oe-init-build-env $BUILDDIR >/dev/null
+       . $METADIR/external/poky/oe-init-build-env $BUILDDIR >/dev/null
        cd $CURDIR
 
        # step 2: concatenate other remaining fragments coming from base
@@ -517,7 +519,7 @@ info "OK"
 infon "Generating setup file: $BUILDDIR/agl-init-build-env ... "
 
 cat <<EOF >$BUILDDIR/agl-init-build-env
-. $METADIR/poky/oe-init-build-env $BUILDDIR
+. $METADIR/external/poky/oe-init-build-env $BUILDDIR
 if [ -n "\$DL_DIR" ]; then
        BB_ENV_EXTRAWHITE="\$BB_ENV_EXTRAWHITE DL_DIR"
 fi
index 97537f4..653f6db 100644 (file)
@@ -8,16 +8,16 @@ BBFILES ?= ""
 # Convenience variables usable in various configuration fragments
 #----------------------------------
 BCONFDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)))}"
-METADIR  := "${@os.path.abspath('##OEROOT##/..')}"
+METADIR  := "${@os.path.abspath('##OEROOT##/../..')}"
 
 # These are the core OE + YP Layers
 #----------------------------------
 YOCTO_LAYERS = " \
-  ${METADIR}/poky/meta \
-  ${METADIR}/poky/meta-poky \
+  ${METADIR}/external/poky/meta \
+  ${METADIR}/external/poky/meta-poky \
   "
 #  this is added for the boards where necessary, not globally
-#  ${METADIR}/poky/meta-yocto-bsp \
+#  ${METADIR}/external/poky/meta-yocto-bsp \
 #
 # These are the AGL CORE Layers that make up the basis
 # - they create a minimal bootable filesystem
@@ -30,8 +30,8 @@ AGL_CORE_LAYERS = " \
   "
 
 AGL_APPFW_LAYERS = " \
-  ${METADIR}/meta-security \
-  ${METADIR}/meta-openembedded/meta-perl \
+  ${METADIR}/external/meta-security \
+  ${METADIR}/external/meta-openembedded/meta-perl \
   ${METADIR}/meta-agl/meta-security \
   ${METADIR}/meta-agl/meta-app-framework \
     "
@@ -40,11 +40,11 @@ AGL_APPFW_LAYERS = " \
 # These are the direct dependencies of the AGL CORE Layers
 #---------------------------------------------------------
 AGL_CORE_DEPENDENCY_LAYERS = " \
-  ${METADIR}/meta-openembedded/meta-oe \
-  ${METADIR}/meta-openembedded/meta-multimedia \
-  ${METADIR}/meta-openembedded/meta-networking \
-  ${METADIR}/meta-openembedded/meta-python \
-  ${METADIR}/meta-openembedded/meta-filesystems \
+  ${METADIR}/external/meta-openembedded/meta-oe \
+  ${METADIR}/external/meta-openembedded/meta-multimedia \
+  ${METADIR}/external/meta-openembedded/meta-networking \
+  ${METADIR}/external/meta-openembedded/meta-python \
+  ${METADIR}/external/meta-openembedded/meta-filesystems \
   "
 
 ####################
@@ -57,8 +57,8 @@ BBLAYERS ?= " \
   "
 
 BBLAYERS_NON_REMOVABLE ?= " \
-  ${METADIR}/poky/meta \
-  ${METADIR}/poky/meta-poky \
+  ${METADIR}/external/poky/meta \
+  ${METADIR}/external/poky/meta-poky \
   ${METADIR}/meta-agl/meta-agl-profile-core \
   ${METADIR}/meta-agl/meta-agl-distro \
   "
index f429f39..eea04c4 100644 (file)
@@ -1 +1 @@
-BBLAYERS =+ "${METADIR}/meta-spdxscanner"
+BBLAYERS =+ "${METADIR}/external/meta-spdxscanner"
index 4c31c45..a0f2698 100644 (file)
@@ -1 +1 @@
-BBLAYERS =+ "${METADIR}/meta-gplv2"
+BBLAYERS =+ "${METADIR}/external/meta-gplv2"
index b0ac5bf..9602679 100644 (file)
@@ -5,5 +5,5 @@ BBLAYERS =+ " \
 # These are the dependencies
 #---------------------------
 BBLAYERS =+ " \
-   ${METADIR}/meta-qt5 \
+   ${METADIR}/external/meta-qt5 \
 "
index 7510b45..67c41d2 100644 (file)
@@ -1,7 +1,7 @@
 BBLAYERS =+ " \
-       ${METADIR}/meta-updater \
-       ${METADIR}/meta-updater-qemux86-64 \
-       ${METADIR}/meta-openembedded/meta-filesystems \
-       ${METADIR}/meta-openembedded/meta-python \
+       ${METADIR}/external/meta-updater \
+       ${METADIR}/external/meta-updater-qemux86-64 \
+       ${METADIR}/external/meta-openembedded/meta-filesystems \
+       ${METADIR}/external/meta-openembedded/meta-python \
        "
 
index fe60a26..857d9f1 100644 (file)
@@ -1 +1 @@
-BBLAYERS =+ "${METADIR}/meta-altera"
+BBLAYERS =+ "${METADIR}/bsp/meta-altera"
index 62d0207..4a3cae0 100644 (file)
@@ -1,2 +1,2 @@
-BBLAYERS =+ "${METADIR}/meta-qcom"
-BBMASK .= "|meta-qcom/openembedded-layer/recipes-navigation/gpsd"
+BBLAYERS =+ "${METADIR}/bsp/meta-qcom"
+BBMASK .= "|bsp/meta-qcom/openembedded-layer/recipes-navigation/gpsd"
index b58989c..7b0db44 100644 (file)
@@ -1,3 +1,3 @@
 BBLAYERS =+ "\
-  ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \
+  ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \
   "
index ad672c9..5f410f0 100644 (file)
@@ -1,4 +1,4 @@
 BBLAYERS =+ "\
-  ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \
+  ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \
   ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \
   "
index 8c02e8f..e3954fe 100644 (file)
@@ -1,2 +1,2 @@
 # Use meta-synopsys layer for ARC HSDK board
-BBLAYERS =+ "${METADIR}/meta-synopsys"
+BBLAYERS =+ "${METADIR}/bsp/meta-synopsys"
index 7790065..edcb6a3 100644 (file)
@@ -1,5 +1,5 @@
 # This must be parsed after qt5, etc. layers so that they are correctly
 # recognized by meta-freescale/dynamic-layers
 BBLAYERS =+ "\
-  ${METADIR}/meta-freescale \
+  ${METADIR}/bsp/meta-freescale \
   "
index ad672c9..5f410f0 100644 (file)
@@ -1,4 +1,4 @@
 BBLAYERS =+ "\
-  ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \
+  ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \
   ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \
   "
index ad672c9..5f410f0 100644 (file)
@@ -1,4 +1,4 @@
 BBLAYERS =+ "\
-  ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \
+  ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \
   ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \
   "
index 1250b35..2e677dd 100644 (file)
@@ -1 +1 @@
-BBLAYERS =+ "${METADIR}/meta-raspberrypi"
+BBLAYERS =+ "${METADIR}/bsp/meta-raspberrypi"