blob: d60941842e41ef43bc12a53a132e93de974ca59b [file] [log] [blame]
xiaobo gue6c46862018-01-10 18:58:09 +08001#!/bin/bash
2
3function build_bl32() {
4 echo -n "Build bl32...Please wait... "
Pengguang Zhu304e7ea2018-12-29 11:11:51 +08005 local target="$1/bl32.img"
Honglin Zhang860b68a2020-07-28 06:39:33 -04006 local target2="$1/bl32.bin"
xiaobo gue6c46862018-01-10 18:58:09 +08007 # $1: src_folder, $2: bin_folder, $3: soc
8 cd $1
Pengguang Zhu0a25cec2024-09-20 12:14:02 +08009 if [ $CONFIG_CHIPSET_NAME == "s905w2" ]; then
10 eval 'CFG_NO_RPMB=y CFG_RSV_MEM_8M=y ./build.sh $3 ${CONFIG_CAS}'
11 elif [ $CONFIG_CHIPSET_NAME == "s805x2" ]; then
12 eval 'CFG_RSV_MEM_20M=y ./build.sh $3 ${CONFIG_CAS}'
13 elif [ $CONFIG_CHIPSET_NAME == "s805c1" || $CONFIG_CHIPSET_NAME == "s805c1eng" ]; then
14 eval 'CFG_NO_RPMB=y ./build.sh $3 ${CONFIG_CAS}'
15 elif [ $CONFIG_CHIPSET_NAME == "s805x3" ]; then
16 echo CONFIG_CHIPSET_NAME is $CONFIG_CHIPSET_NAME
17 eval 'CFG_RSV_MEM_16M_WITH_DYN_SHM=y ./build.sh $3 ${CONFIG_CAS}'
18 else
19 /bin/bash build.sh $3 ${CONFIG_CAS}
20 fi
Pengguang Zhu304e7ea2018-12-29 11:11:51 +080021 if [ $? != 0 ]; then
22 cd ${MAIN_FOLDER}
23 echo "Error: Build bl32 failed... abort"
24 exit -1
25 fi
xiaobo gue6c46862018-01-10 18:58:09 +080026 cd ${MAIN_FOLDER}
Pengguang Zhu304e7ea2018-12-29 11:11:51 +080027 cp ${target} $2 -f
Zhongfu Luo3a6e5342020-12-27 13:11:54 +080028 if [ "$ADVANCED_BOOTLOADER" == "1" ]; then
Honglin Zhang860b68a2020-07-28 06:39:33 -040029 cp ${target2} $2 -f
30 fi
xiaobo gue6c46862018-01-10 18:58:09 +080031 echo "done"
32 return
33}