Skip to content

Commit

Permalink
lib: updatehub: Add missing do upgrade request call
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nandojve authored and jukkar committed Mar 30, 2020
1 parent 1128eab commit d1e2d34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/updatehub/updatehub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d1e2d34

Please sign in to comment.