HomeFreeBSD

release: make SD card partition layout more flexible

Description

release: make SD card partition layout more flexible

Currently the partition layout is hardcoded to create an EFI/FAT
partition and a UFS root partition, with some logic to handle GPT/MBR
differences.

On RISC-V platforms we are seeing the emerging pattern that firmware
should be placed in a partition of a known type, rather than just a
known sector of the disk. Thus, some functionality is needed to
customize the layout for SD card images.

Add a hook, arm_create_partitions(), which can be overridden to insert
additional platform-specific partitions, possibly preceding the standard
EFI and UFS ones. A couple of new variables are added to track the
indices, e.g. ROOTFSPART_SUFFIX=p2.

In a couple places this de-duplicates the GPT/MBR logic.

Reviewed by: manu, karels, imp
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43848

Details

Provenance
mhorneAuthored on Feb 14 2024, 3:12 PM
Reviewer
manu
Differential Revision
D43848: release: make SD card partition layout more flexible
Parents
rG94b86c12f14e: release: de-duplicate arm.subr fstab logic
Branches
Unknown
Tags
Unknown