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] mgmt: mcumgr: bootutil_hooks: nrf53_hooks: Handle sysbuild… #2117

Merged
merged 1 commit into from
Oct 24, 2024
Merged
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
10 changes: 9 additions & 1 deletion subsys/mgmt/mcumgr/bootutil_hooks/nrf53_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@
#include <zephyr/device.h>
#include "bootutil/bootutil_public.h"

#if CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER != -1
/* Sysbuild */
#define NET_CORE_IMAGE CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER
#else
/* Legacy child/parent */
#define NET_CORE_IMAGE 1
#endif

int boot_read_swap_state_primary_slot_hook(int image_index,
struct boot_swap_state *state)
{
if (image_index == 1) {
if (image_index == NET_CORE_IMAGE) {
/* Pretend that primary slot of image 1 unpopulated */
state->magic = BOOT_MAGIC_UNSET;
state->swap_type = BOOT_SWAP_TYPE_NONE;
Expand Down
Loading