[elbe-devel] [PATCH v2] hdimg: Add support for partition names in GPT partitions

Holger Dengler dengler at linutronix.de
Tue Mar 8 10:51:29 CET 2022


On 08.03.22 10:35, Torben Hohn wrote:
> From: "Steih, Martin" <Martin.Steih at lachmann-rink.de>
> 
> GPT partitions also support names. This is required for example
> on STM32mp1. The stmp32mp1 ROM code looks for fsbl1, fsbl2 and ssbl
> partitions.
> 
> Add a name field to the partition entry and evaluate that.
> 
> Signed-off-by: Steih, Martin <Martin.Steih at lachmann-rink.de>
> [Added a proper commit message after taking the diff from elbe-devel]
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
> Tested-by:  Eduard Krein <eduard.krein at linutronix.de>

Reviewed-by: Holger Dengler <dengler at linutronix.de>

> ---
>  elbepack/hdimg.py | 4 ++++
>  schema/dbsfed.xsd | 7 +++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> index 696225925..84d7a2e92 100644
> --- a/elbepack/hdimg.py
> +++ b/elbepack/hdimg.py
> @@ -336,6 +336,10 @@ def create_partition(
>      else:
>          ppart = parted.Partition(disk, ptype, geometry=g)
>  
> +    if disk.type == "gpt" and \
> +        part.has("name"):
> +        ppart.set_name(part.text("name"))
> +
>      cons = parted.Constraint(exactGeom=g)
>      disk.addPartition(ppart, cons)
>  
> diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
> index b3f006832..957c31b8c 100644
> --- a/schema/dbsfed.xsd
> +++ b/schema/dbsfed.xsd
> @@ -1808,6 +1808,13 @@
>            </documentation>
>          </annotation>
>        </element>
> +      <element name="name" type="rfs:string" minOccurs="0" maxOccurs="1">
> +        <annotation>
> +          <documentation>
> +             human readable name of the partition used for naming a gpt partition
> +          </documentation>
> +        </annotation>
> +      </element>
>        <element name="binary" type="rfs:string" minOccurs="0">
>          <annotation>
>            <documentation>

-- 
Gruß,
Holger Dengler
--
phone: +49 7556 25 999 14; fax: +49 7556 25 999 99
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20220308/b74842f7/attachment.sig>


More information about the elbe-devel mailing list