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 | BIN_PATH=$SRC_PATH/prj/"$chip"/"$board"/bin |
| 7 | |
| 8 | cd $SRC_PATH/common/src/uboot |
| 9 | |
| 10 | make mrproper |
| 11 | rm -f ./u-boot* |
| 12 | rm -fr ./compressed_bin |
| 13 | |
| 14 | |
| 15 | echo "--Configuring [ "$chip"_boot_config ] for [ "$chip" "$board" "$key_path"] board ..."; |
| 16 | |
| 17 | ############################################################ |
| 18 | # project setting |
| 19 | ############################################################ |
| 20 | |
| 21 | is_ok=0 |
| 22 | |
| 23 | if |
| 24 | make "$chip"_boot_config; |
| 25 | then |
| 26 | if make platform; then |
| 27 | if make together; then |
| 28 | is_ok=1 |
| 29 | fi |
| 30 | fi |
| 31 | fi |
| 32 | |
| 33 | if [ $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 | |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 51 | chmod -R 777 $SRC_PATH/ |
xf.li | aa4d92f | 2023-09-13 00:18:58 -0700 | [diff] [blame] | 52 | $SRC_PATH/../tools/SignTool/SignImage -i uboot.bin -o $BIN_PATH/uboot.bin -k $SRC_PATH/../tools/SignTool/$key_path |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 53 | cp $BIN_PATH/uboot.bin $BIN_PATH/uboot-mirr.bin |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 54 | |
| 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 |
| 62 | fi |