Skip to content

Board flash partitions can't be tested in tree #20070

@erwango

Description

@erwango

Is your enhancement proposal related to a problem? Please describe.
Some boards provide a flash partition which is configured to work with a bootloader, generally mcuboot, which is an external component.
This flash partition is also used by in tree components, such as NVS, which use the storage partition that may impose some constraints on the whole flash partition (at least 2 sectors, less that 64Kb for NVS).
So, when trying to test in tree components with this defined partition, we might hit issues that are faced because the board flash partition is made to work with mcuboot and doesn't operate when linked w/o bootloader at start of the flash.

One good example is trying to run NVS on stm32f4 parts.
Due to NVS constraints, 'storage' can only be put in the first 64 Kb of flash. When building a zephyr application w/o mcuboot application is linked to start of flash, so these slots can not be used.
So either we configure partition coherent with the way it is linked in zephyr w/o bootloader and NVS can't be used, either we configure it to be compatible with NVS, but can't be used w/o bootloader.

Describe the solution you'd like
Have a dead simple bootloader in tree that would only allow to link in the defined board partition and jump on defined slot image (zephyr,code-partition) at boot for in-tree application

Describe alternatives you've considered
Pull mcuboot in order to test boards partitions in-tree.

Additional context
#19895

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions