blob: 54a1b1b5c0d2d6186caae807f3f5f73fa5c5fbf4 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#!/bin/sh
2
3cd ../../..
4SRC_PATH=`pwd`
5KEYS_PATH=$SRC_PATH/../tools/SignImage
6BIN_PATH=$SRC_PATH/prj/"$chip"/"$board"/bin
7
8cd $SRC_PATH/common/src/uboot
9
10make mrproper
11rm -f ./u-boot*
12rm -fr ./compressed_bin
13
14
15echo "--Configuring [ "$chip"_boot_config ] for [ "$chip" "$board" "$key_path"] board ...";
16
17############################################################
18# project setting
19############################################################
20
21is_ok=0
22
23if
24 make "$chip"_boot_config;
25then
26 if make platform; then
27 if make together; then
28 is_ok=1
29 fi
30 fi
31fi
32
33if [ $is_ok -eq 1 ];then
34 echo "";
35 echo "--Configuring [ "$chip"_boot_config ] for [ "$chip" "$board" "$key_path"] board ...";
36 echo "--Finished build [ u-boot.bin ] ...";
37
38 if
39 cp compressed_bin/compressed.bin $SRC_PATH/common/scripts/tools;
40 cd $SRC_PATH/common/scripts/tools;
41 ./mkimage -A arm -O u-boot -C none -a "$ram_text" -e "$ram_text" \
42 -n ZX297520 -d compressed.bin compressed.bin.head;
43 then
44 echo "Finished add head to [ u-boot.bin.head ] ...";
45
46 rm compressed.bin;
47 mv compressed.bin.head uboot.bin;
48 cp uboot.bin tboot.bin
49 mv tboot.bin $BIN_PATH/tboot.bin
50
lh9ed821d2023-04-07 01:36:19 -070051 chmod -R 777 $SRC_PATH/
xf.liaa4d92f2023-09-13 00:18:58 -070052 $SRC_PATH/../tools/SignTool/SignImage -i uboot.bin -o $BIN_PATH/uboot.bin -k $SRC_PATH/../tools/SignTool/$key_path
lh9ed821d2023-04-07 01:36:19 -070053 cp $BIN_PATH/uboot.bin $BIN_PATH/uboot-mirr.bin
lh9ed821d2023-04-07 01:36:19 -070054
55 cd $SRC_PATH/common/src/uboot;
56 cp ./u-boot $BIN_PATH
57 cp ./u-boot.map $BIN_PATH
58
59 echo "--Finished build [uboot.bin] ...";
60 echo "...............................................OK....";
61 fi
62fi