Add support for A/B partition layout in rpi-sdimg class #1428
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.
Description:
This patch introduces support for an A/B partition layout in the rpi-sdimg image creation process, enabling dual root filesystem partitions. This enhancement allows for more robust and flexible system updates by providing a fallback partition.
Key Changes:
New Variables Introduced:
ROOTFS_PARTITION_SIZE: Specifies the size of each root filesystem partition. The default value is set to 4 GB. RPI_AB_PARTITION_LAYOUT: Determines the partition layout. The default value is 0, which indicates a single root filesystem partition. Setting this variable to 1 enables the A/B partition layout.
Disk Layout:
Single Partition Layout:
0 -> IMAGE_ROOTFS_ALIGNMENT - reserved for other data
IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - bootloader and kernel
BOOT_SPACE -> SDIMG_SIZE - rootfs
A/B Partition Layout:
0 -> IMAGE_ROOTFS_ALIGNMENT - reserved for other data
IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - bootloader and kernel
BOOT_SPACE -> ROOTFS_A - rootfs for partition A
ROOTFS_A -> ROOTFS_B - rootfs for partition B
Signed-off-by: abdelkhalek-mansouri [email protected]