-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Is your enhancement proposal related to a problem? Please describe.
At the moment it is possible to generate images for a specific partition by using zephyr,code-partition = &partition in the dts.
However it is not possible to specify the size of the header. This is specified by e.g. selecting CONFIG_USE_MCUBOOT = y.
If it would be possible to specify the header size in the dts by using (e.g. zephyr,code-header-size = <0x200> the generation of images for any bootloader would be simplified by creating an appropriate overlay.
The zephyr default that does not specify zephyr,code-partition or zephyr,code-header-size would generate an image for the complete flash0.
A dts that specifies zephyr,code-partition but not zephyr,code-header-size would generate a image for code-partition starting at the start of the partition. Using a dts that specifies an image partition and a storage partition would avoid that the image overflows in the storage partition. This could be the default dts for boards that are using the storage area.
A dts that specifies zephyr, code-partition and zephyr,code-header-size would generate a image for code-partition but starting after the code-header-size. This could be specified in a mcuboot dts that includes (redefines) partitioning and redefines zephyr,code-partition and sets zephyr,code-header-size = <0x200>.
Describe alternatives you've considered
Alternative solutions have been proposed in #27974 and #31073 (side benefit).