Skip to content

arch/Kconfig: add boot memory configuration options - #19831

Open
Laczen wants to merge 1 commit into
apache:masterfrom
Laczen:improve_bootloader_support
Open

arch/Kconfig: add boot memory configuration options#19831
Laczen wants to merge 1 commit into
apache:masterfrom
Laczen:improve_bootloader_support

Conversation

@Laczen

@Laczen Laczen commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Add extra boot memory options to enforce the use of boot memory configuration options. This allows linker files to detect if they should prefer the specified boot memory options. This supports using boot memory config without breaking the existing defconfigs.

Add extra boot memory option to describe the size of an image header when a bootloader would need one.

When using the image header by a bootloader that is in nuttx-apps I would use the PREBUILD mechanism or a equivalent cmake mechanism to set the boot memory configuration and the image header size (using kconfig-tweak).

Impact

None, enabler for improving bootloader support.

Testing

tested on qemu-armv7a:nsh

...
user_main: Exiting
ostest_main: Exiting with status 0
nsh>

@github-actions github-actions Bot added the Size: S The size of the change in this PR is small label Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Comment thread arch/Kconfig
Set this option to enforce using the boot memory configuration if
supported by the linker script.

config FLASH_HEADER_SIZE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but no nuttx code reference these new macro?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, I wanted the OK to do it like that. I can add an example linker modification if wanted.

Add extra boot memory options to enforce the use of boot memory
configuration options. This allows linker files to detect if they
should prefer the specified boot memory options. This supports
using boot memory config without breaking the existing defconfigs.

Add extra boot memory option to describe the size of an image header
when a bootloader would need one.

Add a sample modification for the linker script of nucleo-f411re

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
@Laczen
Laczen force-pushed the improve_bootloader_support branch from 6667445 to 5eb024d Compare August 13, 2026 15:14
@Laczen
Laczen requested a review from raiden00pl as a code owner August 13, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Board: arm Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants