From 8fd75b12fe5bcc499e7c1a6bc4aec68c8f01c6ab Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 27 Jul 2022 16:02:46 +0000 Subject: [PATCH 1/2] add env variable BUILD_FLASH_PACKAGE --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index d48350c..f0b19a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -112,6 +112,9 @@ ENV BACKUP_EMULATOR false # Use lunch command (by default, it's brunch) ENV USE_LUNCH false +# Include flash binaries and script to the resulting img zip +ENV BUILD_FLASH_PACKAGE false + # You can optionally specify a USERSCRIPTS_DIR volume containing these scripts: # * begin.sh, run at the very beginning -- GitLab From a554cdfcab65099a0c2749abe8af791f2b62be6c Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 27 Jul 2022 16:04:02 +0000 Subject: [PATCH 2/2] Revert "Revert "Merge branch '189-include-flash-script' into 'master'"" This reverts commit 279836f7fd52e9226556fe19e5323f758010c5cd --- src/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/build.sh b/src/build.sh index 18f5de5..f6e3cd7 100755 --- a/src/build.sh +++ b/src/build.sh @@ -278,6 +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 + 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