[PATCH v1 3/4] env: scsi: Add support for partition type GUID based environment
Tom Rini
trini at konsulko.com
Thu Jan 8 15:32:52 CET 2026
On Thu, Jan 08, 2026 at 03:11:37PM +0530, Varadarajan Narayanan wrote:
> On Thu, Jan 08, 2026 at 12:19:46PM +0530, Balaji Selvanathan wrote:
> > Add support for locating SCSI environment partition using GPT type
> > GUID instead of unique 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.
> >
> > Introduce CONFIG_SCSI_ENV_PART_TYPE_GUID configuration option that
> > allows specifying a partition type GUID for environment storage.
> > When enabled, the environment subsystem uses the new type GUID
> > based lookup method via scsi_get_blk_by_type_guid() to find the
> > first matching partition.
> >
> > This change maintains backward compatibility with the existing
> > UUID-based approach.
> >
> > Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
> > ---
> > env/Kconfig | 7 +++++++
> > env/scsi.c | 13 +++++++++++++
> > 2 files changed, 20 insertions(+)
> >
> > diff --git a/env/Kconfig b/env/Kconfig
> > index b312f9b5324..97cb3d05daf 100644
> > --- a/env/Kconfig
> > +++ b/env/Kconfig
> > @@ -768,6 +768,13 @@ config SCSI_ENV_PART_UUID
> > help
> > UUID of the SCSI partition that you want to store the environment in.
> >
> > +config SCSI_ENV_PART_TYPE_GUID
> > + string "SCSI partition type GUID for saving environment"
> > + depends on ENV_IS_IN_SCSI
>
> Should we add
>
> depends on ENV_IS_IN_SCSI && !SCSI_ENV_PART_UUID
>
> and similarly vice versa in SCSI_ENV_PART_UUID since the code seems to
> handle them as mutually exclusive...
If they're mutually exclusive it needs to be handled in a choice
statement.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260108/89524bc7/attachment.sig>
More information about the U-Boot
mailing list