Skip to content
Commit 61e1264b authored by Thomas Altenbach's avatar Thomas Altenbach Committed by Jamie McCrae
Browse files

boot: bootutil: Take into account scratch trailer when computing max image size



When using swap-scratch and the trailer is larger than a single sector,
the sector containing the last part of the firmware data might only
contain a very small part of the trailer and some padding might be
necessary between the end of the firmware image and the beginning of the
trailer to ensure the scratch trailer won't be overwritten when copying
that sector to the scratch area.

This commit updates the 'bootutil_max_image_size' routine to take that
padding into account.

Note: This PR has been modified from the upstream commit due to
a merge failure from other changes that are not being brought into
Zephyr 3.7

Signed-off-by: default avatarThomas Altenbach <thomas.altenbach@legrand.com>
(cherry picked from commit d00b11dc)
parent 1a50ec2f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment