modules: trusted-firmware-m: Allow to adjust hex file base address
This commit allows to append an optional --hex-addr argument to the wrapper script if speficied. This can adjust the base address of the output hex file when signing the non-secure or secure firmware images. Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
This commit is contained in:
parent
dde796a1c9
commit
4215955e84
|
@ -278,6 +278,14 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
set(TFM_PUBLIC_KEY_FORMAT "full")
|
||||
endif()
|
||||
|
||||
if(DEFINED TFM_HEX_BASE_ADDRESS_S)
|
||||
set(HEX_ADDR_ARGS_S "--hex-addr=${TFM_HEX_BASE_ADDRESS_S}")
|
||||
endif()
|
||||
|
||||
if(DEFINED TFM_HEX_BASE_ADDRESS_NS)
|
||||
set(HEX_ADDR_ARGS_NS "--hex-addr=${TFM_HEX_BASE_ADDRESS_NS}")
|
||||
endif()
|
||||
|
||||
function(tfm_sign OUT_ARG SUFFIX PAD INPUT_FILE OUTPUT_FILE)
|
||||
if(PAD)
|
||||
set(pad_args --pad --pad-header)
|
||||
|
@ -290,6 +298,7 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
--align 1
|
||||
-v ${TFM_IMAGE_VERSION_${SUFFIX}}
|
||||
${pad_args}
|
||||
${HEX_ADDR_ARGS_${SUFFIX}}
|
||||
${ADD_${SUFFIX}_IMAGE_MIN_VER}
|
||||
-s auto
|
||||
-H ${CONFIG_ROM_START_OFFSET}
|
||||
|
|
Loading…
Reference in a new issue