Skip to content

Extending zephyr,code-partition with zephyr,code-header-size  #31400

@Laczen

Description

@Laczen

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementChanges/Updates/Additions to existing features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions