diff --git a/update-client-hub/mbed_lib.json b/update-client-hub/mbed_lib.json index 4211a3445..bb2168197 100644 --- a/update-client-hub/mbed_lib.json +++ b/update-client-hub/mbed_lib.json @@ -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 } } } diff --git a/update-client-hub/modules/firmware-manager/source/arm_uc_firmware_manager.c b/update-client-hub/modules/firmware-manager/source/arm_uc_firmware_manager.c index 6da836bd2..4c6525a0e 100644 --- a/update-client-hub/modules/firmware-manager/source/arm_uc_firmware_manager.c +++ b/update-client-hub/modules/firmware-manager/source/arm_uc_firmware_manager.c @@ -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 ||