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:Thomas Altenbach <thomas.altenbach@legrand.com> (cherry picked from commit d00b11dc)
Loading
Please sign in to comment