diff options
author | xengineering <me@xengineering.eu> | 2025-02-24 21:12:08 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-02-24 21:12:08 +0100 |
commit | 13b2ebe85a7c4ce5bb0000a0fe2c2858e903d5c3 (patch) | |
tree | db71cb005d07fe55ecd0a4d1a0799abf1108cb22 | |
parent | 136fe529b517f4581d06f896f02ef0a8a4793fc9 (diff) | |
download | iot-contact-13b2ebe85a7c4ce5bb0000a0fe2c2858e903d5c3.tar iot-contact-13b2ebe85a7c4ce5bb0000a0fe2c2858e903d5c3.tar.zst iot-contact-13b2ebe85a7c4ce5bb0000a0fe2c2858e903d5c3.zip |
WIP: fw: Embed app signing into build systembootloader
-rw-r--r-- | cmake/mcuboot.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/mcuboot.cmake b/cmake/mcuboot.cmake new file mode 100644 index 0000000..9eb67a1 --- /dev/null +++ b/cmake/mcuboot.cmake @@ -0,0 +1,25 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +find_package(Python3 REQUIRED) + +function(mcuboot_sign_app mcuboot key target sink source) + add_custom_target( + "${target}" + ALL + DEPENDS + ${sink} + ) + + add_custom_command( + OUTPUT + ${sink} + COMMAND + ${Python3_EXECUTABLE} ${mcuboot}/scripts/imgtool.py sign --version 0.0.0 --header-size 0x200 --slot-size 0xc0000 --key ${key} ${source} ${sink} + COMMAND + echo "${sink}" + DEPENDS + ${source} + ) +endfunction() |