Skip to content

Commit cbcf81e

Browse files
tomchyjhedberg
authored andcommitted
mcumgr: Enable permanent updates in overwrite mode
It is essential for the overwrite mode to allow confirming the secondary slot to provide the permanent update. This types of updates is the only mode in which the application may be upgraded. Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 2e0d9ed commit cbcf81e

File tree

1 file changed

+6
-2
lines changed
  • subsys/mgmt/mcumgr/grp/img_mgmt

1 file changed

+6
-2
lines changed

subsys/mgmt/mcumgr/grp/img_mgmt/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,22 @@ config MCUMGR_GRP_IMG_REJECT_DIRECT_XIP_MISMATCHED_SLOT
118118
using the --rom-fixed command line option.
119119

120120
config MCUMGR_GRP_IMG_ALLOW_CONFIRM_NON_ACTIVE_SLOT
121-
bool "Allow to confirm non-active slots of any image"
121+
bool "Allow to confirm non-active slots of any image" if !MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY
122122
depends on MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT || \
123123
MCUBOOT_BOOTLOADER_MODE_RAM_LOAD_WITH_REVERT || \
124124
MCUBOOT_BOOTLOADER_MODE_SWAP_SCRATCH || \
125125
MCUBOOT_BOOTLOADER_MODE_SWAP_USING_MOVE || \
126-
MCUBOOT_BOOTLOADER_MODE_SWAP_USING_OFFSET
126+
MCUBOOT_BOOTLOADER_MODE_SWAP_USING_OFFSET || \
127+
MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY
127128
default y
128129
help
129130
Allows to confirm non-active slot of any image.
130131
Normally it should not be allowed to confirm any slots via MCUmgr
131132
commands, to prevent confirming something that is broken and was not
132133
verified to boot correctly.
134+
Option always enabled in the overwrite mode, because the permanent
135+
update, that uses the confirm flag, is the intended way to provide
136+
updates.
133137

134138
config MCUMGR_GRP_IMG_FRUGAL_LIST
135139
bool "Omit zero, empty or false values from status list"

0 commit comments

Comments
 (0)