Skip to content

android-sparse: Split extents of 4GB or more#325

Merged
michaelolbrich merged 1 commit intopengutronix:masterfrom
pelwell:master
Mar 13, 2026
Merged

android-sparse: Split extents of 4GB or more#325
michaelolbrich merged 1 commit intopengutronix:masterfrom
pelwell:master

Conversation

@pelwell
Copy link
Contributor

@pelwell pelwell commented Mar 9, 2026

The Android sparse image format uses chunk headers that include the (slightly redundant) overall size of each chunk. The size is stored in a 32-bit integer, limiting the maximum chunk size to 2**32 - 1.

Fix a long-standing To Do by implementing the splitting of extents which are 4GB or larger.

The Android sparse image format uses chunk headers that include the
(slightly redundant) overall size of each chunk. The size is stored in
a 32-bit integer, limiting the maximum chunk size to 2**32 - 1.

Fix a long-standing To Do by implementing the splitting of extents which
are 4GB or larger.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell
Copy link
Contributor Author

pelwell commented Mar 9, 2026

FYI, this PR is the result of a real-world failure (https://forums.raspberrypi.com/viewtopic.php?p=2366517#p2366517), albeit one that I have yet to recreate using a real image.

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.

Looks good, thanks.

@michaelolbrich michaelolbrich merged commit baba98f into pengutronix:master Mar 13, 2026
5 checks passed
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