RFC: Partition type GUID for U-Boot environment

Rasmus Villemoes rasmus.villemoes at prevas.dk
Tue Nov 17 13:59:56 CET 2020


On 17/11/2020 13.21, Marcin Juszkiewicz wrote:
> W dniu 17.11.2020 o 11:05, Rasmus Villemoes pisze:
> 
>> Would it make sense to choose a canonical "Partition type GUID" [1] for
>> partitions used to store a U-Boot environment?
>>
>> The partition type is mostly informational, but I'm thinking it might
>> make sense to have some canonical thing to put into an image definition
>> rather than having the tool use something random or a default which
>> would often be "Linux filesystem data".
>>
>> If so, I propose 3de21764-95bd-54bd-a5c3-4abe786f38a8 , which is from
>> https://www.uuidtools.com/v5 with a namespace of
>> 25cbcde0-8642-47c6-a298-1a3a57cd256b (randomly generated just now, but
>> should be used for future v5 uuids within U-Boot context [2]) and name
>> "U-Boot environment" (sans quotes).
> 
> If you device lacks flash for environment then create "BIOS boot
> partition" and use it for storing both bootloader and env?

I'm afraid I don't understand what you're asking about. I'm dealing with
multiple different boards, with lots of different ways of storing U-Boot
and/or its environment. I'm merely asking if, for the cases where one
chooses to define a GPT partition to hold the environment (and nothing
else), does it make sense to have something to put in the Partition Type
field?

I don't think I've ever had occasion to put U-Boot and the environment
in the same partition, but I have cases where both are stored raw - and
it's that hardcoding of offsets I'd like to get rid of by defining a
partition for the environment - it's much nicer to be able to put
/dev/disk/by-partlabel/u-boot-env in fw_env.config. I can do that
without a canonical partition type uuid of course.

> Something like 552d426f-6f74-2070-6c75-7320456e762020 (plus some endian
> swaps) would be better UUID for U-Boot Env partition as it goes to
> "U-Boot plus Env" after ASCII convertion ("BIOS Boot partition" UUID is
> "Hah!IdontNeedEFI" so why not continue tradition).

Eh, because, at least according to that wiki page, " The formation of
this GUID does not follow the GUID definition;". But whichever uuid the
U-Boot project would elect I'd use. (Though one spelling "U-Boot plus
Env" would be somewhat misleading for something only containing an
environment).

Rasmus


More information about the U-Boot mailing list