Skip to content

bootutil: Move primary/secondary slot definition to bootutil_public - enum #2431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahasztag
Copy link
Contributor

The slots definitions (BOOT_PRIMARY_SLOT, BOOT_SECONDARY_SLOT) were defined in bootutil_priv.h, which made them unusable for bootloader requests. This commit moves them to bootutil_public.h

@ahasztag ahasztag requested a review from davidvincze as a code owner August 19, 2025 07:49
Comment on lines 133 to 135
#define BOOT_PRIMARY_SLOT 0
#define BOOT_SECONDARY_SLOT 1
#define BOOT_SLOT_COUNT 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

better to be an enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, added the enum, this resulted in a lot of changes needed changing uint32_t -> enum boot_slot

@ahasztag ahasztag force-pushed the move_slots_definition_to_public branch from c551e45 to 91cefd3 Compare August 20, 2025 08:52
@ahasztag ahasztag requested a review from de-nordic as a code owner August 20, 2025 08:52
@ahasztag ahasztag force-pushed the move_slots_definition_to_public branch from 91cefd3 to 6e7c4eb Compare August 20, 2025 08:54
@ahasztag ahasztag requested a review from nordicjm August 20, 2025 08:54
@ahasztag ahasztag force-pushed the move_slots_definition_to_public branch 2 times, most recently from 0776cbf to 30c27c5 Compare August 20, 2025 09:07
@ahasztag ahasztag marked this pull request as draft August 20, 2025 09:10
The slots definitions (BOOT_PRIMARY_SLOT, BOOT_SECONDARY_SLOT)
were defined in bootutil_priv.h, which made them unusable for
bootloader requests. This commit moves them to bootutil_public.h

Signed-off-by: Artur Hadasz <[email protected]>
@ahasztag ahasztag force-pushed the move_slots_definition_to_public branch from 30c27c5 to 0d6ba96 Compare August 20, 2025 09:12
@ahasztag ahasztag marked this pull request as ready for review August 20, 2025 09:12
@ahasztag ahasztag requested a review from d3zd3z as a code owner August 20, 2025 09:12
Comment on lines -6 to +7
- `CONFIG_MCUBOOT_PRIMARY_SLOT_PATH`: MTD partition for the application firmware image PRIMARY slot;
- `CONFIG_MCUBOOT_SECONDARY_SLOT_PATH`: MTD partition for the application firmware image SECONDARY slot;
- `CONFIG_MCUBOOT_SLOT_PRIMARY_PATH`: MTD partition for the application firmware image PRIMARY slot;
- `CONFIG_MCUBOOT_SLOT_SECONDARY_PATH`: MTD partition for the application firmware image SECONDARY slot;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this would be a breaking change so next release would need major version increment @d3zd3z

@ahasztag ahasztag changed the title bootutil: Move primary/secondary slot definition to bootutil_public bootutil: Move primary/secondary slot definition to bootutil_public - enum Aug 21, 2025
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