From d1c4791dad243da755c315f50d939beaf825322a 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 --- 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}"