Skip to content

bootutil: Selecting proper write_sz for image/slot #2472

@de-nordic

Description

@de-nordic

Currently the write_sz is set per image, which means that primary slot decides on write_sz being used, which may be a problem when device under secondary slot has higher write_sz requirements, like for example primary slot has 4B write block size and external device has 16B.
Current logic does not address that.

We have several options here:

  • set it, for every image, as the highest value among slots - we would have to have slots of the same size, but there wasn't much to save anyway;
  • set that statically for all images, via Kconfig, to highest value - this would require verification run to confirm that the selected can be divided by write size of every slot; this would be bad for setups that have a single device with huge write size, like 128b. This one, except for verification run, would probably give us smaller code footprint, as you do not have to have the size discovery code.

Originally posted by @de-nordic in #2461 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions