From 954c580548962a1de61a6443bd2efd43581b8009 Mon Sep 17 00:00:00 2001 From: Supreet Deshpande Date: Thu, 9 Jul 2020 10:44:04 +0530 Subject: [PATCH] Add platform independent CMake signing Closes https://github.com/espressif/esp-idf/issues/5557 --- components/bootloader/subproject/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index 06c0b26b83..d3f9d2e53e 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -105,7 +105,7 @@ if(CONFIG_SECURE_BOOT_V2_ENABLED) set(bootloader_unsigned_bin "bootloader-unsigned.bin") add_custom_command(OUTPUT ".signed_bin_timestamp" - COMMAND cp "${CMAKE_BINARY_DIR}/${PROJECT_BIN}" "${CMAKE_BINARY_DIR}/${bootloader_unsigned_bin}" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/${PROJECT_BIN}" "${CMAKE_BINARY_DIR}/${bootloader_unsigned_bin}" COMMAND ${ESPSECUREPY} sign_data --version 2 --keyfile "${secure_boot_signing_key}" -o "${CMAKE_BINARY_DIR}/${PROJECT_BIN}" "${CMAKE_BINARY_DIR}/${bootloader_unsigned_bin}" COMMAND ${CMAKE_COMMAND} -E echo "Generated signed binary image ${build_dir}/${PROJECT_BIN}"