mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
Fix dependency on files used by picotool (#2027)
Add the key files and partition table JSON to the link dependencies, to ensure the postprocessing is run when any of them are updated. Link dependencies seem to be the simplest way, as the elf file needs re-linking anyway given it has been post-processed, so this doesn't add any unecessary extra processing. Without this fix, if you modify a pt.json file or a private key, the ouptut binary will not have the correct pt/key.
This commit is contained in:
parent
809a423fb0
commit
2331e6f203
1 changed files with 10 additions and 0 deletions
|
|
@ -427,6 +427,7 @@ function(picotool_postprocess_binary TARGET)
|
|||
if (picotool_sign_output)
|
||||
list(APPEND picotool_args "--sign")
|
||||
get_target_property(picotool_sigfile ${TARGET} PICOTOOL_SIGFILE)
|
||||
pico_add_link_depend(${TARGET} ${picotool_sigfile})
|
||||
endif()
|
||||
|
||||
get_target_property(picotool_hash_output ${TARGET} PICOTOOL_HASH_OUTPUT)
|
||||
|
|
@ -442,10 +443,19 @@ function(picotool_postprocess_binary TARGET)
|
|||
|
||||
# Embed PT properties
|
||||
get_target_property(picotool_embed_pt ${TARGET} PICOTOOL_EMBED_PT)
|
||||
if (picotool_embed_pt)
|
||||
pico_add_link_depend(${TARGET} ${picotool_embed_pt})
|
||||
endif()
|
||||
|
||||
# Encryption properties
|
||||
get_target_property(picotool_aesfile ${TARGET} PICOTOOL_AESFILE)
|
||||
if (picotool_aesfile)
|
||||
pico_add_link_depend(${TARGET} ${picotool_aesfile})
|
||||
endif()
|
||||
get_target_property(picotool_enc_sigfile ${TARGET} PICOTOOL_ENC_SIGFILE)
|
||||
if (picotool_enc_sigfile)
|
||||
pico_add_link_depend(${TARGET} ${picotool_enc_sigfile})
|
||||
endif()
|
||||
|
||||
# Extra args
|
||||
get_target_property(extra_process_args ${TARGET} PICOTOOL_EXTRA_PROCESS_ARGS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue