aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-08 02:10:38 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-08 02:10:38 +0000
commit1f17333926c1aac37bb41339654e1fc292fbea5e (patch)
tree92d30537c8f4f3928b4c19f179adca7f7277f09f
parent6c6aa20f56c1fbeb6fc3272139992a1f76d92999 (diff)
parent38fb1fb976de3e57df5741fc98b92eb9eab07d3a (diff)
downloadtreble-1f17333926c1aac37bb41339654e1fc292fbea5e.tar.gz
Snap for 8157174 from 38fb1fb976de3e57df5741fc98b92eb9eab07d3a to tm-d1-release
Change-Id: I3313f61efac7c4f773f888b92114b935f0dae6f1
-rwxr-xr-xvf/merge.sh12
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