Re: [edk2] INF FILE_GUID generation question

2016-05-13 Thread Andrew Fish

> On May 13, 2016, at 3:20 PM, David Van Arnem  wrote:
> 
> Hi all,
> 
> Is there a specific method that should be used to generate FILE_GUIDs in
> an EDK2 INF file?  A quick look through the INF spec only suggests that
> FILE_GUIDs should be in Registry 8-4-4-4-12 format and unique.  Are
> there any other requirements?
> 

They have to be valid GUID/UUIDs per RFC 4122. So you can't hand edit them. 
https://en.wikipedia.org/wiki/Universally_unique_identifier

VC++ has guidgen.txt
Linux has uuidgen
There are web pages. https://www.uuidgenerator.net

I wrote a small Python script to generate the  8-4-4-4-12 and EFI_GUID C 
structure format at the same time. 

Thanks,

Andrew Fish

> -- 
> Thanks,
> David Van Arnem
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] INF FILE_GUID generation question

2016-05-13 Thread David Van Arnem
On 05/13/2016 04:37 PM, Andrew Fish wrote:
> 
>> On May 13, 2016, at 3:20 PM, David Van Arnem  wrote:
>>
>> Hi all,
>>
>> Is there a specific method that should be used to generate FILE_GUIDs in
>> an EDK2 INF file?  A quick look through the INF spec only suggests that
>> FILE_GUIDs should be in Registry 8-4-4-4-12 format and unique.  Are
>> there any other requirements?
>>
> 
> They have to be valid GUID/UUIDs per RFC 4122. So you can't hand edit them. 
> https://en.wikipedia.org/wiki/Universally_unique_identifier
> 
> VC++ has guidgen.txt
> Linux has uuidgen
> There are web pages. https://www.uuidgenerator.net
> 
> I wrote a small Python script to generate the  8-4-4-4-12 and EFI_GUID C 
> structure format at the same time. 

Thank you!

David

> 
> Thanks,
> 
> Andrew Fish
> 
>> -- 
>> Thanks,
>> David Van Arnem
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 


-- 
Thanks,
David Van Arnem
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] INF FILE_GUID generation question

2016-05-14 Thread Michael Zimmermann
>
> I wrote a small Python script to generate the  8-4-4-4-12 and EFI_GUID C
> structure format at the same time.


me too :) in case anyone needs it:
https://github.com/efidroid/build/blob/master/tools/guidgen

Michael
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] INF FILE_GUID generation question

2016-05-14 Thread Andrew Fish

> On May 14, 2016, at 12:00 AM, Michael Zimmermann  
> wrote:
> 
> I wrote a small Python script to generate the  8-4-4-4-12 and EFI_GUID C 
> structure format at the same time.
> 
> me too :) in case anyone needs it: 
> https://github.com/efidroid/build/blob/master/tools/guidgen 
> 
> 

Michael,

I think you have the wrong endian. GUID is defined as a UINT32, UINT16, UINT16, 
Byte array. 

(guid[3], guid[2], guid[1], guid[0], guid[5], guid[4], guid[7], guid[6], 
guid[8], guid[9], guid[10], guid[11], guid[12], guid[13], guid[14], guid[15])

Contributed-under: TianoCore Contribution Agreement 1.0

Thanks,

Andrew Fish

> Michael

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] INF FILE_GUID generation question

2016-05-14 Thread Michael Zimmermann
Hi,

I'm pretty sure it's correct because the python doc says that 'uuid.bytes'
is in big endian format.
Also I can easily double check this because my tool also prints the
ready-to-use string produced by str(guid) which matches my manual output
exactly.

Source: https://docs.python.org/2/library/uuid.html#uuid.UUID.bytes

Thanks
Michael

I think you have the wrong endian. GUID is defined as a UINT32, UINT16,
> UINT16, Byte array.
>
> (guid[3], guid[2], guid[1], guid[0], guid[5], guid[4], guid[7], guid[6],
> guid[8], guid[9], guid[10], guid[11], guid[12], guid[13], guid[14],
> guid[15])
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] INF FILE_GUID generation question

2016-05-14 Thread Andrew Fish

> On May 14, 2016, at 8:53 AM, Michael Zimmermann  
> wrote:
> 
> Hi,
> 
> I'm pretty sure it's correct because the python doc says that 'uuid.bytes'
> is in big endian format.
> Also I can easily double check this because my tool also prints the
> ready-to-use string produced by str(guid) which matches my manual output
> exactly.
> 
> Source: https://docs.python.org/2/library/uuid.html#uuid.UUID.bytes
> 

Sorry I was using UUID.bytes_le, but I see you are using UUID.bytes that 
explains the difference. 

Thanks,

Andrew Fish

> Thanks
> Michael
> 
> I think you have the wrong endian. GUID is defined as a UINT32, UINT16,
>> UINT16, Byte array.
>> 
>> (guid[3], guid[2], guid[1], guid[0], guid[5], guid[4], guid[7], guid[6],
>> guid[8], guid[9], guid[10], guid[11], guid[12], guid[13], guid[14],
>> guid[15])
>> 
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel