SPEC-3414: fill empty variables 78/26178/1
authorCorentin LABBE <clabbe@baylibre.com>
Mon, 15 Mar 2021 12:38:05 +0000 (12:38 +0000)
committerCorentin LABBE <clabbe@baylibre.com>
Mon, 15 Mar 2021 12:39:34 +0000 (12:39 +0000)
Some variables are empty:
- TARGETARCH exists only on ci-apps, so fill it according to MACHINE
- source build-info for the remaining ones

Change-Id: I8e9ca0660475bf187616186c28eff08fc134743a
Bug-AGL: SPEC-3414:
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
jjb/common/include-agl-kci-publish-build-meta.sh

index c2c1a5c..edf9155 100644 (file)
@@ -5,6 +5,13 @@ echo "#########################################"
 echo "\n\n\n"
 
 kci-publish() {
+       if [ -e tmp/deploy/images/${TARGETMACHINE}/build-info ] ; then
+               echo "DEBUG: load build-info"
+               # we need some variable from here
+               source tmp/deploy/images/${TARGETMACHINE}/build-info
+       fi
+       echo "DEBUG: GERRIT_PROJECT $GERRIT_PROJECT"
+
        # check GERRIT_PROJECT to find if we build an app or not
        if echo $GERRIT_PROJECT |grep -q apps ;then
                # for app
@@ -14,6 +21,29 @@ kci-publish() {
                BUILD_VERSION="AGL-gerrit-$RELEASE_BRANCH-$RELEASE_VERSION"
        fi
 
+       # TARGETARCH exists only in ci-apps
+       case $TARGETMACHINE in
+       qemuarm64)
+               TARGETARCH="arm64"
+       ;;
+       qemuarm)
+               TARGETARCH="arm"
+       ;;
+       qemux86_64)
+               TARGETARCH="x86_64"
+       ;;
+       raspberrypi4)
+               TARGETARCH="arm64"
+       ;;
+       h3ulcb-nogfx)
+               TARGETARCH="arm64"
+       ;;
+       *)
+               echo "ERROR: unknow machine $TARGETMACHINE"
+               return 0
+       ;;
+       esac
+
        echo "DEBUG: generate bmeta for kernelCI"
        echo "DEBUG: machine ${TARGETMACHINE}"
        echo "DEBUG: build_version $BUILD_VERSION"