apache / mynewt-mcumgr

Apache mynewt
https://mynewt.apache.org/
99 stars 76 forks source link

cmd: img_mgmt: Add multi-image support in img_mgmt/_state #131

Closed sigvartmh closed 3 years ago

sigvartmh commented 3 years ago

Add multi-image support in img_mgmt for zephyr and general implementations. By setting the CONFIG_UPDATEABLE_IMAGE_NUMBER it will iterate over more images and use _multi implementations in zephyr.

Signed-off-by: Sigvart Hovland sigvart.hovland@nordicsemi.no

sigvartmh commented 3 years ago

@de-nordic @nvlsianpu I'm pretty sure that we don't have the CONFIG symbols available in mynewt but I don't know this code base so well. This is at least my attempt to add some more multi-image support to the mcumgr library we use.

de-nordic commented 3 years ago

I think I am missing something... why is the change needed?

sigvartmh commented 3 years ago

I think I am missing something... why is the change needed?

So the change is needed to make tooling which uses smp_svr like BLE DFU work with multi-image.

If you don’t have this you cannot activate images using slot > 2 etc. It also helps you using the newtmgr image list command to show all the images and what flags are set on them.

de-nordic commented 3 years ago

I guess the changes to the mcumgr are OK, although I must admin that on the level of mcuboot, my understanding of this is a little bit vague.

de-nordic commented 3 years ago

The Zephyr Kconfig to enable this: https://github.com/zephyrproject-rtos/zephyr/pull/37903

de-nordic commented 3 years ago

This may be closed now.