-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idf.py fails if SECURE_BOOTLOADER_REFLASHABLE is selected (IDFGH-2396) #4513
Comments
@fgiancane8 Thanks for reporting. Thanks. |
@Alvin1Zhang you're welcome. It seems that the CMake file is recognizing the gen_project_binary Makefile target as a source file. However, the bootloader makefile is correctly generated, as if I issue the |
Hi @fgiancane8 , Thanks for the detailed bug report. You're right that the build system is incorrectly passing a target name to a clause which needs a source file. A fix will be merged soon and this issue will be updated, in the meantime if you wish you can apply this short patch to your IDF directory: diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt
index 9a49fee85c..e6bdbb7dba 100644
--- a/components/bootloader/subproject/CMakeLists.txt
+++ b/components/bootloader/subproject/CMakeLists.txt
@@ -76,7 +76,7 @@ if(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
COMMAND ${CMAKE_COMMAND} -E echo "DIGEST ${bootloader_digest_bin}"
COMMAND ${ESPSECUREPY} digest_secure_bootloader --keyfile "${secure_bootloader_key}"
-o "${bootloader_digest_bin}" "${CMAKE_BINARY_DIR}/bootloader.bin"
- MAIN_DEPENDENCY gen_project_binary
+ MAIN_DEPENDENCY "${CMAKE_BINARY_DIR}/.bin_timestamp"
DEPENDS gen_secure_bootloader_key gen_project_binary
VERBATIM) |
Hi @projectgus, Sorry I was in holiday leave, thus I am responding right now. I will be back in office next week so I will test this patch and report back to you if everything goes well. Thanks for your support |
Hi @projectgus , Many thanks! |
INSTRUCTIONS
Before submitting a new issue, please follow the checklist and try to find the answer.
Problem Description
I am trying to have a secure boot build for testing purposes.
If
SECURE_BOOTLOADER_REFLASHABLE
is enabled, then this is my output from CMake:If on the other hand, I choose
SECURE_BOOTLOADER_ONE_TIME_FLASH
option, everything goes as expected.Expected Behavior
idf.py bootloader
produces a bootloader.Actual Behavior
idf.py bootloader
fails to produce a bootloader.Steps to reproduce
idf.py menuconfig
SECURE_BOOTLOADER_REFLASHABLE
idf.py bootloader
The text was updated successfully, but these errors were encountered: