Merge "Use prebuilt otatools for mixed build"
This commit is contained in:
@@ -41,7 +41,7 @@ cleanup_and_exit () {
|
||||
|
||||
trap cleanup_and_exit EXIT
|
||||
|
||||
while getopts :v:m:p: opt; do
|
||||
while getopts :v:m:p:t: opt; do
|
||||
case "$opt" in
|
||||
v)
|
||||
readonly VENDOR_VERSION="$OPTARG"
|
||||
@@ -52,6 +52,9 @@ while getopts :v:m:p: opt; do
|
||||
p)
|
||||
readonly OVERRIDE_VBMETA_IMAGE_PATH="$OPTARG"
|
||||
;;
|
||||
t)
|
||||
readonly OTATOOLS_ZIP="$OPTARG"
|
||||
;;
|
||||
\?)
|
||||
exit_badparam "Invalid options: -"$OPTARG""
|
||||
;;
|
||||
@@ -119,6 +122,7 @@ 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
|
||||
readonly SYSTEM_IMAGES_DIR="$SYSTEM_ARTIFACTS_DIR"/IMAGES
|
||||
readonly OTATOOLS_DIR="$TEMP_DIR"/otatools
|
||||
|
||||
readonly SPL_PROPERTY_NAME="ro.build.version.security_patch"
|
||||
readonly SYSTEM_BUILD_PROP="SYSTEM/build.prop"
|
||||
@@ -139,6 +143,15 @@ unzip "$DEVICE_TARGET_FILES_ARCHIVE" \
|
||||
META/vendor_matrix.xml META/vendor_manifest.xml "$SYSTEM_BUILD_PROP" \
|
||||
-d "$DEVICE_ARTIFACTS_DIR"
|
||||
|
||||
if [[ -f "$OTATOOLS_ZIP" ]]; then
|
||||
# Uncompress otatools
|
||||
mkdir -p "$OTATOOLS_DIR"
|
||||
unzip "$OTATOOLS_ZIP" -d "$OTATOOLS_DIR"
|
||||
# Set paths for using prebuilt host binaries.
|
||||
export PATH="$OTATOOLS_DIR"/bin:"$PATH"
|
||||
export LD_LIBRARY_PATH="$OTATOOLS_DIR"/lib64:"$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
###
|
||||
# Check compatibility between the system and device.
|
||||
if [[ -f "$CHECK_TOOL" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user