-
Notifications
You must be signed in to change notification settings - Fork 696
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
Mbed: Remove unused header size config #985
Conversation
Do you know how the header size is getting set on the images? In Zephyr at least, this needs to be known by Zephyr, as it needs to be able to be run with the header, and imgtool needs it, in order to properly pad the image (and write the header). |
In Mbed OS, we set the application start address, which must be (header address + header size). The OS does not know about the bootloader or the header, and cares only about the start address of the application. The responsibility to match the addresses are left to the developer. |
@boraozgen You have to sign off your commit to pass the CI. |
Will do. |
Signed-off-by: Bora Özgen <[email protected]>
8aee277
to
0a01cf8
Compare
I don't think this should be merged. The header size is used in the bootloader. Early on in the Mbed-OS port of Mcuboot, I had minimal configuration options to try to prevent invalid configuration headaches. When @LDong-Arm joined in the effort, he added more configuration options so that developers could explicitly specify their memory configuration. This is more flexible in that advanced users can accommodate other parts of internal flash that may be used for things like non-volatile settings storage, etc. I think the header size declaration is necessary to keep, especially for the bootloader build. |
Where is it used exactly? |
I think it's safe to remove this config:
|
@LDong-Arm exactly. My comment here is also relevant to this topic. |
Yes, the header size is part of the header of the image itself; the bootloader does not have an image size setting per se. |
A quick search of this repo for "MCUBOOT_HEADER_SIZE" shows only the I can't recall exactly why this option was added when I first did the Mbed-OS port. I vaguely recall mcuboot at the time requiring it? Otherwise, the Mbed-OS port used to try and take care of all the configuration math for you. Instead of allowing you to configure things like the application start and size and all that, it would calculate it from these configurations. Regardless, I agree this can be removed. Thanks @boraozgen! |
Removing the header size configuration which apparently does not do anything.
What was the reason behind this parameter? @AGlass0fMilk