Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: Add estimated image footer size to cache in sysbuild #1849

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

nordicjm
Copy link
Collaborator

Adds MCUboot's estimated overhead footer size to the application's cache when using sysbuild, this allows that information to be propagated to applications which can use the information to reduce the available size for an application, preventing the MCUboot error of image too large to swap.

@nordicjm nordicjm force-pushed the sysbuildmcubootsizething_pr branch from 3f178d2 to 4fa8440 Compare October 31, 2023 09:55
@nordicjm nordicjm marked this pull request as ready for review October 31, 2023 10:09
@nordicjm nordicjm added the area: zephyr Affects the Zephyr port label Oct 31, 2023
@nordicjm nordicjm force-pushed the sysbuildmcubootsizething_pr branch 3 times, most recently from 33e36e4 to 7bc8171 Compare November 8, 2023 09:18
@heinwessels
Copy link
Contributor

I'm not following exactly what this PR will achieve. Will this solve #1845 by letting the application compilation fail? (Meaning imgtool doesn't have to be updated).

@nordicjm
Copy link
Collaborator Author

I'm not following exactly what this PR will achieve. Will this solve #1845 by letting the application compilation fail? (Meaning imgtool doesn't have to be updated).

This means that (when using sysbuild) the application slot size will take into account all overheads that the image has, so in the case of using swap using move this would include the swap data, the image footer (TLV) data, the swap status data. At present you can build images in zephyr that are below the size of a slot, then upload then and mark them for test, at that point MCUboot will reject them saying they are too large, this prevents that issue by preventing such images from compiling entirely until their flash usage is reduced.

@nordicjm nordicjm force-pushed the sysbuildmcubootsizething_pr branch from 7bc8171 to 42e644c Compare December 12, 2023 09:17
Adds MCUboot's estimated overhead footer size to the application's
cache when using sysbuild, this allows that information to be
propagated to applications which can use the information to reduce
the available size for an application, preventing the MCUboot
error of image too large to swap.

Signed-off-by: Jamie McCrae <[email protected]>
Prevents enabling the option to save encrypted TLVs if encryption
support is not enabled, as it is required to make use of this
functionality.

Signed-off-by: Jamie McCrae <[email protected]>
@nordicjm nordicjm force-pushed the sysbuildmcubootsizething_pr branch from 42e644c to ece6b08 Compare December 12, 2023 09:39
@nordicjm nordicjm merged commit e9131ee into mcu-tools:main Dec 12, 2023
55 checks passed
@nordicjm nordicjm deleted the sysbuildmcubootsizething_pr branch December 12, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: zephyr Affects the Zephyr port
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants