[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/boot/common/scripts/build/build_tloader.sh b/boot/common/scripts/build/build_tloader.sh
new file mode 100755
index 0000000..a670737
--- /dev/null
+++ b/boot/common/scripts/build/build_tloader.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+cd ../../..
+SRC_PATH=`pwd`
+KEYS_PATH=$SRC_PATH/../tools/SignImage
+
+cd $SRC_PATH/common/src/loader
+
+make mrproper
+rm -f ./z-load*
+
+is_ok=0
+
+if
+ make "$chip"_tloader_config;
+then
+ if make platform; then
+ if make together; then
+ is_ok=1
+ fi
+ fi
+fi
+
+if [ $is_ok -eq 1 ];then
+
+ echo "";
+ echo "Configuring ["$chip"_"$board"_tloader_config] for ["$chip" "$board" "$key_path"] board ...";
+
+ mkdir -p $KEYS_PATH/Input
+ mkdir -p $KEYS_PATH/Output
+ chmod -R 777 $SRC_PATH/
+ cp z-load.bin $KEYS_PATH/Input/tloader.bin
+ cd $KEYS_PATH
+ ./SignImage -z ./Input/tloader.bin ./test_key/$key_path/private.k
+ cp ./Input/tloader.bin $SRC_PATH/prj/$chip/$board/bin/tloader.bin
+ rm -rf Input
+ rm -rf Output
+
+ echo "--Finished build [tloader.bin ] ...";
+ echo "................................................OK....";
+fi
+
+