lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | cd ../../.. |
| 4 | SRC_PATH=`pwd` |
| 5 | KEYS_PATH=$SRC_PATH/../tools/SignImage |
| 6 | |
| 7 | cd $SRC_PATH/common/src/loader |
| 8 | |
| 9 | make mrproper |
| 10 | rm -f ./z-load* |
| 11 | |
| 12 | is_ok=0 |
| 13 | |
| 14 | if |
| 15 | make "$chip"_tloader_config; |
| 16 | then |
| 17 | if make platform; then |
| 18 | if make together; then |
| 19 | is_ok=1 |
| 20 | fi |
| 21 | fi |
| 22 | fi |
| 23 | |
| 24 | if [ $is_ok -eq 1 ];then |
| 25 | |
| 26 | echo ""; |
| 27 | echo "Configuring ["$chip"_"$board"_tloader_config] for ["$chip" "$board" "$key_path"] board ..."; |
| 28 | |
| 29 | mkdir -p $KEYS_PATH/Input |
| 30 | mkdir -p $KEYS_PATH/Output |
| 31 | chmod -R 777 $SRC_PATH/ |
| 32 | cp z-load.bin $KEYS_PATH/Input/tloader.bin |
| 33 | cd $KEYS_PATH |
| 34 | ./SignImage -z ./Input/tloader.bin ./test_key/$key_path/private.k |
| 35 | cp ./Input/tloader.bin $SRC_PATH/prj/$chip/$board/bin/tloader.bin |
| 36 | rm -rf Input |
| 37 | rm -rf Output |
| 38 | |
| 39 | echo "--Finished build [tloader.bin ] ..."; |
| 40 | echo "................................................OK...."; |
| 41 | fi |
| 42 | |
| 43 | |