mcuboot icon indicating copy to clipboard operation
mcuboot copied to clipboard

Multi-image: issues with dependencies between images

Open eloisesko opened this issue 2 years ago • 3 comments

Description

I am facing some issues related to dependencies between images in a multi-image project (swap mode). The project is made of 2 images. It looks like it is not possible:

  • to set a dependency on an image with a lower id
  • to set a dependency on an image with a version which has not already been installed and confirmed (swap type BOOT_SWAP_TYPE_NONE)

Steps to reproduce

Starting from:

  • Image 0 v0.0.1
  • Image 1 v0.0.1

I try to perform an update with the following images (all at once):

  • Image 0 v0.0.2
  • Image 1 v0.0.2, dependency on image 0 v0.0.2

(Ideally image 0 would also be dependent on image 1 v0.0.2)

The update fails because it is not possible to set a dependency for image 1 on image 0: when calling boot_verify_slot_dependency for image 1, the values in state for image 0 are not initialized (header, swap_type) since image 0 has not been verified already.

So I tried to perform the following update (all images at once), reversing the dependency:

  • Image 0 v0.0.2, dependency on image 1 v0.0.2
  • Image 1 v0.0.2

This is also not possible because in boot_verify_slot_dependency, since image 1 has swap type `BOOT_SWAP_TYPE_TEST', it will check the secondary slot of image 1. This slot contains the old image v0.0.1 as the swap has already been done for image 1, so the check fails. If I try to update image 1 first then update image 0, it works.

Context

Tested on 1.9.0 but the dependency verification does not seem to have been modified since.

eloisesko avatar Oct 16 '23 14:10 eloisesko

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

github-actions[bot] avatar Apr 15 '24 03:04 github-actions[bot]

Issue is being seen again.

d3zd3z avatar Apr 28 '25 16:04 d3zd3z

@nvlsianpu FYI.

de-nordic avatar Apr 29 '25 13:04 de-nordic

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

github-actions[bot] avatar Oct 27 '25 02:10 github-actions[bot]