Skip to content

Commit d608738

Browse files
mgmt: update img_mgmt_slot_in_use for ramload with revert mode
We should not block erasing pending images when using ramload with revert mode, because uploading multiple confirmed images with the same version would brick the device (preventing future FW updates). Update the dependencies of img_mgmt_slot_in_use to account for this. Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
1 parent c5efe37 commit d608738

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ img_mgmt_slot_in_use(int slot)
332332
int active_slot = img_mgmt_active_slot(image);
333333

334334
#if !defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP) && \
335-
!defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD)
335+
!defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD) && \
336+
!defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD_WITH_REVERT)
336337
enum img_mgmt_next_boot_type type = NEXT_BOOT_TYPE_NORMAL;
337338
int nbs = img_mgmt_get_next_boot_slot(image, &type);
338339

0 commit comments

Comments
 (0)