Skip to content

Commit

Permalink
[nrf noup] sysflash: check if B0 address is present
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hakonfam authored and SebastianBoe committed Sep 3, 2021
1 parent 0f7f422 commit 480f913
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boot/zephyr/include/sysflash/sysflash.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

#elif (MCUBOOT_IMAGE_NUMBER == 2)

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

extern uint32_t _image_1_primary_slot_id[];

Expand Down Expand Up @@ -49,7 +52,7 @@ extern uint32_t _image_1_primary_slot_id[];
PM_MCUBOOT_SECONDARY_1_ID: \
255 )

#endif /* CONFIG_SECURE_BOOT */
#endif /* PM_B0_ADDRESS */

#endif
#define FLASH_AREA_IMAGE_SCRATCH PM_MCUBOOT_SCRATCH_ID
Expand Down

0 comments on commit 480f913

Please sign in to comment.