make.sh: support pack uboot.fit

uboot.fit = u-boot-nodtb.bin + u-boot.dtb + tee.bin

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I70ed43fa2ff37d3f9ac0dfef1321a9397901c73f
This commit is contained in:
Joseph Chen 2020-04-07 11:03:29 +08:00 committed by Jianhong Chen
parent d13b75e130
commit 162cc77ecd
1 changed files with 18 additions and 8 deletions

26
make.sh
View File

@ -592,7 +592,7 @@ pack_loader_image()
pack_32bit_trust_image()
{
local ini=$1 TOS TOS_TA DARM_BASE TEE_LOAD_ADDR TEE_OUTPUT TEE_OFFSET
local ini=$1 TOS TOS_TA DARM_BASE TEE_LOAD_ADDR TEE_OUTPUT TEE_OFFSET FORMAT
if [ ! -f ${ini} ]; then
echo "pack trust failed! Can't find: ${ini}"
@ -624,16 +624,26 @@ pack_32bit_trust_image()
TOS=$(echo ${TOS} | sed "s/tools\/rk_tools\//\.\//g")
TOS_TA=$(echo ${TOS_TA} | sed "s/tools\/rk_tools\//\.\//g")
if [ $TOS_TA ]; then
${RKTOOLS}/loaderimage --pack --trustos ${RKBIN}/${TOS_TA} ${TEE_OUTPUT} ${TEE_LOAD_ADDR} ${PLATFORM_TRUST_IMG_SIZE}
elif [ $TOS ]; then
${RKTOOLS}/loaderimage --pack --trustos ${RKBIN}/${TOS} ${TEE_OUTPUT} ${TEE_LOAD_ADDR} ${PLATFORM_TRUST_IMG_SIZE}
FORMAT=`sed -n "/FORMAT=/s/FORMAT=//p" ${ini} |tr -d '\r'`
if [ $FORMAT = "FIT" ]; then
./scripts/fit-vboot-uboot.sh --no-vboot --no-rebuild
ls uboot.img >/dev/null 2>&1 && rm uboot.img -rf
ls trust.img >/dev/null 2>&1 && rm trust.img -rf
echo "pack uboot.fit okay! Input: ${ini}"
else
echo "Can't find any tee bin"
exit 1
if [ $TOS_TA ]; then
${RKTOOLS}/loaderimage --pack --trustos ${RKBIN}/${TOS_TA} ${TEE_OUTPUT} ${TEE_LOAD_ADDR} ${PLATFORM_TRUST_IMG_SIZE}
elif [ $TOS ]; then
${RKTOOLS}/loaderimage --pack --trustos ${RKBIN}/${TOS} ${TEE_OUTPUT} ${TEE_LOAD_ADDR} ${PLATFORM_TRUST_IMG_SIZE}
else
echo "Can't find any tee bin"
exit 1
fi
echo "pack trust okay! Input: ${ini}"
fi
echo "pack trust okay! Input: ${ini}"
echo
}