From bb15325279cb5124675b6e4c26efe4529b45bc00 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Fri, 27 May 2022 07:42:12 +0200 Subject: [PATCH] build.sh: package up required files for spflashtool when present * `*_scatter.txt` and `*.bin` are required to flash via spft * include them into them into `IMG-*.zip` if present Change-Id: Iab7de0842210cdb8d9d1c735f5493ce250da3762 --- src/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build.sh b/src/build.sh index 4c11343..5ca8e8e 100755 --- a/src/build.sh +++ b/src/build.sh @@ -275,13 +275,13 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then SKIP_DYNAMIC_IMAGES="odm.img product.img system.img system_ext.img vendor.img" if [ "$BACKUP_IMG" = true ]; then if [ "$BUILD_SUPER_IMAGE" = true ]; then - find . -maxdepth 1 -name '*.img' -type f $(printf "! -name %s " $(echo "$SKIP_DYNAMIC_IMAGES")) -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; + find . -maxdepth 1 -name '*.img' -o -name '*_scatter.txt' -o -name '*.bin' -type f $(printf "! -name %s " $(echo "$SKIP_DYNAMIC_IMAGES")) -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; elif [ "$SPARSE_PREBUILT_VENDOR_IMAGE" = true ]; then echo "Sparsing prebuilt vendor image" img2simg vendor.img vendor-sparsed.img || return 1 - find . -maxdepth 1 -name '*.img' -type f ! -name vendor.img -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; + find . -maxdepth 1 -name '*.img' -o -name '*_scatter.txt' -o -name '*.bin' -type f ! -name vendor.img -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; else - find . -maxdepth 1 -name '*.img' -type f -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; + find . -maxdepth 1 -name '*.img' -o -name '*_scatter.txt' -o -name '*.bin' -type f -exec zip "$ZIP_DIR/$zipsubdir/IMG-$build" {} \; fi cd "$ZIP_DIR/$zipsubdir" || return 1 sha256sum "IMG-$build" > "IMG-$build.sha256sum" -- GitLab