Skip to content

Conversation

pdgendt
Copy link

@pdgendt pdgendt commented Sep 15, 2025

Allow setting CONFIG_MCUBOOT_BOOT_MAX_ALIGN to apply a custom programmable block in flash.

Allow setting CONFIG_MCUBOOT_BOOT_MAX_ALIGN to apply a custom
programmable block in flash.

Signed-off-by: Pieter De Gendt <[email protected]>
Comment on lines +433 to +435
#if defined(CONFIG_MCUBOOT_BOOT_MAX_ALIGN) && CONFIG_MCUBOOT_BOOT_MAX_ALIGN > 0
#define MCUBOOT_BOOT_MAX_ALIGN CONFIG_MCUBOOT_BOOT_MAX_ALIGN
#elif DT_HAS_CHOSEN(zephyr_flash)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have these dt_ macros to use with Kconfig, can we maybe move the entire logic to Kconfig?

Copy link
Author

Choose a reason for hiding this comment

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

Probably, yes but this fix should make that backwards compatible, no?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah. So you set the Kconfig to defaults as the logic states here, but people can still override it. Wouldn't that make it backwards compatible?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This way we also have only one place where it is set: the Kconfig; there would no "if Kconfig is 0 then", because it could only be 0 if we allow somebody to set it as such in Kconfig.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants