From ca28bf9b784fd2c57133c1f8b5a6d99de7d10c6b Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 24 May 2025 11:19:06 +0200 Subject: fw: app: Provide confirmed image in build tree This prepares the upcoming `factory-image.bin` which can be flashed to the default boot address of the microcontroller. --- fw/app/meson.build | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'fw/app/meson.build') diff --git a/fw/app/meson.build b/fw/app/meson.build index 84e4c21..1a16862 100644 --- a/fw/app/meson.build +++ b/fw/app/meson.build @@ -24,18 +24,37 @@ application = custom_target( ], ) +version = '0.0.0' +header_size = '0x200' +slot_size = '0xc0000' + application_signed = custom_target( output: ['application.signed.bin'], command: [ imgtool, 'sign', - '--version', '0.0.0', - '--header-size', '0x200', - '--slot-size', '0xc0000', + '--version', version, + '--header-size', header_size, + '--slot-size', slot_size, + '--key', signing_key, + meson.current_build_dir() / 'application.bin', + '@OUTPUT@', + ], + depends: application, +) + +application_signed_confirmed = custom_target( + output: ['application.signed.confirmed.bin'], + command: [ + imgtool, + 'sign', + '--version', version, + '--header-size', header_size, + '--slot-size', slot_size, '--key', signing_key, + '--confirm', meson.current_build_dir() / 'application.bin', - meson.current_build_dir() / 'application.signed.bin', + '@OUTPUT@', ], - build_by_default: true, depends: application, ) -- cgit v1.2.3-70-g09d2