modules: trusted-firmware-m: Use bl2_signed.bin image
If CONFIG_TFM_BL1 config has been enabled bl2_signed.bin/hex image will be be generated during build tf-m these binaries shall be used while generating tfm_merged.hex Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
This commit is contained in:
parent
dd71a2d2db
commit
478ced8149
1 changed files with 14 additions and 2 deletions
|
@ -170,6 +170,10 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
set(BL2_ELF_FILE ${TFM_BINARY_DIR}/bin/bl2.elf)
|
||||
set(BL2_BIN_FILE ${TFM_BINARY_DIR}/bin/bl2.bin)
|
||||
set(BL2_HEX_FILE ${TFM_BINARY_DIR}/bin/bl2.hex)
|
||||
if(CONFIG_TFM_BL1)
|
||||
set(BL2_SIGNED_BIN_FILE ${TFM_BINARY_DIR}/bin/bl2_signed.bin)
|
||||
set(BL2_SIGNED_HEX_FILE ${TFM_BINARY_DIR}/bin/bl2_signed.hex)
|
||||
endif()
|
||||
endif()
|
||||
set(TFM_S_ELF_FILE ${TFM_BINARY_DIR}/bin/tfm_s.elf)
|
||||
set(TFM_S_BIN_FILE ${TFM_BINARY_DIR}/bin/tfm_s.bin)
|
||||
|
@ -187,6 +191,8 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
${BL2_ELF_FILE}
|
||||
${BL2_BIN_FILE}
|
||||
${BL2_HEX_FILE}
|
||||
$<$<BOOL:${CONFIG_TFM_BL1}>:${BL2_SIGNED_BIN_FILE}>
|
||||
$<$<BOOL:${CONFIG_TFM_BL1}>:${BL2_SIGNED_HEX_FILE}>
|
||||
${TFM_S_ELF_FILE}
|
||||
${TFM_S_BIN_FILE}
|
||||
${TFM_S_HEX_FILE}
|
||||
|
@ -334,6 +340,10 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
BL2_BIN_FILE ${BL2_BIN_FILE}
|
||||
BL2_HEX_FILE ${BL2_HEX_FILE}
|
||||
)
|
||||
if(CONFIG_TFM_BL1)
|
||||
set_target_properties(tfm PROPERTIES BL2_SIGNED_BIN_FILE ${BL2_SIGNED_BIN_FILE})
|
||||
set_target_properties(tfm PROPERTIES BL2_SIGNED_HEX_FILE ${BL2_SIGNED_HEX_FILE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set TFM S/NS executable file paths as target properties on 'tfm'
|
||||
|
@ -493,7 +503,8 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/mergehex.py
|
||||
-o ${MERGED_FILE}
|
||||
$<TARGET_PROPERTY:tfm,BL2_HEX_FILE>
|
||||
$<$<BOOL:${CONFIG_TFM_BL1}>:$<TARGET_PROPERTY:tfm,BL2_SIGNED_HEX_FILE>>
|
||||
$<$<NOT:$<BOOL:${CONFIG_TFM_BL1}>>:$<TARGET_PROPERTY:tfm,BL2_HEX_FILE>>
|
||||
${S_NS_SIGNED_FILE}
|
||||
)
|
||||
|
||||
|
@ -519,7 +530,8 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/mergehex.py
|
||||
-o ${MERGED_FILE}
|
||||
$<TARGET_PROPERTY:tfm,BL2_HEX_FILE>
|
||||
$<$<BOOL:${CONFIG_TFM_BL1}>:$<TARGET_PROPERTY:tfm,BL2_SIGNED_HEX_FILE>>
|
||||
$<$<NOT:$<BOOL:${CONFIG_TFM_BL1}>>:$<TARGET_PROPERTY:tfm,BL2_HEX_FILE>>
|
||||
${S_SIGNED_FILE}
|
||||
${NS_SIGNED_FILE}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue