Baseline update from LYNQ_SDK_ASR_T108_V05.03.01.00(kernel build error.)

Change-Id: I56fc72cd096e82c589920026553170e5cb9692eb
diff --git a/build.sh b/build.sh
index a6d14b9..8e42348 100755
--- a/build.sh
+++ b/build.sh
@@ -390,7 +390,39 @@
 		sed -i "/.*CONFIG_PACKAGE_mbtk-rootfs/c\# CONFIG_PACKAGE_mbtk-rootfs is not set" config/$DECONFIG_FILE
 	fi
 }
-
+toolchain_generate()
+{
+	MBTK_TOOLCHAIN_DIR=mbtk_toolchain
+	
+	if [ ! -d mbtk/toolchain/linux64 ];then
+		echo "Build in the first."
+		exit 1
+	fi
+	
+	[ -d $MBTK_TOOLCHAIN_DIR ] && rm -rf $MBTK_TOOLCHAIN_DIR
+	[ ! -d $MBTK_TOOLCHAIN_DIR ] && mkdir -p $MBTK_TOOLCHAIN_DIR
+	
+	echo "Start copy toolchain..."
+	cp -r mbtk/toolchain/linux64 $MBTK_TOOLCHAIN_DIR/toolchain
+	
+	echo "Start copy mbtk header files and libs..."
+	mkdir $MBTK_TOOLCHAIN_DIR/mbtk
+	cp -r mbtk/include $MBTK_TOOLCHAIN_DIR/mbtk
+	cp -r mbtk/rootfs/lib $MBTK_TOOLCHAIN_DIR/mbtk
+	
+	echo "Start copy mbtk config files..."
+	cp -r mbtk/mbtk_toolchain_config/* $MBTK_TOOLCHAIN_DIR
+	
+	echo "Delete unnecessary files..."
+	# rm -rf $MBTK_TOOLCHAIN_DIR/toolchain/usr
+	rm -rf $MBTK_TOOLCHAIN_DIR/toolchain/initial
+	rm $MBTK_TOOLCHAIN_DIR/toolchain/include.zip
+	
+	echo "Start packaging toolchain..."
+	tar -zcf mbtk_toolchain.tar.gz mbtk_toolchain/
+	
+	echo "Toolchain generate complete."
+}
 
 ################################################################
 ### Start ########
@@ -502,6 +534,12 @@
 		busybox)
 			build_busybox
 			;;
+		toolchain)
+			toolchain_generate
+			;;
+                optee)
+			build package/services/optee_app
+			;;
 		*)
             SUB_DIR=`find package/ -type d -name "$1" | sed -n '1,1p'`
             if [ x$SUB_DIR = x ]