Skip to content

Commit

Permalink
Add update client configuration option for disabling storage hash val…
Browse files Browse the repository at this point in the history
…idation

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.
  • Loading branch information
ccli8 committed Aug 19, 2021
1 parent d7edc52 commit b07b2e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions update-client-hub/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
"delta-storage-size": {
"help": "Total storage allocated for delta image. This config item is only for multicast update.",
"value": null
},
"disable-storage-hash-validation": {
"help": "Disables storage hash validation for PAL using like PSA Firmware Update API not supporting storage read.",
"options": [ "null", "1"],
"default": null,
"value": null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,15 @@ static void arm_uc_internal_event_handler(uintptr_t event)
{
switch (event) {
case ARM_UC_PAAL_EVENT_FINALIZE_DONE:
#if defined(MBED_CONF_UPDATE_CLIENT_DISABLE_STORAGE_HASH_VALIDATION) &&\
(MBED_CONF_UPDATE_CLIENT_DISABLE_STORAGE_HASH_VALIDATION == 1)
/* PAL using like PSA FWU API doesn't support storage read of firmware candidate (no psa_fwu_read()).
* Disable storage hash validation. */
event = UCFM_EVENT_FINALIZE_DONE;
arm_uc_signal_ucfm_handler(event);
#else
event_handler_finalize();
#endif
break;
case ARM_UC_PAAL_EVENT_READ_DONE:
if (ARM_UC_HUB_getState() == ARM_UC_HUB_STATE_WAIT_FOR_MULTICAST ||
Expand Down

0 comments on commit b07b2e3

Please sign in to comment.