Skip to content

Conversation

@abdelkhalek-mansouri
Copy link

@abdelkhalek-mansouri abdelkhalek-mansouri commented Mar 3, 2025

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]

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]>
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.

1 participant