[U-Boot] [PATCH 2/3] gpt: add optional parameter guid in gpt command

Patrick Delaunay patrick.delaunay73 at gmail.com
Mon Oct 19 16:59:28 CEST 2015


2015-10-15 23:46 GMT+02:00 Tom Rini <trini at konsulko.com>:

> On Thu, Oct 15, 2015 at 03:58:24PM -0500, Rob Herring wrote:
> > On Tue, Oct 13, 2015 at 9:23 AM, Patrick Delaunay
> > <patrick.delaunay73 at gmail.com> wrote:
> > > code under flag CONFIG_PARTITION_TYPE_GUID
> > > add parameter guid to select partition type guid
> > >
> > > example of use with gpt command :
> > >
> > >   partitions = uuid_disk=${uuid_gpt_disk};name=boot,start=0x4400,
> > >   size=0x6bc00,uuid=${uuid_gpt_boot};name=root,start=0x70000,
> > >   size=0x7538ba00,uuid=${uuid_gpt_root},
> > >   guid=0fc63daf-8483-4772-8e79-3d69d8477de4;
> >
> > The mixture of UUID and GUID is confusing. What we want are the
> > GUIDs/UUIDs for unique ID and the partition type. I would just call
> > the partition type "type". This would allow the same format to be used
> > for MBR partitions if someone wanted to do support for that.
>
> ... and if someone wants to add MBR support, there's enough use cases
> for it (mainly around flashing/factory stuff) that I wouldn't object.
> So yes, lets do this with that kind of thing in mind.
>


Hi,

if you prefer, I can modify the parameter name to "type" as proposed in a
version 2 of the patchset.

partitions =
    uuid_disk=${uuid_gpt_disk}; \
    name=boot,start=0x4400,size=0x6bc00,uuid=${uuid_gpt_boot}; \

name=root,start=0x70000,size=0x7538ba00,uuid=${uuid_gpt_root},type=0fc63daf-8483-4772-8e79-3d69d8477de4;

and to be coherent, I will also modify the field in the struct
disk_partition_t to type_guid

+#ifdef CONFIG_PARTITION_TYPE_GUID
+    char    type_guid[37];    /* type GUID as string, if exists    */
+#endif
 } disk_partition_t;

Patrick


More information about the U-Boot mailing list