summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-06-05 16:06:59 +0200
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-06-10 21:21:05 +0200
commitd04f0793f5e06e23268a6025632bfd7abd113fb5 (patch)
tree0271634336d34195475d326451bd3e0db2201533 /scripts
parenta039cce0977ca33e4532de87fd4a1867cc7b21a7 (diff)
Changes to support the repo clone rework
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/.aglsetup_genconfig.bash22
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/.aglsetup_genconfig.bash b/scripts/.aglsetup_genconfig.bash
index e95605a65..c4dde423d 100755
--- a/scripts/.aglsetup_genconfig.bash
+++ b/scripts/.aglsetup_genconfig.bash
@@ -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