diff options
Diffstat (limited to 'fw/app/meson.build')
-rw-r--r-- | fw/app/meson.build | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/fw/app/meson.build b/fw/app/meson.build new file mode 100644 index 0000000..6665fe4 --- /dev/null +++ b/fw/app/meson.build @@ -0,0 +1,60 @@ +external_project = import('unstable-external_project') + +application_source = meson.current_source_dir() + +external_project.add_project( + configure_zephyr, + configure_options: [ + '--source-tree', application_source, + '--build-tree', meson.current_build_dir() / 'build', + '--board', board, + '--zephyr-base', zephyr, + '--zephyr-modules', ';'.join(zephyr_modules), + ], + verbose: true, +) + +application = custom_target( + output: ['application.bin'], + command: [ + build_zephyr, + '--build-tree', meson.current_build_dir() / 'build', + '--binary-name', 'zephyr.bin', + '--target-name', 'application.bin', + ], +) + +version = '0.0.0' +header_size = '0x200' +slot_size = '0xc0000' + +update_image = custom_target( + output: ['update-image.bin'], + command: [ + imgtool, + 'sign', + '--version', version, + '--header-size', header_size, + '--slot-size', slot_size, + '--key', signing_key, + application, + '@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', + application, + '@OUTPUT@', + ], + depends: application, +) |