aboutsummaryrefslogtreecommitdiff
path: root/build-scripts/build-android
diff options
context:
space:
mode:
Diffstat (limited to 'build-scripts/build-android')
-rw-r--r--build-scripts/build-android21
1 files changed, 16 insertions, 5 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android
index 5b3a4b0..935beeb 100644
--- a/build-scripts/build-android
+++ b/build-scripts/build-android
@@ -25,8 +25,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
@@ -61,6 +64,12 @@ else
repo-sync-from-mirror "${1}"
fi
+ if [ -n "$PATCHSETS" ]; then
+ git clone git://android.git.linaro.org/android-patchsets.git
+ for i in $PATCHSETS; do
+ sh ./android-patchsets/$i
+ done
+ fi
if [ -n "$POST_CHECKOUT_HOOK" ]; then
# if echo "$POST_CHECKOUT_HOOK" | grep -F / >/dev/null; then
# echo "Invalid POST_CHECKOUT_HOOK: $POST_CHECKOUT_HOOK"
@@ -73,6 +82,8 @@ else
. build/envsetup.sh
trap infrastructure_error ERR
+ [ -n "$LUNCH" ] && lunch "$LUNCH"
+
# We evaluate the configuration again because envsetup.sh might well
# have stomped on some of the values in it.
@@ -121,7 +132,7 @@ else
cp $toolchain_filename fingerprints/
fi
- if test -z "$TARGET_ARCH_VARIANT"; then
+ if test -z "$TARGET_ARCH_VARIANT" -a -z "$LUNCH"; then
TARGET_ARCH_VARIANT=armv7-a-neon
fi
if test -z "$WITH_HOST_DALVIK"; then
@@ -151,7 +162,7 @@ else
trap - ERR
export TIMEFORMAT="TIME: Compilation: %lR"
- time $MAKE $MAKE_OPTS -j$MAKE_JOBS $MAKE_TARGETS $SHOWCOMMANDS WITH_HOST_DALVIK="$WITH_HOST_DALVIK"
+ time $MAKE $MAKE_OPTS -j$MAKE_JOBS $MAKE_TARGETS $SHOWCOMMANDS WITH_HOST_DALVIK="$WITH_HOST_DALVIK" USE_CLANG_PLATFORM_BUILD="$USE_CLANG_PLATFORM_BUILD"
unset TIMEFORMAT
trap infrastructure_error ERR
@@ -189,7 +200,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