Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf noup] boot: bootutil: Fix issue with network core update persisting #405

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,13 +1516,14 @@ boot_validated_swap_type(struct boot_loader_state *state,
swap_type = BOOT_SWAP_TYPE_FAIL;
} else {
BOOT_LOG_INF("Done updating network core");
#if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SWAP_USING_MOVE)
/* swap_erase_trailer_sectors is undefined if upgrade only
* method is used. There is no need to erase sectors, because
* the image cannot be reverted.
* method is used
*/
#if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SWAP_USING_MOVE)
rc = swap_erase_trailer_sectors(state,
secondary_fa);
#elif defined(MCUBOOT_OVERWRITE_ONLY)
rc = flash_area_erase(secondary_fa, 0, flash_area_get_size(secondary_fa));
#endif
swap_type = BOOT_SWAP_TYPE_NONE;
}
Expand Down