Skip to content

Commit 783f835

Browse files
gchwierbjarki-andreasen
authored andcommitted
[nrf noup] loader: remove cleanup for direct xip mode
Move ifdefs just to not add code for cleanup unusable slot when direct xip mode is enabled to avoid warnings. Signed-off-by: Grzegorz Chwierut <[email protected]> (cherry picked from commit 650d11c)
1 parent 4ef1721 commit 783f835

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boot/bootutil/src/loader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,8 @@ boot_update_security_counter(uint8_t image_index, int slot,
12401240
}
12411241
#endif /* MCUBOOT_HW_ROLLBACK_PROT */
12421242

1243+
#if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD)
1244+
12431245
#if defined(CONFIG_MCUBOOT_CLEANUP_UNUSABLE_SECONDARY) &&\
12441246
(defined(PM_S1_ADDRESS) || defined(CONFIG_SOC_NRF5340_CPUAPP))
12451247

@@ -1321,7 +1323,6 @@ static inline void sec_slot_cleanup_if_unusable(void)
13211323
#endif /* defined(CONFIG_MCUBOOT_CLEANUP_UNUSABLE_SECONDARY) &&\
13221324
defined(PM_S1_ADDRESS) || defined(CONFIG_SOC_NRF5340_CPUAPP) */
13231325

1324-
#if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD)
13251326
/**
13261327
* Determines which swap operation to perform, if any. If it is determined
13271328
* that a swap operation is required, the image in the secondary slot is checked

0 commit comments

Comments
 (0)