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