SPEC-3751: workaround absence of ext4.xz images 62/25862/1
authorCorentin LABBE <clabbe@baylibre.com>
Tue, 5 Jan 2021 09:30:08 +0000 (09:30 +0000)
committerCorentin LABBE <clabbe@baylibre.com>
Tue, 5 Jan 2021 09:37:58 +0000 (09:37 +0000)
Current h3ulcb/rpi4 builds produces nbdroot images in ext4 and not ext4.xz format.
This patch adds a workaround which compress thoses images.

Change-Id: I979d37be6067e57477a1062ab416229db85209c7
Bug-AGL: SPEC-3751
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
jjb/common/include-agl-run-test-rsync-changeid.sh
jjb/common/include-agl-run-test-rsync-release.sh

index 41fe2b4..2568992 100644 (file)
@@ -37,6 +37,18 @@ do
                cp -avL tmp/deploy/images/${TARGETMACHINE}/build-info ${DEST}/
        fi
 
+       # detect BUG SPEC-3751
+       F_NBDROOT="tmp/deploy/images/${TARGETMACHINE}/$DEVICE_NBDROOT"
+       if [ ! -e "$F_NBDROOT" ];then
+               NOXZ=$(echo "$F_NBDROOT" | sed 's,.xz$,,')
+               if [ ! -e "$NOXZ" ];then
+                       echo "ERROR: cannot recovery from SPEC-3751, $NOXZ does not exists"
+               else
+                       echo "DEBUG: xz $NOXZ to $F_NBDROOT"
+                       xz --threads=0 --stdout "$NOXZ" > "$F_NBDROOT"
+               fi
+       fi
+
        # copy files to $DEST (only if variable is non-empty)
        for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
                FILE=$(eval echo \$${i})
index 7be8bfa..dfdffe7 100644 (file)
@@ -29,6 +29,19 @@ for board in $(ls $BOARDOUT)
 do
        # copy files to $DEST
        . $BOARDOUT/$board/info
+
+       # detect BUG SPEC-3751
+       F_NBDROOT="tmp/deploy/images/${TARGETMACHINE}/$DEVICE_NBDROOT"
+       if [ ! -e "$F_NBDROOT" ];then
+               NOXZ=$(echo "$F_NBDROOT" | sed 's,.xz$,,')
+               if [ ! -e "$NOXZ" ];then
+                       echo "ERROR: cannot recovery from SPEC-3751, $NOXZ does not exists"
+               else
+                       echo "DEBUG: xz $NOXZ to $F_NBDROOT"
+                       xz --threads=0 --stdout "$NOXZ" > "$F_NBDROOT"
+               fi
+       fi
+
        echo "INFO: copy artifact for $x_releng_device/$x_lava_device"
        for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
                eval cp -avL tmp/deploy/images/${TARGETMACHINE}/$(echo "$"${i}) ${DEST}/