build: Introduce DEFAULT_APP with automatic builds

Introduce the Makefile variable DEFAULT_APP which should be the path
to the device app binary to include in the obliagory slot 0.

Build automatically: the default app, the new digest file
mgmt_app_digest.h for the firmware which contains the digest of
DEFAULT_APP, the default partition table, and all the tools necessary
to generate this.
This commit is contained in:
Michael Cardell Widerkrantz 2025-08-27 11:35:21 +02:00
parent 9eed887a75
commit 6fc4d264cc
No known key found for this signature in database
GPG key ID: D3DB3DDF57E704E5
5 changed files with 46 additions and 15 deletions

View file

@ -10,15 +10,9 @@
// Lock down what app can start from flash slot 0.
//
// To update this, compute the BLAKE2s digest of the app.bin
// clang-format off
static const uint8_t allowed_app_digest[32] = {
0x40, 0x7f, 0x58, 0xbe, 0x39, 0xcf, 0xae, 0xaf,
0x43, 0xa0, 0x75, 0x90, 0x4d, 0x43, 0xa3, 0x2e,
0xa1, 0x5f, 0x4c, 0x1b, 0x6a, 0xf3, 0x69, 0x4d,
0x74, 0x05, 0x21, 0x63, 0xa0, 0xd3, 0x69, 0x34,
};
// clang-format on
// To update this, compute the BLAKE2s digest of the device app
// binare, see the b2s tool.
#include "mgmt_app_digest.h"
static uint8_t current_app_digest[32];