Change toolchain to glibc.

Change-Id: I5cda420d4a6ddf79a454a3e03aae96452974e11e
diff --git a/build.sh b/build.sh
index 6d8acaa..462fdb7 100755
--- a/build.sh
+++ b/build.sh
@@ -8,7 +8,7 @@
 DECONFIG_FILE=
 
 # glibc / musl
-GLIBC_NAME=musl
+GLIBC_NAME=glibc
 ASR_PROJECT_NAME=
 ASR_PROJECT_PATCH=
 
diff --git a/build_version b/build_version
index 3f4e93a..5e77bc8 100755
--- a/build_version
+++ b/build_version
@@ -1,4 +1,4 @@
 PROJECT=T108-2
 PARTITION=ab
-SEC_SUPPORT=Y
+SEC_SUPPORT=N
 DEV_INFO_RESET=Y
diff --git a/config/defconfig_asr1806p301 b/config/defconfig_asr1806p301
index 6f92a92..acfe4ae 100755
--- a/config/defconfig_asr1806p301
+++ b/config/defconfig_asr1806p301
@@ -430,9 +430,8 @@
 # Stripping options
 #
 # CONFIG_NO_STRIP is not set
-# CONFIG_USE_STRIP is not set
-CONFIG_USE_SSTRIP=y
-CONFIG_SSTRIP_DISCARD_TRAILING_ZEROES=y
+CONFIG_USE_STRIP=y
+CONFIG_STRIP_ARGS="--strip-all"
 # CONFIG_STRIP_KERNEL_EXPORTS is not set
 # CONFIG_USE_MKLIBS is not set
 CONFIG_USE_UCLIBCXX=y
@@ -517,13 +516,13 @@
 # CONFIG_GCC_DEFAULT_SSP is not set
 # CONFIG_SJLJ_EXCEPTIONS is not set
 # CONFIG_INSTALL_GFORTRAN is not set
+# CONFIG_INSTALL_GCCGO is not set
 
 #
 # C Library
 #
-# CONFIG_LIBC_USE_GLIBC is not set
-CONFIG_LIBC_USE_MUSL=y
-# CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK is not set
+CONFIG_LIBC_USE_GLIBC=y
+# CONFIG_LIBC_USE_MUSL is not set
 
 #
 # Debuggers
@@ -531,14 +530,14 @@
 CONFIG_GDB=y
 # CONFIG_GDB_PYTHON is not set
 # CONFIG_HAS_PREBUILT_LLVM_TOOLCHAIN is not set
-CONFIG_USE_MUSL=y
+CONFIG_USE_GLIBC=y
 CONFIG_SSP_SUPPORT=y
 CONFIG_BINUTILS_VERSION_2_42=y
 CONFIG_BINUTILS_VERSION="2.42"
 CONFIG_GCC_VERSION="13.3.0"
 CONFIG_GCC_USE_DEFAULT_VERSION=y
-CONFIG_LIBC="musl"
-CONFIG_TARGET_SUFFIX="muslgnueabi"
+CONFIG_LIBC="glibc"
+CONFIG_TARGET_SUFFIX="gnueabi"
 # CONFIG_IB is not set
 # CONFIG_SDK is not set
 # CONFIG_MAKE_TOOLCHAIN is not set
@@ -2033,6 +2032,7 @@
 # CONFIG_BUSYBOX_CONFIG_FEATURE_VI_COLON_EXPAND is not set
 CONFIG_BUSYBOX_CONFIG_FEATURE_VI_YANKMARK=y
 CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SEARCH=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH is not set
 CONFIG_BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS=y
 CONFIG_BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD=y
 CONFIG_BUSYBOX_CONFIG_FEATURE_VI_READONLY=y
@@ -2620,13 +2620,18 @@
 CONFIG_PACKAGE_fwtool=y
 CONFIG_PACKAGE_getrandom=y
 CONFIG_PACKAGE_jsonfilter=y
+# CONFIG_PACKAGE_libasan is not set
 CONFIG_PACKAGE_libatomic=y
 CONFIG_PACKAGE_libc=y
 CONFIG_PACKAGE_libgcc=y
 # CONFIG_PACKAGE_libgomp is not set
+# CONFIG_PACKAGE_liblsan is not set
 CONFIG_PACKAGE_libpthread=y
 CONFIG_PACKAGE_librt=y
 CONFIG_PACKAGE_libstdcpp=y
+CONFIG_PACKAGE_libthread-db=y
+# CONFIG_PACKAGE_libtsan is not set
+# CONFIG_PACKAGE_libubsan is not set
 CONFIG_PACKAGE_logd=y
 CONFIG_PACKAGE_mtd=y
 CONFIG_PACKAGE_netifd=y
@@ -5141,6 +5146,7 @@
 #
 CONFIG_OPENSSL_ENGINE=y
 # CONFIG_OPENSSL_ENGINE_BUILTIN is not set
+# CONFIG_OPENSSL_WITH_ASYNC is not set
 # CONFIG_PACKAGE_libopenssl-afalg_sync is not set
 CONFIG_PACKAGE_libopenssl-conf=y
 # CONFIG_PACKAGE_libopenssl-devcrypto is not set
@@ -5606,7 +5612,6 @@
 # CONFIG_PACKAGE_libuci2 is not set
 CONFIG_PACKAGE_libuclient=y
 CONFIG_PACKAGE_libucode=y
-# CONFIG_PACKAGE_libucontext is not set
 CONFIG_PACKAGE_libudebug=y
 CONFIG_PACKAGE_libudev-zero=y
 # CONFIG_PACKAGE_libudns is not set
@@ -6756,6 +6761,7 @@
 # CONFIG_PACKAGE_mac-telnet-server is not set
 # CONFIG_PACKAGE_map is not set
 # CONFIG_PACKAGE_mbusd is not set
