Skip to contentSkip to conversation

ref-manual/variables.rst: document new FIT image variables

PATCH Superseded AdrianF 2 participants 2 messages Jan 8 – Jan 27

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

AdrianF

author
#0 lore raw

PATCH 1/1 ref-manual/variables.rst: document new FIT image variables

From: Adrian Freihofer <[email protected]>

- FIT_MKIMAGE_EXTRA_OPTS: new variable to pass extra mkimage options
- FIT_CONF_MAPPINGS for flexible DTB mappings

---
 documentation/ref-manual/variables.rst | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
documentation/ref-manual/variables.rst +44 -0
index ee776c110..734dfcbd4 100644
@@ -3383,6 +3383,35 @@ system and gives an overview of their function and contents.
 
       This variable is used in the :ref:`ref-classes-kernel-fit-image` class.
 
+   :term:`FIT_CONF_MAPPINGS`
+      Allows specifying mappings to rename configuration nodes or add extra
+      configuration nodes for existing DTBs in FIT images. This provides
+      flexibility when a 1-1 mapping between DTB names and configuration
+      node names does not work.
+
+      The variable accepts a space-separated list of mapping commands:
+
+      - ``dtb-conf:DTB_NAME:NEW_NAME``
+        Renames the configuration node for a specific DTB.
+
+      - ``dtb-extra-conf:DTB_NAME:EXTRA_NAME``
+        Creates an additional configuration node for an existing DTB.
+
+      For example::
+
+         FIT_CONF_MAPPINGS = "\
+             dtb-extra-conf:am335x-bonegreen:bonegreen \
+             dtb-conf:am335x-boneblack:bbblack"
+
+      This generates three configuration nodes from two DTBs:
+
+      - ``am335x-bonegreen``: a standard configuration node for a DTB
+      - ``bonegreen``: an extra configuration node for the same DTB
+      - ``bbblack``: a renamed configuration node for the ``am335x-boneblack`` DTB
+
+      The :ref:`ref-classes-kernel-fit-image` class validates all mappings
+      and ensures they match existing DTBs.
+
    :term:`FIT_CONF_PREFIX`
       When using the :ref:`ref-classes-kernel-fit-image`, this is the prefix
       used for creating FIT configuration nodes. Its default value is "conf-".
@@ -3473,6 +3502,21 @@ system and gives an overview of their function and contents.
       The default value is set to "x509" by the
       :ref:`ref-classes-kernel-fit-image` class.
 
+   :term:`FIT_MKIMAGE_EXTRA_OPTS`
+      This variable allows passing extra options to ``mkimage`` during FIT
+      image generation, providing flexibility for platforms that require
+      additional ``mkimage`` arguments beyond the defaults.
+
+      For example::
+
+         FIT_MKIMAGE_EXTRA_OPTS = "-B 8 -E"
+
+      This results in the ``mkimage`` command being invoked as::
+
+         mkimage -B 8 -E -f fit-image.its fitImage
+
+      The :ref:`ref-classes-kernel-fit-image` class uses this variable.
+
    :term:`FIT_PAD_ALG`
       Specifies the padding algorithm used in creating the FIT Image.
       The default value is set to "pkcs-1.5" by the
Signature · 1 line
2.52.0
#1 lore raw

Hi,

Quoted 15 lines · Adrian Freihofer via lists.yoctoproject.org

From: Adrian Freihofer <[email protected]>

- FIT_MKIMAGE_EXTRA_OPTS: new variable to pass extra mkimage options
- FIT_CONF_MAPPINGS for flexible DTB mappings

---
 documentation/ref-manual/variables.rst | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
documentation/ref-manual/variables.rst +0 -0
index ee776c110..734dfcbd4 100644

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3386

Quoted 4 lines
documentation/ref-manual/variables.rst +1 -0
@@ -3383,6 +3383,35 @@ system and gives an overview of their function and contents.
 
       This variable is used in the :ref:`ref-classes-kernel-fit-image` class.
 
