Skip to content

Conversation

@Bastian-Krause
Copy link
Member

Previously, partitions not included in a partition table were required to always reference an image.

However, it can be useful to define such partitions without an image, for example, for "barebox-env" or "barebox-state" regions at fixed offsets in legacy MBR setups. These partitions are typically populated at runtime and therefore do not need an image.

To ensure that flashing a sparse image variant results in a well-defined state, these partitions should be explicitly filled with zeros to overwrite any existing data.

So allow partitions not present in the partition table, without an image, to be filled with zeros, e.g.:

partition barebox-environment {
        size = 128K
        in-partition-table = false
        sparse = false
}

Previously, partitions not included in a partition table were required
to always reference an image.

However, it can be useful to define such partitions without an image,
for example, for "barebox-env" or "barebox-state" regions at fixed
offsets in legacy MBR setups. These partitions are typically populated at
runtime and therefore do not need an image.

To ensure that flashing a sparse image variant results in a well-defined
state, these partitions should be explicitly filled with zeros to
overwrite any existing data.

So allow partitions not present in the partition table, without an
image, to be filled with zeros, e.g.:

  partition barebox-environment {
    size = 128K
    in-partition-table = false
    sparse = false
  }

Signed-off-by: Bastian Krause <[email protected]>
@Bastian-Krause Bastian-Krause force-pushed the bst/zeroed-imageless-part-not-in-parttable branch from d2c65f8 to 6ab44d5 Compare November 24, 2025 15:01
Copy link
Member

@michaelolbrich michaelolbrich left a comment

Choose a reason for hiding this comment

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

lgtm

@michaelolbrich michaelolbrich merged commit faf24ce into pengutronix:master Nov 25, 2025
5 checks passed
@Bastian-Krause Bastian-Krause deleted the bst/zeroed-imageless-part-not-in-parttable branch November 25, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants