From 2b8baaef2a663d6abf2f88d555e1debb6fa67daa Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Mon, 4 Jul 2022 14:23:50 +0000 Subject: [PATCH 1/3] include flash script inside backup img --- src/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/build.sh b/src/build.sh index 18f5de5..7e36fdc 100755 --- a/src/build.sh +++ b/src/build.sh @@ -278,6 +278,12 @@ 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 + echo "backing up flash tools" + git clone https://gitlab.e.foundation/teamb58/fp3-installation-tool flash-tools + cd flash-tools + zip -r "$ZIP_DIR/$zipsubdir/IMG-$build" bin* + zip "$ZIP_DIR/$zipsubdir/IMG-$build" flash_${DEVICE}_factory.sh + cd .. if [ "$BUILD_SUPER_IMAGE" = true ]; then 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 -- GitLab From 3d0d9fee146f4663dfbe782675776bdbf0754b70 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Thu, 7 Jul 2022 13:05:13 +0000 Subject: [PATCH 2/3] update flash tools url --- src/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build.sh b/src/build.sh index 7e36fdc..9d8abe7 100755 --- a/src/build.sh +++ b/src/build.sh @@ -279,8 +279,8 @@ 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 echo "backing up flash tools" - git clone https://gitlab.e.foundation/teamb58/fp3-installation-tool flash-tools - cd flash-tools + git clone https://gitlab.e.foundation/e/os/flash_tools + cd flash_tools zip -r "$ZIP_DIR/$zipsubdir/IMG-$build" bin* zip "$ZIP_DIR/$zipsubdir/IMG-$build" flash_${DEVICE}_factory.sh cd .. -- GitLab From c1d8dfd7af6b1066eb6ef22a76e6ae7f6505f880 Mon Sep 17 00:00:00 2001 From: Bharath Date: Mon, 18 Jul 2022 11:23:32 +0530 Subject: [PATCH 3/3] Guard the process with a flag The flash package shall be included only when 'BUILD_FLASH_PACKAGE' is set to true. --- src/build.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/build.sh b/src/build.sh index 9d8abe7..f6e3cd7 100755 --- a/src/build.sh +++ b/src/build.sh @@ -278,12 +278,14 @@ 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 - echo "backing up flash tools" - git clone https://gitlab.e.foundation/e/os/flash_tools - cd flash_tools - zip -r "$ZIP_DIR/$zipsubdir/IMG-$build" bin* - zip "$ZIP_DIR/$zipsubdir/IMG-$build" flash_${DEVICE}_factory.sh - cd .. + if [ "$BUILD_FLASH_PACKAGE" = true ]; then + echo "backing up flash tools" + git clone https://gitlab.e.foundation/e/os/flash_tools + cd flash_tools + zip -r "$ZIP_DIR/$zipsubdir/IMG-$build" bin* + zip "$ZIP_DIR/$zipsubdir/IMG-$build" flash_${DEVICE}_factory.sh + cd .. + fi if [ "$BUILD_SUPER_IMAGE" = true ]; then 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 -- GitLab