Skip to content

Commit 33a4201

Browse files
committed
[nrf noup] boot: bootutil: loader: Fix scope of NSIB variable
nrf-squash! [nrf noup] treewide: Add support for sysbuild assigned images Fixes the wrong scope of a variable which would cause a compilation to fail if b0 is enabled and slot0 validation is not enabled Signed-off-by: Jamie McCrae <[email protected]>
1 parent f123819 commit 33a4201

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

boot/bootutil/src/loader.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3075,14 +3075,17 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
30753075
*/
30763076
}
30773077

3078-
#ifdef MCUBOOT_VALIDATE_PRIMARY_SLOT
30793078
#ifdef PM_S1_ADDRESS
30803079
/* Patch needed for NCS. Image 1 primary is the currently
30813080
* executing MCUBoot image, and is therefore already validated by NSIB and
30823081
* does not need to also be validated by MCUBoot.
30833082
*/
30843083
bool image_validated_by_nsib = BOOT_CURR_IMG(state) ==
30853084
CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER;
3085+
#endif
3086+
3087+
#ifdef MCUBOOT_VALIDATE_PRIMARY_SLOT
3088+
#ifdef PM_S1_ADDRESS
30863089
if (!image_validated_by_nsib)
30873090
#endif
30883091
{

0 commit comments

Comments
 (0)