[U-Boot] [PATCH v4 3/7] gpt:doc: GPT (GUID Partition Table) documentation

Stephen Warren swarren at wwwdotorg.org
Mon Nov 19 20:28:39 CET 2012


On 11/09/2012 02:22 AM, Piotr Wilczek wrote:
> Documentation of the GPT format.

> diff --git a/doc/README.gpt b/doc/README.gpt

> +Introduction:
> +=============
> +This document describes the GPT partition table format when used with u-boot.


Why "when used with U-Boot"; U-Boot shouldn't influence the GPT
structure at all.

> +GPT for marking disks/partitions is using the UUID. It is supposed to be a
> +globally unique value. A UUID is a 16-byte (128-bit) number. The number of
> +theoretically possible UUIDs is therefore about 3 × 10^38.
> +More often UUID is stored as 32 hexadecimal digits, displayed in 5 groups

I don't think "stored" is too likely; "displayed" is more likely.

> +Example usage:
> +==============

I would change that headline to something like "Creating GPTs in
U-Boot"; all the text above describes the GPT format itself, whereas
this text describes the specifics of some U-Boot commands, and so is not
an example of the preceding text.

> +To restore GUID partition table one needs to:
> +1. at ./include/configs/{board}.h

I don't think "at ./include/configs/{board}.h" is correct; you need to
define the partitions variable in the environment. The config file is
one way you could do this. I would re-write this as:

1. Define partition layout in the environment.
./include/configs/{board}.h may provide a value that describes the
recommended layout if desired.

> +   - define "partitions=" environment variable with format:
> +     "name=..,size=..,uuid=..;..."
> +     values for every key can be passed as text or environment variable
> +     examples:
> +     "name=u-boot,size=60M;name=kernel,size=60M;name=platform,size=1G;"
> +     "name=${uboot_name},size=${uboot_size},uuid=${uboot_uuid};..."
> +
> +2. From u-boot prompt type:
> +   gpt mmc 0
> +   or
> +   gpt mmc 0 partitions

Shouldn't that be "${partitions}" not "partitions"?

> +For "emergency" usage (or when list of UUIDs cannot be provided)  the internal
> +GUID generator shall be used. It uses gd->start_addr_sp as a primary source of
> +UUID generator (16B).

What does "(16B)" mean here?


More information about the U-Boot mailing list