make.sh: support get loader and trust ini from .config

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia68f394e19565af5e518387e356f58ac24e4b09e
This commit is contained in:
Joseph Chen 2020-07-10 09:36:54 +08:00
parent 6e24d50bef
commit 496a6e1e02
1 changed files with 11 additions and 0 deletions

11
make.sh
View File

@ -499,6 +499,7 @@ function fixup_platform_configure()
fi
}
# Priority: default < CHIP_TYPE_FIXUP_TABLE() < defconfig < make.sh args
function select_ini_file()
{
# default
@ -509,6 +510,16 @@ function select_ini_file()
INI_TRUST=${RKBIN}/RKTRUST/${RKCHIP_TRUST}TOS.ini
fi
# defconfig
NAME=`sed -n "/CONFIG_LOADER_INI=/s/CONFIG_LOADER_INI=//p" .config |tr -d '\r' | tr -d '"'`
if [ ! -z "${NAME}" ]; then
INI_LOADER=${RKBIN}/RKBOOT/${NAME}
fi
NAME=`sed -n "/CONFIG_TRUST_INI=/s/CONFIG_TRUST_INI=//p" .config |tr -d '\r' | tr -d '"'`
if [ ! -z "${NAME}" ]; then
INI_TRUST=${RKBIN}/RKTRUST/${NAME}
fi
# args
if [ "${ARG_INI_TRUST}" != "" ]; then
INI_TRUST=${ARG_INI_TRUST}