aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2016-03-22 19:39:32 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2016-03-22 19:39:36 +0530
commita3e886e55c23179361f5c65d9fd2c39ab5f1cfb4 (patch)
tree182de5aba0c3cbfcfa1ec364e692ee0675faa449
parent1f9d5fd385e9f3ba5d86dc3657a28fe5ae993ec9 (diff)
downloadlinaro-android-build-tools-a3e886e55c23179361f5c65d9fd2c39ab5f1cfb4.tar.gz
build-android: Improve the way to find kernel source repository
The previous implementation failed to work whenever we build kernel from AOSP source location where "remote=" tag is the default one which will be "..". It is better to go to the kernel source location and check which the remote is. Change-Id: I21a6efe291984dce0ab608975e516ca58c7eaf69 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--build-scripts/build-android8
1 files changed, 4 insertions, 4 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android
index fc28276..d259438 100644
--- a/build-scripts/build-android
+++ b/build-scripts/build-android
@@ -243,10 +243,10 @@ if [ -n "${target_kernel_src}" ]; then
kernel_proj_str=`grep "path=\"${target_kernel_src}\"" out/pinned-manifest.xml`
kernel_rev=`echo ${kernel_proj_str} | grep -o "revision[^ ]*" | cut -d"\"" -f2`
kernel_branch=`echo ${kernel_proj_str} | grep -o "upstream[^ ]*" | cut -d"\"" -f2`
- kernel_remote=`echo ${kernel_proj_str} | grep -o "remote[^ ]*" | cut -d"\"" -f2`
- kernel_repo_path=`echo ${kernel_proj_str} | grep -o "name[^ ]*" | cut -d"\"" -f2`
- kernel_remote_str=`grep "remote .* name=\"${kernel_remote}\"" out/pinned-manifest.xml`
- kernel_repo=`echo ${kernel_remote_str} | grep -o "fetch[^ ]*" | cut -d"\"" -f2`${kernel_repo_path}".git"
+ kernel_repo_path=`echo ${kernel_proj_str} | grep -o "path[^ ]*" | cut -d"\"" -f2`
+ cd $kernel_repo_path
+ kernel_repo=`git remote -v | grep "fetch" | cut -f2 | cut -d " " -f1`
+ cd -
fi
android_ver=`grep "ro\.build\.version\.release" out/target/product/${TARGET_OUT_DIR}/system/build.prop|cut -d"=" -f2`
toolchain=`echo ${ANDROID_TOOLCHAIN}|awk -F'/' '{print $(NF-1)}'`