Skip to content

Commit 480f913

Browse files
hakonfamSebastianBoe
authored andcommitted
[nrf noup] sysflash: check if B0 address is present
instead of checking if CONFIG_SECURE_BOOT is set. This because CONFIG_SECURE_BOOT is only set for the parent image. Ref: NCSDK-10375 Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
1 parent 0f7f422 commit 480f913

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

boot/zephyr/include/sysflash/sysflash.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
#elif (MCUBOOT_IMAGE_NUMBER == 2)
1818

19-
#ifdef CONFIG_SECURE_BOOT
19+
/* If B0 is present then two bootloaders are present, and we must use
20+
* a single secondary slot for both primary slots.
21+
*/
22+
#ifdef PM_B0_ADDRESS
2023

2124
extern uint32_t _image_1_primary_slot_id[];
2225

@@ -49,7 +52,7 @@ extern uint32_t _image_1_primary_slot_id[];
4952
PM_MCUBOOT_SECONDARY_1_ID: \
5053
255 )
5154

52-
#endif /* CONFIG_SECURE_BOOT */
55+
#endif /* PM_B0_ADDRESS */
5356

5457
#endif
5558
#define FLASH_AREA_IMAGE_SCRATCH PM_MCUBOOT_SCRATCH_ID

0 commit comments

Comments
 (0)