* [PATCH v4 0/8] Add partition type GUID support for environment
@ 2026-04-28 7:31 Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality Balaji Selvanathan
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan, Simon Glass
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@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@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-05-07 13:42 ` Quentin Schulz
2026-04-28 7:31 ` [PATCH v4 2/8] scsi: Add partition lookup by type GUID for SCSI devices Balaji Selvanathan
` (6 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
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@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@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))
+ return -ENOENT;
+
+ part_drv = part_driver_lookup_type(desc);
+ if (!part_drv)
+ return -ENOENT;
+
+ for (i = 1; i <= part_drv->max_entries; i++) {
+ ret = part_driver_get_info(part_drv, desc, i, info);
+ if (ret) {
+ /* -ENOSYS means no ->get_info method. */
+ if (ret == -ENOSYS)
+ return ret;
+ /*
+ * Partition with this index can't be obtained, but
+ * further partitions might be, so keep checking.
+ */
+ continue;
+ }
+
+ if (!strncasecmp(type_guid, disk_partition_type_guid(info),
+ UUID_STR_LEN)) {
+ /* matched */
+ return i;
+ }
+ }
+
+ return -ENOENT;
+}
+
/**
* Get partition info from device number and partition name.
*
diff --git a/include/part.h b/include/part.h
index 15daacd7faa..32614bd085b 100644
--- a/include/part.h
+++ b/include/part.h
@@ -327,6 +327,20 @@ int part_get_info_by_name(struct blk_desc *desc, const char *name,
int part_get_info_by_uuid(struct blk_desc *desc, const char *uuid,
struct disk_partition *info);
+/**
+ * part_get_info_by_type_guid() - Search for a partition by type GUID
+ * among all available registered partitions
+ *
+ * @desc: block device descriptor
+ * @type_guid: the specified partition type GUID
+ * @info: the disk partition info
+ *
+ * Return: the partition number on match (starting on 1), -ENOENT on no match,
+ * otherwise error
+ */
+int part_get_info_by_type_guid(struct blk_desc *desc, const char *type_guid,
+ struct disk_partition *info);
+
/**
* part_get_info_by_dev_and_name_or_num() - Get partition info from dev number
* and part name, or dev number and
@@ -404,6 +418,13 @@ static inline int part_get_info_by_uuid(struct blk_desc *desc, const char *uuid,
return -ENOENT;
}
+static inline int part_get_info_by_type_guid(struct blk_desc *desc,
+ const char *type_guid,
+ struct disk_partition *info)
+{
+ return -ENOENT;
+}
+
static inline int
part_get_info_by_dev_and_name_or_num(const char *dev_iface,
const char *dev_part_str,
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 2/8] scsi: Add partition lookup by type GUID for SCSI devices
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-05-01 2:12 ` Simon Glass
2026-04-28 7:31 ` [PATCH v4 3/8] scsi: Optimize scsi_get_blk_by_uuid() loop iteration Balaji Selvanathan
` (5 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan, Simon Glass
Introduce scsi_get_blk_by_type_guid() function to enable SCSI
partition discovery using partition type GUID. This function scans
all available SCSI devices and searches for a partition matching the
specified type GUID.
Reviewed-by: Simon Glass <simon.glass@canonical.com>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Kept only scsi_get_blk_by_type_guid related changes
- Removed scsi_get_blk_by_uuid changes
Changes in v3:
- No changes
Changes in v2:
- Compute blk_find_max_devnum(UCLASS_SCSI) only once in scsi_get_blk_by_type_guid()
---
drivers/scsi/scsi-uclass.c | 23 +++++++++++++++++++++++
include/scsi.h | 11 +++++++++++
2 files changed, 34 insertions(+)
diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
index 39b4c7476d4..cea6d771f7c 100644
--- a/drivers/scsi/scsi-uclass.c
+++ b/drivers/scsi/scsi-uclass.c
@@ -47,6 +47,29 @@ int scsi_get_blk_by_uuid(const char *uuid,
return -ENODEV;
}
+int scsi_get_blk_by_type_guid(const char *type_guid,
+ struct blk_desc **blk_desc_ptr,
+ struct disk_partition *part_info_ptr)
+{
+ struct blk_desc *blk;
+ int i, ret, max;
+
+ max = blk_find_max_devnum(UCLASS_SCSI) + 1;
+ for (i = 0; i < max; i++) {
+ ret = blk_get_desc(UCLASS_SCSI, i, &blk);
+ if (ret)
+ continue;
+
+ ret = part_get_info_by_type_guid(blk, type_guid, part_info_ptr);
+ if (ret > 0) {
+ *blk_desc_ptr = blk;
+ return 0;
+ }
+ }
+
+ return -ENODEV;
+}
+
int scsi_bus_reset(struct udevice *dev)
{
struct scsi_ops *ops = scsi_get_ops(dev);
diff --git a/include/scsi.h b/include/scsi.h
index 2520a8b8fe6..83aaf0a70f6 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -366,6 +366,17 @@ int scsi_scan_dev(struct udevice *dev, bool verbose);
int scsi_get_blk_by_uuid(const char *uuid, struct blk_desc **blk_desc_ptr,
struct disk_partition *part_info_ptr);
+/**
+ * scsi_get_blk_by_type_guid() - Provides SCSI partition information by type GUID.
+ *
+ * @type_guid: Type GUID of the partition for fetching its info
+ * @blk_desc_ptr: Provides the blk descriptor
+ * @part_info_ptr: Provides partition info
+ * Return: 0 if OK, -ve on error
+ */
+int scsi_get_blk_by_type_guid(const char *type_guid, struct blk_desc **blk_desc_ptr,
+ struct disk_partition *part_info_ptr);
+
#define SCSI_IDENTIFY 0xC0 /* not used */
/* Hardware errors */
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 3/8] scsi: Optimize scsi_get_blk_by_uuid() loop iteration
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 2/8] scsi: Add partition lookup by type GUID for SCSI devices Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 4/8] env: scsi: Fix ENV_SCSI_HW_PARTITION default value type Balaji Selvanathan
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
Compute blk_find_max_devnum(UCLASS_SCSI) only once instead of
on every loop iteration for better performance.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Newly created in v4
- Has only scsi_get_blk_by_uuid changes
---
drivers/scsi/scsi-uclass.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
index cea6d771f7c..031dc01b9de 100644
--- a/drivers/scsi/scsi-uclass.c
+++ b/drivers/scsi/scsi-uclass.c
@@ -30,9 +30,10 @@ int scsi_get_blk_by_uuid(const char *uuid,
struct disk_partition *part_info_ptr)
{
struct blk_desc *blk;
- int i, ret;
+ int i, ret, max;
- for (i = 0; i < blk_find_max_devnum(UCLASS_SCSI) + 1; i++) {
+ max = blk_find_max_devnum(UCLASS_SCSI) + 1;
+ for (i = 0; i < max; i++) {
ret = blk_get_desc(UCLASS_SCSI, i, &blk);
if (ret)
continue;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 4/8] env: scsi: Fix ENV_SCSI_HW_PARTITION default value type
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
` (2 preceding siblings ...)
2026-04-28 7:31 ` [PATCH v4 3/8] scsi: Optimize scsi_get_blk_by_uuid() loop iteration Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 5/8] env: scsi: Add partition type GUID support and choice-based selection Balaji Selvanathan
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
Change the default value from integer 0 to string "0" to match
the string type of the configuration option.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Newly created in v4
---
env/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/env/Kconfig b/env/Kconfig
index 7abd82ab6f3..71a27894f90 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -783,7 +783,7 @@ config ENV_MMC_USE_DT
config ENV_SCSI_HW_PARTITION
string "SCSI hardware partition number"
depends on ENV_IS_IN_SCSI
- default 0
+ default "0"
help
SCSI hardware partition device number on the platform where the
environment is stored. Note that this is not related to any software
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 5/8] env: scsi: Add partition type GUID support and choice-based selection
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
` (3 preceding siblings ...)
2026-04-28 7:31 ` [PATCH v4 4/8] env: scsi: Fix ENV_SCSI_HW_PARTITION default value type Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 6/8] env: scsi: Implement partition type GUID lookup Balaji Selvanathan
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
Add support for locating SCSI environment partition using GPT type
GUID.
Introduce a Kconfig choice statement to select between three
mutually exclusive partition lookup methods: UUID-based (default),
type GUID-based, and hardware partition number.
Reorganize existing configs to depend on their respective choice
options. Update ENV_IS_IN_SCSI help text to document the
new configuration structure.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Has only changes related to introducing choice configs
Changes in v3:
- Introduce a new choice config: ENV_SCSI_PART_USE_HW for
ENV_SCSI_HW_PARTITION
- Refactor env_scsi_get_part and env_scsi_load functions based
on the choice configs
Changes in v2:
- Introduce a Kconfig choice config to select between UUID-based
and type GUID-based partition lookup methods.
---
env/Kconfig | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 54 insertions(+), 14 deletions(-)
diff --git a/env/Kconfig b/env/Kconfig
index 71a27894f90..f59b2acb7e6 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -299,16 +299,20 @@ config ENV_IS_IN_SCSI
The size of the partition where the environment is stored in bytes. Must
be a multiple of the partition block size.
- - CONFIG_ENV_SCSI_HW_PARTITION:
+ The partition selection method is configured via a choice statement:
- Specifies which SCSI partition the environment is stored in. If not
- set, defaults to partition 0, the user area. Common values might be
- 1 (first SCSI boot partition), 2 (second SCSI boot partition). Ignored
- if CONFIG_ENV_SCSI_PART_UUID is set to non-empty string.
+ - ENV_SCSI_PART_USE_UUID: Use the partition's unique UUID to identify
+ the SCSI partition for environment storage.
- - CONFIG_ENV_SCSI_PART_UUID:
+ - ENV_SCSI_PART_USE_TYPE_GUID: Use the partition type GUID to identify
+ the SCSI partition for environment storage. The first partition
+ matching the specified type GUID will be used.
- UUID of the SCSI partition where the environment is stored.
+ - ENV_SCSI_PART_USE_HW: Use the hardware device number to identify
+ the SCSI device for environment storage. Specifies which SCSI
+ partition the environment is stored in. If not set, defaults to
+ partition 0, the user area. Common values might be 1 (first SCSI
+ boot partition), 2 (second SCSI boot partition).
config ENV_RANGE
@@ -780,9 +784,51 @@ config ENV_MMC_USE_DT
The 2 defines CONFIG_ENV_OFFSET, CONFIG_ENV_OFFSET_REDUND
are not used as fallback.
+choice
+ prompt "SCSI partition selection method"
+ depends on ENV_IS_IN_SCSI
+ default ENV_SCSI_PART_USE_UUID
+ help
+ Select the method to identify the SCSI partition for environment storage.
+
+config ENV_SCSI_PART_USE_UUID
+ bool "Use partition UUID"
+ help
+ Use the partition's unique UUID to identify the SCSI partition
+ for environment storage.
+
+config ENV_SCSI_PART_USE_TYPE_GUID
+ bool "Use partition type GUID"
+ select PARTITION_TYPE_GUID
+ help
+ Use the partition type GUID to identify the SCSI partition
+ for environment storage. The first partition matching the
+ specified type GUID will be used.
+
+config ENV_SCSI_PART_USE_HW
+ bool "Use hardware partition number"
+ help
+ Use the hardware device number to identify the SCSI device
+ for environment storage.
+
+endchoice
+
+config ENV_SCSI_PART_UUID
+ string "SCSI partition UUID for saving environment"
+ depends on ENV_SCSI_PART_USE_UUID
+ help
+ UUID of the SCSI partition that you want to store the environment in.
+
+config ENV_SCSI_PART_TYPE_GUID
+ string "SCSI partition type GUID for saving environment"
+ depends on ENV_SCSI_PART_USE_TYPE_GUID
+ help
+ Type GUID of the SCSI partition to store the environment in.
+ Uses the first partition matching this type GUID.
+
config ENV_SCSI_HW_PARTITION
string "SCSI hardware partition number"
- depends on ENV_IS_IN_SCSI
+ depends on ENV_SCSI_PART_USE_HW
default "0"
help
SCSI hardware partition device number on the platform where the
@@ -791,12 +837,6 @@ config ENV_SCSI_HW_PARTITION
partition 0 or the first boot partition, which is 1 or some other defined
partition.
-config ENV_SCSI_PART_UUID
- string "SCSI partition UUID for saving environment"
- depends on ENV_IS_IN_SCSI
- help
- UUID of the SCSI partition that you want to store the environment in.
-
config ENV_USE_DEFAULT_ENV_TEXT_FILE
bool "Create default environment from file"
depends on !COMPILE_TEST
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 6/8] env: scsi: Implement partition type GUID lookup
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
` (4 preceding siblings ...)
2026-04-28 7:31 ` [PATCH v4 5/8] env: scsi: Add partition type GUID support and choice-based selection Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 7/8] configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 8/8] test: dm: Add partition type GUID lookup test Balaji Selvanathan
7 siblings, 0 replies; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
Update env/scsi.c to support the new partition selection methods
introduced in the Kconfig. Replace runtime string checks with
compile-time preprocessor conditionals.
Implement support for all three partition selection methods:
- TYPE_GUID: Uses scsi_get_blk_by_type_guid()
- UUID: Uses scsi_get_blk_by_uuid()
- HW: Uses blk_get_device_part_str()
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Has only changes related to Refactor env_scsi_get_part and
env_scsi_load functions based on the choice configs
Changes in v3:
- Introduce a new choice config: ENV_SCSI_PART_USE_HW for
ENV_SCSI_HW_PARTITION
- Refactor env_scsi_get_part and env_scsi_load functions based
on the choice configs
Changes in v2:
- Introduce a Kconfig choice config to select between UUID-based
and type GUID-based partition lookup methods.
---
env/scsi.c | 43 +++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/env/scsi.c b/env/scsi.c
index 91a6c430302..b170f4ee0c7 100644
--- a/env/scsi.c
+++ b/env/scsi.c
@@ -41,14 +41,17 @@ static inline struct env_scsi_info *env_scsi_get_part(void)
is_scsi_scanned = true;
}
- if (CONFIG_ENV_SCSI_PART_UUID[0] == '\0') {
- if (blk_get_device_part_str("scsi", CONFIG_ENV_SCSI_HW_PARTITION,
- &ep->blk, &ep->part, true))
- return NULL;
- } else {
- if (scsi_get_blk_by_uuid(CONFIG_ENV_SCSI_PART_UUID, &ep->blk, &ep->part))
- return NULL;
- }
+#if defined(CONFIG_ENV_SCSI_PART_USE_TYPE_GUID)
+ if (scsi_get_blk_by_type_guid(CONFIG_ENV_SCSI_PART_TYPE_GUID, &ep->blk, &ep->part))
+ return NULL;
+#elif defined(CONFIG_ENV_SCSI_PART_USE_UUID)
+ if (scsi_get_blk_by_uuid(CONFIG_ENV_SCSI_PART_UUID, &ep->blk, &ep->part))
+ return NULL;
+#elif defined(CONFIG_ENV_SCSI_PART_USE_HW)
+ if (blk_get_device_part_str("scsi", CONFIG_ENV_SCSI_HW_PARTITION,
+ &ep->blk, &ep->part, true))
+ return NULL;
+#endif
ep->count = CONFIG_ENV_SIZE / ep->part.blksz;
@@ -95,20 +98,24 @@ static int env_scsi_load(void)
int ret;
if (!ep) {
- if (CONFIG_ENV_SCSI_PART_UUID[0] == '\0')
- env_set_default("SCSI partition " CONFIG_ENV_SCSI_HW_PARTITION " not found", 0);
- else
- env_set_default(CONFIG_ENV_SCSI_PART_UUID " partition not found", 0);
-
+#if defined(CONFIG_ENV_SCSI_PART_USE_TYPE_GUID)
+ env_set_default("partition type " CONFIG_ENV_SCSI_PART_TYPE_GUID " not found", 0);
+#elif defined(CONFIG_ENV_SCSI_PART_USE_UUID)
+ env_set_default(CONFIG_ENV_SCSI_PART_UUID " partition not found", 0);
+#elif defined(CONFIG_ENV_SCSI_PART_USE_HW)
+ env_set_default("SCSI partition " CONFIG_ENV_SCSI_HW_PARTITION " not found", 0);
+#endif
return -ENOENT;
}
if (blk_dread(ep->blk, ep->part.start, ep->count, &envbuf) != ep->count) {
- if (CONFIG_ENV_SCSI_PART_UUID[0] == '\0')
- env_set_default("SCSI partition " CONFIG_ENV_SCSI_HW_PARTITION " read failed", 0);
- else
- env_set_default(CONFIG_ENV_SCSI_PART_UUID " partition read failed", 0);
-
+#if defined(CONFIG_ENV_SCSI_PART_USE_TYPE_GUID)
+ env_set_default("partition type " CONFIG_ENV_SCSI_PART_TYPE_GUID " read failed", 0);
+#elif defined(CONFIG_ENV_SCSI_PART_USE_UUID)
+ env_set_default(CONFIG_ENV_SCSI_PART_UUID " partition read failed", 0);
+#elif defined(CONFIG_ENV_SCSI_PART_USE_HW)
+ env_set_default("SCSI partition " CONFIG_ENV_SCSI_HW_PARTITION " read failed", 0);
+#endif
return -EIO;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 7/8] configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
` (5 preceding siblings ...)
2026-04-28 7:31 ` [PATCH v4 6/8] env: scsi: Implement partition type GUID lookup Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
2026-05-01 8:02 ` Sumit Garg
2026-04-28 7:31 ` [PATCH v4 8/8] test: dm: Add partition type GUID lookup test Balaji Selvanathan
7 siblings, 1 reply; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
Enable CONFIG_PARTITION_TYPE_GUID and configure SCSI environment
partition type GUID for QCS9100, QCM6490 and QCS615 configurations.
This allows these platforms to locate the environment partition
using GPT type GUID instead of UUID.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Add type guid configs to QCS9100 defconfig
Changes in v3:
- No changes
Changes in v2:
- Enable above new config in qcom_qcs615_defconfig and qcm6490_defconfig
---
configs/qcm6490_defconfig | 4 ++++
configs/qcom_qcs615_defconfig | 4 ++++
configs/qcom_qcs9100_defconfig | 3 ++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configs/qcm6490_defconfig b/configs/qcm6490_defconfig
index b088367f86c..9560886a37a 100644
--- a/configs/qcm6490_defconfig
+++ b/configs/qcm6490_defconfig
@@ -16,3 +16,7 @@ CONFIG_DEFAULT_DEVICE_TREE="qcom/qcs6490-rb3gen2"
CONFIG_FASTBOOT_BUF_ADDR=0xd8800000
CONFIG_PHY_QCOM_QMP_COMBO=y
+
+CONFIG_ENV_IS_IN_SCSI=y
+CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
+CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
diff --git a/configs/qcom_qcs615_defconfig b/configs/qcom_qcs615_defconfig
index 27666a8129d..d0ffa567619 100644
--- a/configs/qcom_qcs615_defconfig
+++ b/configs/qcom_qcs615_defconfig
@@ -22,3 +22,7 @@ CONFIG_REMAKE_ELF=y
CONFIG_TEXT_BASE=0x9fc00000
CONFIG_FASTBOOT_BUF_ADDR=0xa1600000
+
+CONFIG_ENV_IS_IN_SCSI=y
+CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
+CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
diff --git a/configs/qcom_qcs9100_defconfig b/configs/qcom_qcs9100_defconfig
index 082106157bb..fbaf21952f2 100644
--- a/configs/qcom_qcs9100_defconfig
+++ b/configs/qcom_qcs9100_defconfig
@@ -11,6 +11,7 @@ CONFIG_REMAKE_ELF=y
CONFIG_FASTBOOT_BUF_ADDR=0xdb300000
CONFIG_DEFAULT_DEVICE_TREE="qcom/qcs9100-ride-r3"
CONFIG_ENV_IS_IN_SCSI=y
-CONFIG_ENV_SCSI_PART_UUID="71cb9cd0-acf1-b6cb-ad91-be9572fe11a9"
+CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
+CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
# CONFIG_ENV_IS_DEFAULT is not set
# CONFIG_ENV_IS_NOWHERE is not set
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 8/8] test: dm: Add partition type GUID lookup test
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
` (6 preceding siblings ...)
2026-04-28 7:31 ` [PATCH v4 7/8] configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards Balaji Selvanathan
@ 2026-04-28 7:31 ` Balaji Selvanathan
7 siblings, 0 replies; 12+ messages in thread
From: Balaji Selvanathan @ 2026-04-28 7:31 UTC (permalink / raw)
To: u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Quentin Schulz, Ilias Apalodimas, Rasmus Villemoes,
Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek,
Balaji Selvanathan
Add a unit test for the partition type GUID lookup functionality. The
test verifies that partitions can be correctly identified by their type
GUID, specifically testing the ChromeOS kernel partition lookup.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
---
Changes in v4:
- Return -EAGAIN instead of EOPNOTSUPP
- Add extra asserts for kernel partition
Changes in v3:
- Add unit test for the partition type GUID lookup functionality
---
test/dm/part.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/test/dm/part.c b/test/dm/part.c
index caae23bd4aa..7a427d3d41d 100644
--- a/test/dm/part.c
+++ b/test/dm/part.c
@@ -8,9 +8,13 @@
#include <mmc.h>
#include <part.h>
#include <part_efi.h>
+#include <asm/global_data.h>
+#include <dm/lists.h>
#include <dm/test.h>
#include <test/ut.h>
+DECLARE_GLOBAL_DATA_PTR;
+
static int do_test(struct unit_test_state *uts, int expected,
const char *part_str, bool whole)
{
@@ -195,3 +199,48 @@ static int dm_test_part_get_info_by_type(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_part_get_info_by_type, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+
+static int dm_test_part_get_info_by_type_guid(struct unit_test_state *uts)
+{
+ struct udevice *dev, *blk_dev;
+ struct blk_desc *desc;
+ struct disk_partition info;
+ ofnode root, node;
+ int partnum;
+
+ if (!IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))
+ return -EAGAIN;
+
+ /* Bind the mmc5 node (ChromeOS image with type GUIDs) */
+ root = oftree_root(oftree_default());
+ node = ofnode_find_subnode(root, "mmc5");
+ ut_assert(ofnode_valid(node));
+ ut_assertok(lists_bind_fdt(gd->dm_root, node, &dev, NULL, false));
+
+ /* Get the MMC device (probes it), then walk MMC -> BLK parent link */
+ ut_assertok(uclass_get_device_by_seq(UCLASS_MMC, 5, &dev));
+ ut_assertok(blk_get_from_parent(dev, &blk_dev));
+ desc = dev_get_uclass_plat(blk_dev);
+ ut_assert(desc);
+
+ /*
+ * Test: look up the first ChromeOS kernel partition by type GUID.
+ * In the ChromeOS image KERN_A is the first partition carrying the
+ * ChromeOS kernel type GUID (fe3a2a5d-...). This is partition 2.
+ */
+ partnum = part_get_info_by_type_guid(desc,
+ "FE3A2A5D-4F32-41A7-B725-ACCC3285A309",
+ &info);
+ ut_asserteq(2, partnum);
+ ut_asserteq_str("KERN_A", info.name);
+
+ /* Test: non-existent GUID must return -ENOENT */
+ ut_asserteq(-ENOENT,
+ part_get_info_by_type_guid(desc,
+ "00000000-0000-0000-0000-000000000000",
+ &info));
+
+ return 0;
+}
+
+DM_TEST(dm_test_part_get_info_by_type_guid, UTF_SCAN_PDATA | UTF_SCAN_FDT);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v4 2/8] scsi: Add partition lookup by type GUID for SCSI devices
2026-04-28 7:31 ` [PATCH v4 2/8] scsi: Add partition lookup by type GUID for SCSI devices Balaji Selvanathan
@ 2026-05-01 2:12 ` Simon Glass
0 siblings, 0 replies; 12+ messages in thread
From: Simon Glass @ 2026-05-01 2:12 UTC (permalink / raw)
To: balaji.selvanathan
Cc: u-boot, Sumit Garg, u-boot-qcom, Tom Rini, Quentin Schulz,
Ilias Apalodimas, Rasmus Villemoes, Simon Glass, Javier Tia,
Mikhail Kshevetskiy, Varadarajan Narayanan,
Javier Martinez Canillas, Richard Genoud, Jan Kiszka,
David Lechner, Casey Connolly, Marek Vasut, Christian Marangi,
Michael Walle, Sumit Garg, Neil Armstrong, Aswin Murugan,
Jerome Forissier, Mattijs Korpershoek, Simon Glass
Hi Balaji,
On 2026-04-28T07:31:42, Balaji Selvanathan
<balaji.selvanathan@oss.qualcomm.com> wrote:
> scsi: Add partition lookup by type GUID for SCSI devices
>
> Introduce scsi_get_blk_by_type_guid() function to enable SCSI
> partition discovery using partition type GUID. This function scans
> all available SCSI devices and searches for a partition matching the
> specified type GUID.
>
> Reviewed-by: Simon Glass <simon.glass@canonical.com>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
>
> drivers/scsi/scsi-uclass.c | 23 +++++++++++++++++++++++
> include/scsi.h | 11 +++++++++++
> 2 files changed, 34 insertions(+)
> diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
> @@ -47,6 +47,29 @@ int scsi_get_blk_by_uuid(const char *uuid,
> + Reviewed-by: Simon Glass <simon.glass@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 7/8] configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards
2026-04-28 7:31 ` [PATCH v4 7/8] configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards Balaji Selvanathan
@ 2026-05-01 8:02 ` Sumit Garg
0 siblings, 0 replies; 12+ messages in thread
From: Sumit Garg @ 2026-05-01 8:02 UTC (permalink / raw)
To: Balaji Selvanathan
Cc: u-boot, u-boot-qcom, Tom Rini, Quentin Schulz, Ilias Apalodimas,
Rasmus Villemoes, Simon Glass, Javier Tia, Mikhail Kshevetskiy,
Varadarajan Narayanan, Javier Martinez Canillas, Richard Genoud,
Jan Kiszka, David Lechner, Casey Connolly, Marek Vasut,
Christian Marangi, Michael Walle, Sumit Garg, Neil Armstrong,
Aswin Murugan, Jerome Forissier, Mattijs Korpershoek
On Tue, Apr 28, 2026 at 01:01:49PM +0530, Balaji Selvanathan wrote:
> Enable CONFIG_PARTITION_TYPE_GUID and configure SCSI environment
> partition type GUID for QCS9100, QCM6490 and QCS615 configurations.
> This allows these platforms to locate the environment partition
> using GPT type GUID instead of UUID.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
> ---
> Changes in v4:
> - Add type guid configs to QCS9100 defconfig
>
> Changes in v3:
> - No changes
>
> Changes in v2:
> - Enable above new config in qcom_qcs615_defconfig and qcm6490_defconfig
> ---
> configs/qcm6490_defconfig | 4 ++++
> configs/qcom_qcs615_defconfig | 4 ++++
> configs/qcom_qcs9100_defconfig | 3 ++-
> 3 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/configs/qcm6490_defconfig b/configs/qcm6490_defconfig
> index b088367f86c..9560886a37a 100644
> --- a/configs/qcm6490_defconfig
> +++ b/configs/qcm6490_defconfig
> @@ -16,3 +16,7 @@ CONFIG_DEFAULT_DEVICE_TREE="qcom/qcs6490-rb3gen2"
>
> CONFIG_FASTBOOT_BUF_ADDR=0xd8800000
> CONFIG_PHY_QCOM_QMP_COMBO=y
> +
> +CONFIG_ENV_IS_IN_SCSI=y
> +CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
> +CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
These config options are common among targets, can you rather add an env
related config fragment which can be included in all these defconfigs.
Also, please add the partition name here as a comment to easily locate the
partition.
-Sumit
> diff --git a/configs/qcom_qcs615_defconfig b/configs/qcom_qcs615_defconfig
> index 27666a8129d..d0ffa567619 100644
> --- a/configs/qcom_qcs615_defconfig
> +++ b/configs/qcom_qcs615_defconfig
> @@ -22,3 +22,7 @@ CONFIG_REMAKE_ELF=y
> CONFIG_TEXT_BASE=0x9fc00000
>
> CONFIG_FASTBOOT_BUF_ADDR=0xa1600000
> +
> +CONFIG_ENV_IS_IN_SCSI=y
> +CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
> +CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
> diff --git a/configs/qcom_qcs9100_defconfig b/configs/qcom_qcs9100_defconfig
> index 082106157bb..fbaf21952f2 100644
> --- a/configs/qcom_qcs9100_defconfig
> +++ b/configs/qcom_qcs9100_defconfig
> @@ -11,6 +11,7 @@ CONFIG_REMAKE_ELF=y
> CONFIG_FASTBOOT_BUF_ADDR=0xdb300000
> CONFIG_DEFAULT_DEVICE_TREE="qcom/qcs9100-ride-r3"
> CONFIG_ENV_IS_IN_SCSI=y
> -CONFIG_ENV_SCSI_PART_UUID="71cb9cd0-acf1-b6cb-ad91-be9572fe11a9"
> +CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
> +CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
> # CONFIG_ENV_IS_DEFAULT is not set
> # CONFIG_ENV_IS_NOWHERE is not set
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality
2026-04-28 7:31 ` [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality Balaji Selvanathan
@ 2026-05-07 13:42 ` Quentin Schulz
0 siblings, 0 replies; 12+ messages in thread
From: Quentin Schulz @ 2026-05-07 13:42 UTC (permalink / raw)
To: Balaji Selvanathan, u-boot, Sumit Garg, u-boot-qcom
Cc: Tom Rini, Ilias Apalodimas, Rasmus Villemoes, Simon Glass,
Javier Tia, Mikhail Kshevetskiy, Varadarajan Narayanan,
Javier Martinez Canillas, Richard Genoud, Jan Kiszka,
David Lechner, Casey Connolly, Marek Vasut, Christian Marangi,
Michael Walle, Sumit Garg, Neil Armstrong, Aswin Murugan,
Jerome Forissier, Mattijs Korpershoek
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@chromium.org>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-05-07 13:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 7:31 [PATCH v4 0/8] Add partition type GUID support for environment Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 1/8] disk: Add partition lookup by type GUID functionality Balaji Selvanathan
2026-05-07 13:42 ` Quentin Schulz
2026-04-28 7:31 ` [PATCH v4 2/8] scsi: Add partition lookup by type GUID for SCSI devices Balaji Selvanathan
2026-05-01 2:12 ` Simon Glass
2026-04-28 7:31 ` [PATCH v4 3/8] scsi: Optimize scsi_get_blk_by_uuid() loop iteration Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 4/8] env: scsi: Fix ENV_SCSI_HW_PARTITION default value type Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 5/8] env: scsi: Add partition type GUID support and choice-based selection Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 6/8] env: scsi: Implement partition type GUID lookup Balaji Selvanathan
2026-04-28 7:31 ` [PATCH v4 7/8] configs: Enable partition type GUID for QCS9100/QCM6490/QCS615 boards Balaji Selvanathan
2026-05-01 8:02 ` Sumit Garg
2026-04-28 7:31 ` [PATCH v4 8/8] test: dm: Add partition type GUID lookup test Balaji Selvanathan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.