Skip to content

Commit b07b2e3

Browse files
committed
Add update client configuration option for disabling storage hash validation
PAL using like PSA FWU API doesn't support storage read of firmware candidate (no psa_fwu_read()). Add configuration option to disable this flow.
1 parent d7edc52 commit b07b2e3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

update-client-hub/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
"delta-storage-size": {
6767
"help": "Total storage allocated for delta image. This config item is only for multicast update.",
6868
"value": null
69+
},
70+
"disable-storage-hash-validation": {
71+
"help": "Disables storage hash validation for PAL using like PSA Firmware Update API not supporting storage read.",
72+
"options": [ "null", "1"],
73+
"default": null,
74+
"value": null
6975
}
7076
}
7177
}

update-client-hub/modules/firmware-manager/source/arm_uc_firmware_manager.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,15 @@ static void arm_uc_internal_event_handler(uintptr_t event)
300300
{
301301
switch (event) {
302302
case ARM_UC_PAAL_EVENT_FINALIZE_DONE:
303+
#if defined(MBED_CONF_UPDATE_CLIENT_DISABLE_STORAGE_HASH_VALIDATION) &&\
304+
(MBED_CONF_UPDATE_CLIENT_DISABLE_STORAGE_HASH_VALIDATION == 1)
305+
/* PAL using like PSA FWU API doesn't support storage read of firmware candidate (no psa_fwu_read()).
306+
* Disable storage hash validation. */
307+
event = UCFM_EVENT_FINALIZE_DONE;
308+
arm_uc_signal_ucfm_handler(event);
309+
#else
303310
event_handler_finalize();
311+
#endif
304312
break;
305313
case ARM_UC_PAAL_EVENT_READ_DONE:
306314
if (ARM_UC_HUB_getState() == ARM_UC_HUB_STATE_WAIT_FOR_MULTICAST ||

0 commit comments

Comments
 (0)