Skip to content

Commit 68339ee

Browse files
de-nordicbjarki-andreasen
authored andcommitted
[nrf noup] loader: Do not check reset vector for XIP image
The XIP image, 2, does not have reset vector. Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit d798de3)
1 parent d681d8f commit 68339ee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

boot/bootutil/src/loader.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,16 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
11091109
* overwriting an application written to the incorrect slot.
11101110
* This feature is only supported by ARM platforms.
11111111
*/
1112+
#if MCUBOOT_IMAGE_NUMBER >= 3
1113+
/* Currently the MCUboot can be configured for up to 3 image, where image number 2 is
1114+
* designated for XIP, where it is the second part of image stored in slots of image
1115+
* 0. This part of image is not bootable, as the XIP setup is done by the app in
1116+
* image 0 slot, and it does not carry the reset vector.
1117+
*/
1118+
if (area_id == FLASH_AREA_IMAGE_SECONDARY(2)) {
1119+
goto out;
1120+
}
1121+
#endif
11121122
if (area_id == FLASH_AREA_IMAGE_SECONDARY(BOOT_CURR_IMG(state))) {
11131123
const struct flash_area *pri_fa = BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT);
11141124
struct image_header *secondary_hdr = boot_img_hdr(state, slot);

0 commit comments

Comments
 (0)