+# CONFIG_PACKAGE_mdns-repeater is not set
 # CONFIG_PACKAGE_memcached is not set
 # CONFIG_PACKAGE_mii-tool is not set
 # CONFIG_PACKAGE_mikrotik-btest is not set
@@ -6982,7 +6988,7 @@
 # end of lpa Configuration
 
 # CONFIG_PACKAGE_mbim is not set
-CONFIG_PACKAGE_mbtk-rootfs=y
+# CONFIG_PACKAGE_mbtk-rootfs is not set
 # CONFIG_PACKAGE_mgui is not set
 # CONFIG_PACKAGE_mislic is not set
 
@@ -7483,6 +7489,8 @@
 # CONFIG_PACKAGE_lcdproc-clients is not set
 # CONFIG_PACKAGE_lcdproc-drivers is not set
 # CONFIG_PACKAGE_lcdproc-server is not set
+# CONFIG_PACKAGE_ldconfig is not set
+# CONFIG_PACKAGE_ldd is not set
 # CONFIG_PACKAGE_less is not set
 # CONFIG_PACKAGE_less-wide is not set
 # CONFIG_PACKAGE_libflashrom is not set
diff --git a/mbtk/Make.defines b/mbtk/Make.defines
index 2ce3c80..5fa7caf 100755
--- a/mbtk/Make.defines
+++ b/mbtk/Make.defines
@@ -18,8 +18,8 @@
 CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-gcc

 AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-ar

 else ifeq ($(BUILD_PLATFORM), gcc-8.4)

-CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-gcc

-AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-ar

+CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-gcc

+AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-ar

 else

 CC=gcc

 AR=ar

diff --git a/mbtk/Makefile b/mbtk/Makefile
index 94a406f..1fdb302 100755
--- a/mbtk/Makefile
+++ b/mbtk/Makefile
@@ -19,6 +19,8 @@
 
 clean:
 	@for i in $(DIRS); do \
-		(cd $$i && echo "Cleaning $$i" && $(MAKE) clean) || exit 1; \
+		if [ -d $$i ];then \
+			(cd $$i && echo "Cleaning $$i" && $(MAKE) clean) || exit 1; \
+		fi \
 	done
 	rm -rf $(OUT_DIR)
\ No newline at end of file
diff --git a/mbtk/liblynq_lib_rilv2/lynq_chip_id.c b/mbtk/liblynq_lib_rilv2/lynq_chip_id.c
index 34e60c1..e430210 100755
--- a/mbtk/liblynq_lib_rilv2/lynq_chip_id.c
+++ b/mbtk/liblynq_lib_rilv2/lynq_chip_id.c
@@ -11,7 +11,7 @@
 {
     struct timeval tv;
     gettimeofday(&tv,NULL);
-    sprintf(time_t, "%lld", tv.tv_sec);
+    sprintf(time_t, "%ld", tv.tv_sec);
     return 0;
 }
 
diff --git a/mbtk/mbtk_toolchain_config/Make.defines b/mbtk/mbtk_toolchain_config/Make.defines
index 0cf943f..4d6a1df 100755
--- a/mbtk/mbtk_toolchain_config/Make.defines
+++ b/mbtk/mbtk_toolchain_config/Make.defines
@@ -13,8 +13,8 @@
 

 export STAGING_DIR=

 

-CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-gcc

-AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-ar

+CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-gcc

+AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-ar

 

 MAKE=make

 

diff --git a/mbtk/optee_test/conf.mk b/mbtk/optee_test/conf.mk
index b8e2eeb..c8d8c0c 100755
--- a/mbtk/optee_test/conf.mk
+++ b/mbtk/optee_test/conf.mk
@@ -4,5 +4,5 @@
 TA_DEV_KIT_DIR := $(ASR_TOS_DIR_1)/optee_os/export/asr18xx/export-ta_arm32

 TEEC_EXPORT := $(ASR_TOS_DIR)/optee_client/out/export/usr

 

-HOST_CROSS_COMPILE := $(ASR_OWRT_DIR)/mbtk/toolchain/linux64/bin/arm-openwrt-linux-muslgnueabi-

+HOST_CROSS_COMPILE := $(ASR_OWRT_DIR)/mbtk/toolchain/linux64/bin/arm-openwrt-linux-gnueabi-

 TA_CROSS_COMPILE := $(ASR_OWRT_DIR)/mbtk/toolchain/gcc-arm-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
\ No newline at end of file
diff --git a/pack.sh b/pack.sh
index f028b93..023e800 100755
--- a/pack.sh
+++ b/pack.sh
@@ -43,7 +43,7 @@
 MBTK_M1901_VERSION_DIR=out/$MBTK_M1901_VERSION
 MBTK_M1901_MDB_DIR=$MBTK_M1901_VERSION_DIR/MDB
 
-# BIN_LIC=-glibc
+BIN_LIC=-glibc
 
 if [ "$BUILD_PARTITION" == "ab" ];then
 	CUSTOM_MODEL="$BUILD_PROJECT"_AB_V2
@@ -294,7 +294,7 @@
 			[ -f mbtk/device_info_generate ] && mbtk/device_info_generate -a ab -b $VERSION_STR_LA -d $BUILD_PROJECT -e $CUSTOM_MODEL -f sa -g "$date_str" -h 15 -i 7 -j $asr_baseline -o $MBTK_M1901_VERSION_DIR/dev_info_la.bin
 		fi
 	fi
-	
+
 	copy "$BUILD_TARGAT"_AP_ReliableData.bin
 	copy "$BUILD_TARGAT"_TLoader_QSPINAND.bin
 	if [ "$BUILD_TARGAT" == "asr1903" ];then