diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2014-09-22 23:44:01 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2014-09-23 00:14:39 +0800 |
commit | 3c5dcb8d135d6e58fcbd006701d6ab1746ca6757 (patch) | |
tree | 32121bff3e05ff5fd072d2a9042707b760f67515 | |
parent | 3f81ae36ffa47614f888d4244b7046813758ee99 (diff) |
build-android: some changes on TARGET_OUT_DIR
1. make it possible to use value of TARGET_OUT_DIR set on android-build
if we set the TARGET_OUT_DIR variant value via the settings from android-build,
then use that set value. Since the value of PRODUCT_OUT is defined by TARGET_DEVICE,
and the value of TARGET_DEVICE is defined by PRODUCT_DEVICE.
and some of PRODUCT_DEVICEs are defined with the generic_ prefix.
like for aosp_arm64 product, the PRODUCT_DEVICE is generic_arm64.
it's not right to just remove string before _ in this case.
2. specified TARGET_OUT_DIR explicitly when caculate the md5sum of .img, .tar.bz2 files
since when build the 64bit version with AOSP master, there are other directories
(like external/ frameworks/ system/) are generated under out/target/product/,
so if we use command like "cd out/target/product/*/", there will be errors.
Change-Id: Ia4cbfc1807491fe4e1e798d6c8e1fadb55ea39eb
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | build-scripts/build-android | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android index fc5aad2..0f5b991 100644 --- a/build-scripts/build-android +++ b/build-scripts/build-android @@ -24,8 +24,11 @@ source "${BUILD_SCRIPT_ROOT}"/helpers trap infrastructure_error ERR -# Set TARGET_OUT_DIR since few TARGET_PRODUCT include "full_" keyword as well -export TARGET_OUT_DIR=`echo $TARGET_PRODUCT | sed 's/_/\n/;s/.*\n//'` +if [ -z "${TARGET_OUT_DIR}" ]; then + # only set TARGET_OUT_DIR when it is not set + # Set TARGET_OUT_DIR since few TARGET_PRODUCT include "full_" keyword as well + export TARGET_OUT_DIR=`echo $TARGET_PRODUCT | sed 's/_/\n/;s/.*\n//'` +fi if [ -n "$BUILD_COPYCAT" ]; then @@ -188,7 +191,7 @@ elif [ -f "out/target/product/$TARGET_OUT_DIR/obj/kernel/.config" ]; then cp "out/target/product/$TARGET_OUT_DIR/obj/kernel/.config" out/kernel_config fi # Create md5sums file for platform artifacts -(cd out/target/product/*/; md5sum *.tar.bz2 *.img >MD5SUMS) || true +(cd out/target/product/${TARGET_OUT_DIR}/; md5sum *.tar.bz2 *.img >MD5SUMS) || true (cd out/; ${BUILD_SCRIPT_ROOT}/create-user-build-script) if [ -f out/kernel_config ]; then |