[PATCH v4 1/8] disk: Add partition lookup by type GUID functionality

Quentin Schulz quentin.schulz at cherry.de
Thu May 7 15:42:14 CEST 2026


Hi Balaji,

On 4/28/26 9:31 AM, Balaji Selvanathan wrote:
> Introduce part_get_info_by_type_guid() function to enable partition
> lookup using partition type GUID. This complements the existing UUID
> lookup functionality and provides more flexible partition discovery
> mechanisms.
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
> ---
> Changes in v4:
> - No changes
> 
> Changes in v3:
> - Addressed minor corrections in part_get_info_by_type_guid function
> 
> Changes in v2:
> - No changes
> ---
> ---
>   disk/part.c    | 37 +++++++++++++++++++++++++++++++++++++
>   include/part.h | 21 +++++++++++++++++++++
>   2 files changed, 58 insertions(+)
> 
> diff --git a/disk/part.c b/disk/part.c
> index 4923dc44593..4cb3204ac6e 100644
> --- a/disk/part.c
> +++ b/disk/part.c
> @@ -731,6 +731,43 @@ int part_get_info_by_uuid(struct blk_desc *desc, const char *uuid,
>   	return -ENOENT;
>   }
>   
> +int part_get_info_by_type_guid(struct blk_desc *desc, const char *type_guid,
> +			       struct disk_partition *info)
> +{
> +	struct part_driver *part_drv;
> +	int ret;
> +	int i;
> +
> +	if (!CONFIG_IS_ENABLED(PARTITION_TYPE_GUID))

We don't have an xPL symbols for PARTITION_TYPE_GUID so you need to use 
IS_ENABLED(CONFIG_...) here otherwise it won't work in xPL stages.

Or you need to add an xPL symbol for that (see PARTITION_UUIDS and 
SPL_PARTITION_UUIDS).

Cheers,
Quentin


More information about the U-Boot mailing list