Fix build.sh for toolchain.
Change-Id: I38b7201e4317c930b797c1c2710cda86d223d61d
diff --git a/build.sh b/build.sh
index 4943e94..3c6b547 100755
--- a/build.sh
+++ b/build.sh
@@ -5,6 +5,11 @@
exit 1
fi
+if [ ! -d ~/openwrt_toolchains ];then
+ echo "Start download toolchains."
+ git clone "ssh://b.liu@192.168.1.198:29418/mbtk_toolchains_for_asr_linux" ~/openwrt_toolchains && scp -p -P 29418 b.liu@192.168.1.198:hooks/commit-msg ~/openwrt_toolchains/.git/hooks/
+fi
+
# static / shared
export BUILD_LIB_TYPE=shared
diff --git a/mbtk/Make.defines b/mbtk/Make.defines
index 5389eb5..0a814d7 100755
--- a/mbtk/Make.defines
+++ b/mbtk/Make.defines
@@ -7,8 +7,10 @@
ROOT = $(BUILD_ROOT)/..
OUT_DIR = $(ROOT)/out
LOCAL_PATH=.
+HOME_DIR := $(shell echo ~)
-BUILD_TOOLCHAIN_DIR = $(ROOT)/toolchain/gcc-$(BUILD_GCC_VERSION)-$(BUILD_STD_LIBC)
+#BUILD_TOOLCHAIN_DIR = $(ROOT)/toolchain/gcc-$(BUILD_GCC_VERSION)-$(BUILD_STD_LIBC)
+BUILD_TOOLCHAIN_DIR = $(HOME_DIR)/openwrt_toolchains/gcc-$(BUILD_GCC_VERSION)-$(BUILD_STD_LIBC)
ifeq ($(BUILD_STD_LIBC), glibc)
CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-gcc