Skip to content

Commit

Permalink
[nrf noup] loader: remove cleanup for direct xip mode
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
gchwier authored and anangl committed Jun 28, 2024
1 parent ec59c38 commit 3853d26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,8 @@ boot_update_security_counter(uint8_t image_index, int slot,
}
#endif /* MCUBOOT_HW_ROLLBACK_PROT */

#if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD)

#if defined(CONFIG_MCUBOOT_CLEANUP_UNUSABLE_SECONDARY) &&\
(defined(PM_S1_ADDRESS) || defined(CONFIG_SOC_NRF5340_CPUAPP))

Expand Down Expand Up @@ -1269,7 +1271,6 @@ static inline void sec_slot_cleanup_if_unusable(void)
#endif /* defined(CONFIG_MCUBOOT_CLEANUP_UNUSABLE_SECONDARY) &&\
defined(PM_S1_ADDRESS) || defined(CONFIG_SOC_NRF5340_CPUAPP) */

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

0 comments on commit 3853d26

Please sign in to comment.