lib: updatehub: Add missing do upgrade request call
After a success image download, UpdateHub needs inform MCUboot that must test new image and then, on success, commit this new image. This add missing upgrade request call step and fixes the upgarde flow. Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
parent
1128eab3f2
commit
d1e2d345fb
1 changed files with 6 additions and 0 deletions
|
@ -757,6 +757,12 @@ enum updatehub_response updatehub_update(void)
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (boot_request_upgrade(BOOT_UPGRADE_TEST)) {
|
||||
LOG_ERR("Could not reporting downloaded state");
|
||||
ctx.code_status = UPDATEHUB_INSTALL_ERROR;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (report(UPDATEHUB_STATE_INSTALLED) < 0) {
|
||||
LOG_ERR("Could not reporting installed state");
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue