[PATCH v4 0/8] Add partition type GUID support for environment
Balaji Selvanathan
balaji.selvanathan at oss.qualcomm.com
Tue Apr 28 09:31:42 CEST 2026
This series adds support for locating partitions using GPT partition
type GUID instead of unique partition UUID. This enables the saveenv
command to work with partitions identified by their type rather than
unique identifiers, providing flexibility for systems where partition
UUIDs may vary across devices but types remain constant.
Patch 1 adds part_get_info_by_type_guid() function support
Patch 2 adds scsi_get_blk_by_type_guid() function support
Patch 3 optimizes scsi_get_blk_by_uuid() function
Patch 4 corrects default value of ENV_SCSI_HW_PARTITION config
Patch 5 adds partition type GUID support and choice-based selection
Patch 6 refactors the env/scsi codes based on the
SCSI partition selection configs
Patch 7 enables partition type GUID configs for QCM6490/QCS9100/QCS615
Patch 8 adds unit test for the partition type GUID lookup functionality
Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
---
Changes in v4:
- Create a seperate patch for scsi_get_blk_by_uuid optimization
- Create a seperate patch for correcting default value of
ENV_SCSI_HW_PARTITION config
- Update help section of ENV_IS_IN_SCSI config
- Add 'select PARTITION_TYPE_GUID' for ENV_SCSI_PART_USE_TYPE_GUID
so that its selected automatically
- In test code, add more asserts to confirm its a kernel partition
- Link to v3: https://lore.kernel.org/u-boot/20260419-type-v3-0-ec49acd6870e@oss.qualcomm.com/
Changes in v3:
- Addressed minor corrections in Patch 1 in part_get_info_by_type_guid function
- Refactor env_scsi_get_part and env_scsi_load functions based
on the choice configs in Patch 3
- Add unit test for the partition type GUID lookup functionality in Patch 5
- Link to v2: https://lore.kernel.org/u-boot/20260109070912.4106466-1-balaji.selvanathan@oss.qualcomm.com/
Changes in v2:
- Compute blk_find_max_devnum(UCLASS_SCSI) only once in scsi_get_blk_by_type_guid()
- Introduce a Kconfig choice config to select between UUID-based
and type GUID-based partition lookup methods.
- Enable above new config in qcom_qcs615_defconfig and qcm6490_defconfig
- Link to v1: https://lore.kernel.org/u-boot/20260108064947.3237361-1-balaji.selvanathan@oss.qualcomm.com/
---
Balaji Selvanathan (8):
disk: Add partition lookup by type GUID functionality
scsi: Add partition lookup by type GUID for SCSI devices
scsi: Optimize scsi_get_blk_by_uuid() loop iteration
env: scsi: Fix ENV_SCSI_HW_PARTITION default value type
env: scsi: Add partition type GUID support and choice-based selection
env: scsi: Implement partition type GUID lookup
configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards
test: dm: Add partition type GUID lookup test
configs/qcm6490_defconfig | 4 +++
configs/qcom_qcs615_defconfig | 4 +++
configs/qcom_qcs9100_defconfig | 3 +-
disk/part.c | 37 ++++++++++++++++++++++
drivers/scsi/scsi-uclass.c | 28 +++++++++++++++--
env/Kconfig | 70 +++++++++++++++++++++++++++++++++---------
env/scsi.c | 43 +++++++++++++++-----------
include/part.h | 21 +++++++++++++
include/scsi.h | 11 +++++++
test/dm/part.c | 49 +++++++++++++++++++++++++++++
10 files changed, 234 insertions(+), 36 deletions(-)
---
base-commit: 4433253ecf2041f9362a763bb6cb79960921ac7e
change-id: 20260428-type-7dc867309086
Best regards,
--
Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
More information about the U-Boot
mailing list