From 0e90839a144e101e23c516396b71ae169eff2816 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Fri, 26 Jan 2018 19:11:02 +0800 Subject: [PATCH] make.sh: update package command boot_merge and trust_merge support command "--replace". Change-Id: Ie5cf52a1aaefcc717fcb76400e2f0eb8dfc8f467 Signed-off-by: Joseph Chen --- make.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/make.sh b/make.sh index 6fe2d6add8..3559e9adbe 100755 --- a/make.sh +++ b/make.sh @@ -71,7 +71,7 @@ pack_uboot_image() pack_loader_image() { cd ${RKBIN} - ${RKTOOLS}/boot_merger ${RKBIN}/RKBOOT/${RKCHIP}MINIALL.ini + ${RKTOOLS}/boot_merger --replace tools/rk_tools/ ./ ${RKBIN}/RKBOOT/${RKCHIP}MINIALL.ini cd - mv ${RKBIN}/*_loader_*.bin ./ } @@ -83,7 +83,7 @@ pack_trust_image() # ARM64 uses trust_merger if grep -q '^CONFIG_ARM64=y' ${DSTDIR}/out/.config ; then cd ${RKBIN} - ${RKTOOLS}/trust_merger ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini + ${RKTOOLS}/trust_merger --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini cd - mv ${RKBIN}/trust.img ./trust.img # ARM uses loaderimage @@ -95,9 +95,14 @@ pack_trust_image() # Convert Dec to Hex TEE_LOAD_ADDR=$(echo "obase=16;${TEE_LOAD_ADDR}"|bc) + # Parse orignal path TOS=`sed -n "/TOS=/s/TOS=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'` TOS_TA=`sed -n "/TOSTA=/s/TOSTA=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'` + # replace "./tools/rk_tools/" with "./" to compatible legacy ini content of rkdevelop branch + TOS=$(echo ${TOS} | sed "s/tools\/rk_tools\//\.\//g") + TOS_TA=$(echo ${TOS_TA} | sed "s/tools\/rk_tools\//\.\//g") + if [ $TOS_TA -a $TOS ]; then ${RKTOOLS}/loaderimage --pack --trustos ${RKBIN}/${TOS} ./trust.img ${TEE_LOAD_ADDR} ${RKTOOLS}/loaderimage --pack --trustos ${RKBIN}/${TOS_TA} ./trust_with_ta.img ${TEE_LOAD_ADDR}