-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(esp_encrypted_img): correct the dependency for generating encrypt…
…ed binary Also changed the target name to dynamic one - based on output file name Closes #349
- Loading branch information
Showing
3 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 2.2.1 | ||
|
||
- Build system: fix the dependency for generating pre encrypted image | ||
|
||
## 2.2.0 | ||
|
||
### Enhancements: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
set(ESP_IMG_GEN_TOOL_PATH ${CMAKE_CURRENT_LIST_DIR}/tools/esp_enc_img_gen.py) | ||
|
||
idf_build_get_property(build_dir BUILD_DIR) | ||
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES) | ||
set(app_dependency "${build_dir}/.signed_bin_timestamp") | ||
else() | ||
set(app_dependency "${build_dir}/.bin_timestamp") | ||
endif() | ||
|
||
function(create_esp_enc_img input_file rsa_key_file output_file app) | ||
cmake_parse_arguments(arg "${options}" "" "${multi}" "${ARGN}") | ||
idf_build_get_property(python PYTHON) | ||
|
||
add_custom_command(OUTPUT ${output_file} | ||
POST_BUILD | ||
COMMAND ${python} ${ESP_IMG_GEN_TOOL_PATH} encrypt | ||
${input_file} | ||
${rsa_key_file} ${output_file} | ||
DEPENDS gen_project_binary | ||
DEPENDS "${app_dependency}" | ||
COMMENT "Generating pre-encrypted binary" | ||
VERBATIM | ||
) | ||
add_custom_target(encrypt_bin_target DEPENDS ${output_file}) | ||
add_dependencies(${app} encrypt_bin_target) | ||
get_filename_component(name ${output_file} NAME_WE) | ||
add_custom_target(enc_bin_target_${name} ALL DEPENDS ${output_file}) | ||
add_dependencies(enc_bin_target_${name} gen_project_binary) | ||
endfunction() |