summaryrefslogtreecommitdiff
path: root/fw/app
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-05-24 11:19:06 +0200
committerxengineering <me@xengineering.eu>2025-05-24 11:19:06 +0200
commitca28bf9b784fd2c57133c1f8b5a6d99de7d10c6b (patch)
treecf12eed02d9465d7109af45acf94c9f2594bb1f2 /fw/app
parentcaf416218623d6778b3d0c2fe12ee08135c2d126 (diff)
downloadiot-contact-ca28bf9b784fd2c57133c1f8b5a6d99de7d10c6b.tar
iot-contact-ca28bf9b784fd2c57133c1f8b5a6d99de7d10c6b.tar.zst
iot-contact-ca28bf9b784fd2c57133c1f8b5a6d99de7d10c6b.zip
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.
Diffstat (limited to 'fw/app')
-rw-r--r--fw/app/meson.build29
1 files changed, 24 insertions, 5 deletions
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,
)