@@ -15,6 +15,7 @@ TARGET=$2
EXTENSION=$3
DTB=$4
REF=$5
+USE_SWU=$6
BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET
if [ "${EXTENSION}" != "none" ]; then
@@ -33,7 +34,17 @@ if [ -f "${BASE_PATH}.wic" ]; then
xz -9 -k -T0 "${BASE_PATH}.wic"
echo "Uploading artifacts..."
- aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
+ # Condition check to avoid deploying v2 security image and prefer only it's .swu artifact
+ if [ "$USE_SWU" = "enable" ]; then
+ aws s3 cp --no-progress --acl public-read "${BASE_PATH}.swu" "${S3_TARGET}"
+ else
+ # Move the first wic.xz file to aws s3 bucket to avoid error while compressing v2 image
+ aws s3 mv --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
+ fi
+
+ if [ -f "build/tmp/deploy/images/$TARGET/firmware.bin" ]; then
+ aws s3 cp --no-progress --acl public-read "build/tmp/deploy/images/$TARGET/firmware.bin" "${S3_TARGET}"
+ fi
else
if [ -f "${BASE_PATH}.tar.gz" ]; then
echo "Uploading artifacts..."