-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
mgmt: mcumgr: grp: img_mgmt: Add optional max image size reduction #66615
Conversation
Note: setting this to a non-disabled option will prevent uploading of padded and | ||
confirmed images, if support for that is required then this feature should be left as | ||
disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible for us to develop MCUboot/bootutil function that would check the image for valid footer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible, well, depending on what you mean by valid footer. Only MCUboot can confirm the image properly due to possibly being encrypted, an application could do some minor validation but nothing more than that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually you can use imgtool to pad, confirm and encrypt image.
But yes, I guess you can not check the footer if the MCUboot only knows the key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can't check that here because to check that you need to receive the whole image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image slot trailer, the one that stores swap bits, etc, is not encrypted. actually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not encrypted no but only mcuboot can verify that it is a valid image or supported on that device, the application can't know anything more than the basic validity of parts of the image
config MCUMGR_GRP_IMG_TOO_LARGE_BOOTLOADER_INFO | ||
bool "Via retention bootloader info" | ||
depends on RETENTION_BOOTLOADER_INFO_OUTPUT_FUNCTION | ||
help | ||
Will fetch the maximum image size from the bootloader info retention subsystem module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to, also, provide this info at compile time. At all we are able to calculate space needed for footer in MCUboot, when we know size of slot and write block size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is provided at compile time when using the sysbuild option. If not using sysbuild then you cannot get that information
5cce3f2
to
3a51b22
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
23ba39f
to
6071453
Compare
Adds firmware uploader to the output of bootloader mode for MCUboot Signed-off-by: Jamie McCrae <[email protected]>
Adds support for an overhead size which MCUboot can set when using sysbuild, this can be used to check the provided size of an application being uploaded to ensure it will fit and swap without being rejected Signed-off-by: Jamie McCrae <[email protected]>
Update Zephyr fork of MCUboot to revision: a4eda30f5b0cfd0cf15512be9dcd559239dbfc91 Brings following Zephyr relevant fixes: - a4eda30f zephyr: Add estimated size of update trailer to sysbuild - 205d7e5b boot_serial: Adapt to zcbor 0.8.x Signed-off-by: Jamie McCrae <[email protected]>
Adds an optional feature that can be used to reduce the maximum allowed image upload file size whereby an image could be uploaded that would be too large to swap even if it could fit the partition Signed-off-by: Jamie McCrae <[email protected]>
6071453
to
28af6eb
Compare
Adds an optional feature that can be used to reduce the maximum allowed image upload file size whereby an image could be uploaded that would be too large to swap even if it could fit the partition
Fixes #46194