diff options
author | Iavor-Valentin Iftime <valiiftime@google.com> | 2022-02-07 22:02:47 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-02-07 22:02:47 +0000 |
commit | a345ee2d4f53185ac9fdfc1e9694eed77f3ff5eb (patch) | |
tree | 92d30537c8f4f3928b4c19f179adca7f7277f09f | |
parent | d3c0b00d77c40efb8d1d81e0a83e37be7719c385 (diff) | |
parent | 66e1a0d784076c7af3d29a84f6cd14a2ef3cdbd8 (diff) | |
download | treble-a345ee2d4f53185ac9fdfc1e9694eed77f3ff5eb.tar.gz |
Add argument for skipping radio.img am: 57efc1cdc6 am: 66e1a0d784
Original change: https://android-review.googlesource.com/c/platform/tools/treble/+/1975366
Change-Id: Ie3bedc849dc890cf20358f1ea1572be6eca8b2ec
-rwxr-xr-x | vf/merge.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vf/merge.sh b/vf/merge.sh index 20ceb6b..372bb0e 100755 --- a/vf/merge.sh +++ b/vf/merge.sh @@ -5,7 +5,7 @@ set -e -while getopts ":t:d:v:b:m:" option ; do +while getopts ":t:d:v:b:m:r:" option ; do case "${option}" in t) TARGET=${OPTARG} ;; d) DIST_DIR=${OPTARG} ;; @@ -13,6 +13,7 @@ while getopts ":t:d:v:b:m:" option ; do b) BUILD_ID=${OPTARG} ;; # TODO(b/170638547) Remove the need for merge configs. m) MERGE_CONFIG_DIR=${OPTARG} ;; + r) HAS_RADIO_IMG=${OPTARG} ;; *) echo "Unexpected argument: -${OPTARG}" >&2 ;; esac done @@ -37,6 +38,9 @@ if [[ -z "${MERGE_CONFIG_DIR}" ]]; then echo "error: -m merge config dir argument not set" exit 1 fi +if [[ -z "${HAS_RADIO_IMG}" ]]; then + HAS_RADIO_IMG="true" +fi # Move the system-only build artifacts to a separate folder # so that the flashing tools use the merged files instead. @@ -61,7 +65,11 @@ out/host/linux-x86/bin/merge_target_files \ # Copy bootloader.img, radio.img, and android-info.txt, needed for flashing. cp ${VENDOR_DIR}/bootloader.img ${DIST_DIR}/bootloader.img -cp ${VENDOR_DIR}/radio.img ${DIST_DIR}/radio.img +# Copy radio.img unless arg is "false" (eg. Android TV targets) +if [[ $HAS_RADIO_IMG = "true" ]]; then + cp ${VENDOR_DIR}/radio.img ${DIST_DIR}/radio.img +fi + unzip -j -d ${DIST_DIR} \ ${VENDOR_DIR}/*-target_files-*.zip \ OTA/android-info.txt |