+   :term:`FIT_CONF_MAPPINGS`

Start with

"""
When inheriting the :ref:ref-classes-kernel-fit-image, the :term:FIT_CONF_MAPPINGS variable allows ..."
"""

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3388

Quoted 2 lines
documentation/ref-manual/variables.rst +2 -0
+      Allows specifying mappings to rename configuration nodes or add extra
+      configuration nodes for existing DTBs in FIT images. This provides

For clarity:
s/DTBs/device tree blobs (DTBs)/

Then you can use DTBs below?

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3389

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      flexibility when a 1-1 mapping between DTB names and configuration

For clarity:
s/1-1/1 to 1/

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3390

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      node names does not work.

Could you provide an example of such a scenario?

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3394

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+      The variable accepts a space-separated list of mapping commands:
+
+      - ``dtb-conf:DTB_NAME:NEW_NAME``

Two spaces after the list "-"

You could say that the ``DTB_NAME`` is the name of the DTB without its ``.dtb`` suffix?

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3398

Quoted 4 lines
documentation/ref-manual/variables.rst +4 -0
+        Renames the configuration node for a specific DTB.
+
+      - ``dtb-extra-conf:DTB_NAME:EXTRA_NAME``
+        Creates an additional configuration node for an existing DTB.

I wonder why that would be needed? This would duplicate the configuration without another name, but what's the point?

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3408

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+
+      For example::
+
+         FIT_CONF_MAPPINGS = "\
+             dtb-extra-conf:am335x-bonegreen:bonegreen \
+             dtb-conf:am335x-boneblack:bbblack"
+
+      This generates three configuration nodes from two DTBs:
+
+      - ``am335x-bonegreen``: a standard configuration node for a DTB

I would rephrase to "the original configuration node for the ``am335x-bonegreen`` device tree".

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3409

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      - ``bonegreen``: an extra configuration node for the same DTB

s/for the same DTB/for the same ``am335x-bonegreen`` DTB/

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3505

Quoted 13 lines
documentation/ref-manual/variables.rst +6 -0
+      - ``bbblack``: a renamed configuration node for the ``am335x-boneblack`` DTB
+
+      The :ref:`ref-classes-kernel-fit-image` class validates all mappings
+      and ensures they match existing DTBs.
+
    :term:`FIT_CONF_PREFIX`
       When using the :ref:`ref-classes-kernel-fit-image`, this is the prefix
       used for creating FIT configuration nodes. Its default value is "conf-".
@@ -3473,6 +3502,21 @@ system and gives an overview of their function and contents.
       The default value is set to "x509" by the
       :ref:`ref-classes-kernel-fit-image` class.
 
+   :term:`FIT_MKIMAGE_EXTRA_OPTS`

Instead of ending the definition with "The :ref:ref-classes-kernel-fit-image class uses this variable.", just start with "When inheriting the :ref:ref-classes-kernel-fit-image, the :term:FIT_MKIMAGE_EXTRA_OPTS variable ..."

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3516

Quoted 11 lines
documentation/ref-manual/variables.rst +11 -0
+      This variable allows passing extra options to ``mkimage`` during FIT
+      image generation, providing flexibility for platforms that require
+      additional ``mkimage`` arguments beyond the defaults.
+
+      For example::
+
+         FIT_MKIMAGE_EXTRA_OPTS = "-B 8 -E"
+
+      This results in the ``mkimage`` command being invoked as::
+
+         mkimage -B 8 -E -f fit-image.its fitImage

Nit:

"""
This results in the ``mkimage`` command being invoked as:

.. parsed-literal::

mkimage *-B 8 -E* -f fit-image.its fitImage
"""

This will highlight the new options

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3522

Quoted 6 lines
documentation/ref-manual/variables.rst +3 -0
+
+      The :ref:`ref-classes-kernel-fit-image` class uses this variable.
+
    :term:`FIT_PAD_ALG`
       Specifies the padding algorithm used in creating the FIT Image.
       The default value is set to "pkcs-1.5" by the

Thanks!
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com