summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-05-25 23:08:08 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-05-25 23:08:08 +0000
commit845efcc7c4315b2763edd0b63c0fc0a1f25baf78 (patch)
treea5940ef8dba391fc91ed23a5e4a3711ea24f8b39
parentfcce0e7eefbe90186581ede79b69bfbd1fdef105 (diff)
parentd82dc77cdab044d20049be4679afb4b586219905 (diff)
downloadandroid_development-845efcc7c4315b2763edd0b63c0fc0a1f25baf78.tar.gz
android_development-845efcc7c4315b2763edd0b63c0fc0a1f25baf78.tar.bz2
android_development-845efcc7c4315b2763edd0b63c0fc0a1f25baf78.zip
Snap for 5606001 from d82dc77cdab044d20049be4679afb4b586219905 to qt-qpr1-release
Change-Id: I552b7c084855ffe611e7ee1a220e31d297b561ff
-rwxr-xr-xvndk/tools/build_mixed20
1 files changed, 18 insertions, 2 deletions
diff --git a/vndk/tools/build_mixed b/vndk/tools/build_mixed
index 09d929271..f2fdafdee 100755
--- a/vndk/tools/build_mixed
+++ b/vndk/tools/build_mixed
@@ -4,9 +4,10 @@ usage () {
echo
echo "Usage: $0 [-v <vendor_version>] [-m <modify_system_image_path>]"
echo " [-t <prebuilt_otatools_path>] [-p <override_vbmeta_image_path>]"
+ echo " [-b <override_boot_image_path>]"
echo " [-s] system_build_dir device_build_dir out_dir [check_tool]"
echo
- echo "Options -v, -m, -t, -p, -s must precede positional arguments."
+ echo "Options -v, -m, -t, -p, -b, -s must precede positional arguments."
echo
echo "vendor_version is the version of the vendor image when Keymaster v3"
echo " related modifications to the system image is necessary. Optional."
@@ -17,6 +18,8 @@ usage () {
echo " required host binaries to modify system image. Optional."
echo "override_vbmeta_image_path is the path to a vbmeta.img to use"
echo " to override the existing vbmeta.img of device. Optional."
+ echo "override_boot_image_path is the path to a boot imgage to use to"
+ echo " override the existing boot.img of device. Optional."
echo "-s is used to fetch and flash both product.img and system.img from"
echo " the system_build_dir for devices with a product partition."
echo " product.img will be removed if system_build_dir does not have"
@@ -50,7 +53,7 @@ cleanup_and_exit () {
trap cleanup_and_exit EXIT
-while getopts :v:m:p:t:s opt; do
+while getopts :v:m:p:b:t:s opt; do
case "$opt" in
v)
readonly VENDOR_VERSION="$OPTARG"
@@ -61,6 +64,9 @@ while getopts :v:m:p:t:s opt; do
p)
readonly OVERRIDE_VBMETA_IMAGE_PATH="$OPTARG"
;;
+ b)
+ readonly OVERRIDE_BOOT_IMAGE_PATH="$OPTARG"
+ ;;
t)
readonly OTATOOLS_ZIP="$OPTARG"
;;
@@ -115,6 +121,10 @@ if [[ ! -z "${OVERRIDE_VBMETA_IMAGE_PATH+x}" && ! -f "$OVERRIDE_VBMETA_IMAGE_PAT
exit_badparam "Specified vbmeta.img not found: "$OVERRIDE_VBMETA_IMAGE_PATH""
fi
+if [[ ! -z "${OVERRIDE_BOOT_IMAGE_PATH+x}" && ! -f "$OVERRIDE_BOOT_IMAGE_PATH" ]]; then
+ exit_badparam "Specified boot image not found: "$OVERRIDE_BOOT_IMAGE_PATH""
+fi
+
readonly DEVICE_ARTIFACTS_DIR="$TEMP_DIR"/device_archive_artifacts
readonly DEVICE_IMAGES_DIR="$DEVICE_ARTIFACTS_DIR"/IMAGES
readonly SYSTEM_ARTIFACTS_DIR="$TEMP_DIR"/system_artifacts
@@ -219,6 +229,12 @@ if [[ -f "$DEVICE_IMAGES_DIR"/vbmeta.img ]]; then
cp "$VBMETA_IMAGE_PATH" "$DEVICE_IMAGES_DIR"/
fi
+# Override boot.img with the provided boot image file since fastboot update cmd
+# will try to flash boot.img in the archive.
+if [[ ! -z "${OVERRIDE_BOOT_IMAGE_PATH+x}" && -f "$DEVICE_IMAGES_DIR"/boot.img ]]; then
+ cp "$OVERRIDE_BOOT_IMAGE_PATH" "$DEVICE_IMAGES_DIR"/boot.img
+fi
+
###
# Create the Mixed Build archive.
(