Detached partition entry - #6056
Merged
Merged
Conversation
bugadani
reviewed
Aug 5, 2026
Comment on lines
+615
to
+621
| pub(crate) offset: u32, | ||
| pub(crate) len: u32, | ||
| pub(crate) partition_type: PartitionType, | ||
| pub(crate) read_only: bool, | ||
| /// Whether the partition is effectively encrypted (see | ||
| /// `PartitionEntry::is_effectively_encrypted`). | ||
| pub(crate) encrypted: bool, |
Contributor
There was a problem hiding this comment.
It's very hard to discover that this is basically half of the meaningful changes in this PR.
bugadani
reviewed
Aug 5, 2026
Comment on lines
+28
to
+29
| pub struct PartitionEntry { | ||
| pub(crate) binary: [u8; RAW_ENTRY_LEN], |
Contributor
There was a problem hiding this comment.
And this one is the other half.
Contributor
Author
There was a problem hiding this comment.
I could split off a followup PR just containing the last commit - or would a more detailed description help?
Just judging by the changed-LOCs I assumed the PR is small enough
Contributor
There was a problem hiding this comment.
this is fine, I'm just pointing at these trying to help 😅
SergioGasquez
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4838
Related #4687
Supersedes #4839
The general idea of the two issues is that if
PartitionEntrydoesn't referencePartitionTablelifetimes get easier and users can drop thePartitionTableif all they need is one (or a few) entries.The original PR mandated to use
zerocopywhich is a nice idea in general but that crate is not used by any of our other crates and adds a non neglectable compile time penalty. In additionesp-bootloader-esp-idfis included in the dependency tree of basically every binary crate today. (And partition-table etc. is non-optional today - something we might want to reconsider)While this doesn't help when using e.g. the
OtaHelper(in fact it's using a little bit more stack space temporarily) it helps in other situations - e.g. when just needing access to a single data partition during the whole life-time of an application.Changelog
esp-bootloader-esp-idf
PartitionEntryis now no longer lifetime-tied toPartitionTable.