diff mbox

[U-Boot] part:efi: add GUID for linux file system data

Message ID CAKOfRZyxFfx75V92xrG_g-1DOishgRPcdhfDJ75-O1OuzvStmw@mail.gmail.com
State Superseded
Headers show

Commit Message

Patrick Delaunay Oct. 12, 2015, 3:03 p.m. UTC
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
---

see https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs

nota 9 :
Previously, Linux used the same GUID for the data partitions as Windows
(Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7).
Linux never had a separate unique partition type GUID defined for its
data partitions.
This created problems when dual-booting Linux and Windows in UEFI-GPT
setup.
The new GUID (Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4)
was defined jointly by GPT fdisk and GNU Parted developers.
It is identified as type code 0x8300 in GPT fdisk.
(See definitions in gdisk's parttypes.cc)


 include/part_efi.h | 3 +++
 1 file changed, 3 insertions(+)

--
1.9.1

Comments

Patrick Delaunay Oct. 12, 2015, 5:48 p.m. UTC | #1
2015-10-12 17:14 GMT+02:00 Tom Rini <trini@konsulko.com>:

> On Mon, Oct 12, 2015 at 05:03:15PM +0200, Patrick Delaunay wrote:
>
> > Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
> > ---
> >
> > see
> https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs
> >
> > nota 9 :
> > Previously, Linux used the same GUID for the data partitions as Windows
> > (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7).
> > Linux never had a separate unique partition type GUID defined for its
> > data partitions.
> > This created problems when dual-booting Linux and Windows in UEFI-GPT
> > setup.
> > The new GUID (Linux filesystem data:
> 0FC63DAF-8483-4772-8E79-3D69D8477DE4)
> > was defined jointly by GPT fdisk and GNU Parted developers.
> > It is identified as type code 0x8300 in GPT fdisk.
> > (See definitions in gdisk's parttypes.cc)
>
> Some of this should be in the main commit message, not the discarded
> part.
>

I wasn't sure if these level of informations should be in commit message or
not.

I can add in commit message :

   Previously, Linux used the same GUID for the data partitions as Windows
   (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7).
   This created problems when dual-booting Linux and Windows in UEFI-GPT
   Setup, so a new GUID (Linux filesystem data:
0FC63DAF-8483-4772-8E79-3D69D8477DE4)
   was defined jointly by GPT fdisk and GNU Parted developers.



> >  include/part_efi.h | 3 +++
> >  1 file changed, 3 insertions(+)
>
> And without some changes to disk/part_efi.c I believe, this isn't used
> anywhere so not actually changing behavior yet :)
>

--
> Tom
>


yes today the behavior don't change yet.

in fact only two GUID defines is really use in u-boot code :

./disk/part_efi.c:63:static efi_guid_t system_guid = PARTITION_SYSTEM_GUID;
./disk/part_efi.c:449:            &PARTITION_BASIC_DATA_GUID, 16);

all the other existing value are not used today, so I add a other define
not used
because I don't see any simple way to use one the correct guid.

I want to propose a patch to allow selection of partition type guid in
command gpt (with new option guid=)
but without dependancy with this patch

and I plan to use this define and this new option to manage the partionning
on my project.

Patrick
diff mbox

Patch

diff --git a/include/part_efi.h b/include/part_efi.h
index 3012b91..c8fc873 100644
--- a/include/part_efi.h
+++ b/include/part_efi.h
@@ -43,6 +43,9 @@ 
 #define PARTITION_BASIC_DATA_GUID \
        EFI_GUID( 0xEBD0A0A2, 0xB9E5, 0x4433, \
                0x87, 0xC0, 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7)
+#define PARTITION_LINUX_FILE_SYSTEM_DATA_GUID \
+       EFI_GUID(0x0FC63DAF, 0x8483, 0x4772, \
+               0x8E, 0x79, 0x3D, 0x69, 0xD8, 0x47, 0x7D, 0xE4)
 #define PARTITION_LINUX_RAID_GUID \
        EFI_GUID( 0xa19d880f, 0x05fc, 0x4d3b, \
                0xa0, 0x06, 0x74, 0x3f, 0x0f, 0x84, 0x91, 0x1e)