summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh63
1 files changed, 21 insertions, 42 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 6715419..f8ec4ed 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -88,7 +88,11 @@ function check_product()
CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g')
export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10)
else
- CM_BUILD=
+ if (echo -n $1 | grep -q -e "^replicant_") ; then
+ CM_BUILD=$(echo -n $1 | sed -e 's/^replicant_//g')
+ else
+ CM_BUILD=
+ fi
fi
export CM_BUILD
@@ -166,7 +170,7 @@ function setpaths()
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
- arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
+ arm) export TARGET_TOOLS_PREFIX=toolchain/gcc/arm/arm-linux-androideabi/install/bin/arm-linux-androideabi-
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
@@ -189,19 +193,17 @@ function setpaths()
unset ANDROID_KERNEL_TOOLCHAIN_PATH
case $ARCH in
arm)
- # Legacy toolchain configuration used for ARM kernel compilation
- toolchaindir=arm/arm-eabi-$targetlegacygccversion/bin
- if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
- export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
- ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
- fi
+ # use the toolchain that comes with the Linux Distribution
+ export ARM_EABI_TOOLCHAIN="arm-none-eabi-"
+ ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
+
;;
*)
# No need to set ARM_EABI_TOOLCHAIN for other ARCHs
;;
esac
- export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools:$T/external/selinux/prebuilts/bin
+ export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools
export ANDROID_BUILD_PATHS=$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_TOOLCHAIN:$ANDROID_TOOLCHAIN_2ND_ARCH:$ANDROID_KERNEL_TOOLCHAIN_PATH$ANDROID_DEV_SCRIPTS:
# If prebuilts/android-emulator/<system>/ exists, prepend it to our PATH
@@ -552,7 +554,7 @@ function breakfast()
CM_DEVICES_ONLY="true"
unset LUNCH_MENU_CHOICES
add_lunch_combo full-eng
- for f in `/bin/ls vendor/cm/vendorsetup.sh 2> /dev/null`
+ for f in `/bin/ls vendor/replicant/vendorsetup.sh 2> /dev/null`
do
echo "including $f"
. $f
@@ -622,17 +624,6 @@ function lunch()
check_product $product
if [ $? -ne 0 ]
then
- # if we can't find a product, try to grab it off the CM github
- T=$(gettop)
- pushd $T > /dev/null
- build/tools/roomservice.py $product
- popd > /dev/null
- check_product $product
- else
- build/tools/roomservice.py $product true
- fi
- if [ $? -ne 0 ]
- then
echo
echo "** Don't have a product spec for: '$product'"
echo "** Do you have the right repo manifest?"
@@ -2397,26 +2388,14 @@ function set_java_home() {
fi
if [ ! "$JAVA_HOME" ]; then
- if [ ! "$EXPERIMENTAL_USE_JAVA8" ]; then
- case `uname -s` in
- Darwin)
- export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
- ;;
- *)
- export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
- ;;
- esac
- fi
- if [ ! "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ]; then
- case `uname -s` in
- Darwin)
- export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
- ;;
- *)
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- ;;
- esac
- fi
+ case `uname -s` in
+ Darwin)
+ export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
+ ;;
+ *)
+ export JAVA_HOME=$(dirname $(dirname $(dirname $(readlink -f $(which java)))))
+ ;;
+ esac
# Keep track of the fact that we set JAVA_HOME ourselves, so that
# we can change it on the next envsetup.sh, if required.
@@ -2516,7 +2495,7 @@ unset f
# Add completions
check_bash_version && {
- dirs="sdk/bash_completion vendor/cm/bash_completion"
+ dirs="sdk/bash_completion vendor/replicant/bash_completion"
for dir in $dirs; do
if [ -d ${dir} ]; then
for f in `/bin/ls ${dir}/[a-z]*.bash 2> /dev/null`; do