aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2017-06-19 22:06:30 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2017-06-19 22:06:30 +0800
commit0ff4d0d7159700c1bcf72e5d658a84b349367460 (patch)
tree15f3d32b4808dbfe594c304e63dcd6896292c67e
parentdfd1c4a778ada6875c5f057e5b3a1d004cacf011 (diff)
downloadlinaro-android-build-tools-0ff4d0d7159700c1bcf72e5d658a84b349367460.tar.gz
build-android: use system.img if system.tar.bz2 not exist
since we will not support the tarball deployment method from android O preview version, so change here to use system.img and userdata.img if system.tar.bz2 and userdata.tar.bz2 not exist. This will make it still work for old builds till Nougat Change-Id: I2aa57229521cc97c00ccc7b9a4c5373677a81ef0 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--build-scripts/build-android13
1 files changed, 11 insertions, 2 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android
index 2a0b0b1..7986d09 100644
--- a/build-scripts/build-android
+++ b/build-scripts/build-android
@@ -251,13 +251,22 @@ else
fi
+lamc_system="--systemimage $PWD/out/target/product/$TARGET_OUT_DIR/system.img"
+if [ -f " $PWD/out/target/product/$TARGET_OUT_DIR/system.tar.bz2" ]; then
+ lamc_system="--system $PWD/out/target/product/$TARGET_OUT_DIR/system.tar.bz2"
+fi
+lamc_userdata="--userdataimage $PWD/out/target/product/$TARGET_OUT_DIR/userdata.img"
+if [ -f " $PWD/out/target/product/$TARGET_OUT_DIR/system.tar.bz2" ]; then
+ lamc_system="--userdata $PWD/out/target/product/$TARGET_OUT_DIR/userdata.tar.bz2"
+fi
+
# Create filesystem images
if [ -n "$BUILD_FS_IMAGE" ]; then
FS_IMAGE_SIZE=${FS_IMAGE_SIZE-2G}
sudo linaro-android-media-create \
--dev `product2lamc_dev $TARGET_PRODUCT` \
- --system $PWD/out/target/product/$TARGET_OUT_DIR/system.tar.bz2 \
- --userdata $PWD/out/target/product/$TARGET_OUT_DIR/userdata.tar.bz2 \
+ ${lamc_system} \
+ ${lamc_userdata} \
--boot $PWD/out/target/product/$TARGET_OUT_DIR/boot.tar.bz2 \
--image-size "$FS_IMAGE_SIZE" \
--image-file out/target/product/$TARGET_OUT_DIR/$TARGET_PRODUCT.img