Skip to contentSkip to conversation

ref-manual: uboot-sign: Add how to enable ATF, TEE and User defined snippet ITS for U-Boot FIT image

PATCH Superseded Jamin Lin 2 participants 3 messages Mar 4, 2025 – Mar 7, 2025

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Jamin Lin

author
#0 lore raw

PATCH v2 1/1 ref-manual: uboot-sign: Add how to enable ATF, TEE and User defined snippet ITS for U-Boot FIT image

Add how to enable ATF, TEE and User defined ITS for U-Boot FIT image generation.

---
 documentation/ref-manual/classes.rst   |  8 +++
 documentation/ref-manual/variables.rst | 72 ++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
documentation/ref-manual/classes.rst +8 -0
index b93279ff6..d1669ed87 100644
@@ -3401,6 +3401,14 @@ The variables used by this class are:
 -  :term:`UBOOT_FITIMAGE_ENABLE`: enable the generation of a U-Boot FIT image.
 -  :term:`UBOOT_MKIMAGE_DTCOPTS`: DTC options for U-Boot ``mkimage`` when
    rebuilding the FIT image containing the kernel.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`: enable the ARM Trusted Firmware (ATF) image.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`: specifie the path to the ATF image.
+-  :term:`UBOOT_FIT_TEE`: enable the Trusted Execution Environment (TEE) image.
+-  :term:`UBOOT_FIT_TEE_IMAGE`: specifie the path to the TEE image.
+-  :term:`UBOOT_FIT_USER_SETTINGS`: add a user-specific snippet to the ITS. Users can
+   include their custom ITS snippet in this variable.
+-  :term:`UBOOT_FIT_CONF_USER_LOADABLES`: adds a user-defined image to the loadable
+   property of the configuration node. It should be a comma-separated list of strings.
 
 See U-Boot's documentation for details about `verified boot
 <https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/verified-boot.txt>`__
documentation/ref-manual/variables.rst +72 -0

78 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw

Hi Jamin,

Quoted 13 lines · Jamin Lin via lists.yoctoproject.org

Add how to enable ATF, TEE and User defined ITS for U-Boot FIT image generation.

---
  documentation/ref-manual/classes.rst   |  8 +++
  documentation/ref-manual/variables.rst | 72 ++++++++++++++++++++++++++
  2 files changed, 80 insertions(+)
documentation/ref-manual/classes.rst +0 -0
index b93279ff6..d1669ed87 100644

documentation/ref-manual/classes.rst The variables used by this class are: · line 3404

Quoted 4 lines
documentation/ref-manual/classes.rst +1 -0
@@ -3401,6 +3401,14 @@ The variables used by this class are:
  -  :term:`UBOOT_FITIMAGE_ENABLE`: enable the generation of a U-Boot FIT image.
  -  :term:`UBOOT_MKIMAGE_DTCOPTS`: DTC options for U-Boot ``mkimage`` when
     rebuilding the FIT image containing the kernel.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`: enable the ARM Trusted Firmware (ATF) image.

I would rather suggest:

include the ARM Trusted Firmware (ATF) image in the U-Boot FIT image.

Funnily enough ATF is the old name, it should now be called Trusted Firmware-A, shortened to TF-A. https://trustedfirmware-a.readthedocs.io/en/latest/index.html

documentation/ref-manual/classes.rst The variables used by this class are: · line 3405

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`: specifie the path to the ATF image.

s/specifie/specifies/

Please also reiterate what ATF stands for (ARM Trusted Firmware) and/or use the new name as well. I think it's a good idea to try to not use only abbreviations.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3406

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_TEE`: enable the Trusted Execution Environment (TEE) image.

I would rather suggest:

include the Trusted Execution Environment (TEE) image in the U-Boot FIT image.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3407

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_TEE_IMAGE`: specifie the path to the TEE image.

s/specifie/specifies/

Please also reiterate what TEE stands for (Tee Execution Environment). I think it's a good idea to try to not use only abbreviations.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3409

Quoted 2 lines
documentation/ref-manual/classes.rst +2 -0
+-  :term:`UBOOT_FIT_USER_SETTINGS`: add a user-specific snippet to the ITS. Users can
+   include their custom ITS snippet in this variable.

s/add/adds/

If I'm not mistaken, this is to be inserted in the /images node, before the /configurations node.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3410

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_CONF_USER_LOADABLES`: adds a user-defined image to the loadable

s/a user-defined image/one or more user-defined images/

s/loadable/loadables/

documentation/ref-manual/classes.rst The variables used by this class are: · line 3412

Quoted 2 lines
documentation/ref-manual/classes.rst +1 -0
+   property of the configuration node. It should be a comma-separated list of strings.
 

I believe the strings should be surrounded each by quotes as well?

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

Quoted 11 lines
documentation/ref-manual/classes.rst +0 -0
  See U-Boot's documentation for details about `verified boot
  <https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/verified-boot.txt>`__
documentation/ref-manual/variables.rst +1 -0
index 60984cc8f..dbbaac56d 100644
@@ -9884,6 +9884,78 @@ system and gives an overview of their function and contents.
 
        See the :ref:`ref-classes-uboot-sign` class for details.
 
+   :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`

Please order this alphabetically, so before UBOOT_FIT_DESC.

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      ARM Trusted Firmware (ATF) is a reference implementation of secure world

I would recommend also mentioning the new name (Trusted Firmware-A aka TF-A).

Additionally, provide a link to the project, e.g. https://www.trustedfirmware.org/projects/tf-a

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

Quoted 11 lines
documentation/ref-manual/variables.rst +11 -0
+      software for Arm A-Profile architectures (Armv8-A and Armv7-A), including
+      an Exception Level 3 (EL3) Secure Monitor. This variable enables the
+      generation of a U-Boot FIT image with an ATF image.
+
+      Its default value is "0", so set it to "1" to enable this functionality::
+
+         UBOOT_FIT_ARM_TRUSTED_FIRMWARE = "1"
+
+   :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`
+      Specifies the path to the ATF image. Its default value is "bl31.bin"
+

Missing the double colon here to make the line below a code-block.

Please also reiterate what ATF stands for and provide the new name (with its abbreviation as well).

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

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+         UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE ?= "bl31.bin"
+
+   :term:`UBOOT_FIT_TEE`

Please order this alphabetically, so before UBOOT_FITIMAGE_ENABLE.

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

Quoted 11 lines
documentation/ref-manual/variables.rst +11 -0
+      A Trusted Execution Environment (TEE) is a secure environment for executing
+      code, ensuring high levels of trust in asset management within the
+      surrounding system. This variable enables the generation of a U-Boot FIT
+      image with a TEE image.
+
+      Its default value is "0", so set it to "1" to enable this functionality::
+
+         UBOOT_FIT_TEE = "1"
+
+   :term:`UBOOT_FIT_TEE_IMAGE`
+      Specifies the path to the TEE image. Its default value is "tee-raw.bin"::

Please reiterate what TEE stands for.

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

Quoted 5 lines
documentation/ref-manual/variables.rst +5 -0
+
+         UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
+
+   :term:`UBOOT_FIT_USER_SETTINGS`
+      Add a user-specific snippet to the ITS. Users can include their custom ITS

Please mention it's for U-Boot ITS and specifically to add to the /images node.

Please specify what ITS stands for.

You could also provide a link to the specs, c.f. https://fitspec.osfw.foundation/

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

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+      snippet in this variable.
+
+      Ex::

s/snippet in this variable./snippet in this variable, e.g.::/

Quoted 4 lines
documentation/ref-manual/variables.rst +4 -0
+
+         UBOOT_FIT_FWA_ITS = '\
+             fwa {\n\
+                 description = \"FW A\";\n\

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

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+                 data = /incbin/(\"fwa.bin\");\n\
+                 type = \"fwtype\";\n\
+                 arch = \"fwarch\";\n\
+                 os = \"fwos\";\n\
+                 load = <0xb2000000>;\n\
+                 entry = <0xb2000000>;\n\
+                 compression = \"none\";\n\
+             };\n\
+         '
+

question: are the \n necessary? If so, we should document it that newlines are stripped and if they need to be added, they need to be explicitly added, via \n.

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

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+         UBOOT_FIT_USER_SETTINGS = "${UBOOT_FIT_FWA_ITS}"
+
+       The generated Image Tree Source (ITS):

Missing second colon to make the below a code block.

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

Quoted 12 lines
documentation/ref-manual/variables.rst +12 -0
+
+         fwa {
+             description = "FW A";
+             data = /incbin/("fwa.bin");
+             type = "fwtype";
+             arch = "fwarch";
+             os = "fwos";
+             load = <0xb2000000>;
+             entry = <0xb2000000>;
+             compression = "none";
+         };
+

This is not properly aligned. It should be three whitespaces compared to the paragraph it's rattached to (i.e. where T character in "The generated Image Tree Source" is).

I am not entirely sure what should be understood from this example though? Maybe provide a full dummy ITS without this variable set and then with the variable set and show the changes?

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+   :term:`UBOOT_FIT_CONF_USER_LOADABLES`

Please order this alphabetically, so before UBOOT_FIT_USER_SETTINGS.

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      Adds a user-defined image to the loadable property of the configuration node.

s/loadable/``loadables``/

s/of the configuration node/of the configuration node of the U-Boot Image Tree Source (ITS)/

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

Quoted 4 lines
documentation/ref-manual/variables.rst +4 -0
+      It should be a comma-separated list of strings.
+
+      Ex::
+

s/It should be a comma-separated list of strings./It should be a comma-separated list of strings, e.g.::/

I believe each string needs to be surrounded by quotes too (like in your example)? If that really is the case, then we should mention it as well.

Looking good otherwise!

Cheers,
Quentin

author
#2 lore raw

Hi Quentin

Quoted 238 lines

Hi Jamin,

Quoted 1 line · Jamin Lin via lists.yoctoproject.org

Add how to enable ATF, TEE and User defined ITS for U-Boot FIT image

generation.

Quoted 5 lines
---
  documentation/ref-manual/classes.rst   |  8 +++
  documentation/ref-manual/variables.rst | 72

++++++++++++++++++++++++++

documentation/ref-manual/classes.rst The variables used by this class are: · line 3401

Quoted 9 lines
  2 files changed, 80 insertions(+)
documentation/ref-manual/classes.rst +0 -0
index b93279ff6..d1669ed87 100644
@@ -3401,6 +3401,14 @@ The variables used by this class are:
  -  :term:`UBOOT_FITIMAGE_ENABLE`: enable the generation of a U-Boot

FIT image.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3402

Quoted 1 line
documentation/ref-manual/classes.rst +0 -0
  -  :term:`UBOOT_MKIMAGE_DTCOPTS`: DTC options for U-Boot

``mkimage`` when

documentation/ref-manual/classes.rst The variables used by this class are: · line 3404

Quoted 2 lines
documentation/ref-manual/classes.rst +1 -0
     rebuilding the FIT image containing the kernel.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`: enable the ARM

Trusted Firmware (ATF) image.

I would rather suggest:

include the ARM Trusted Firmware (ATF) image in the U-Boot FIT image.

Funnily enough ATF is the old name, it should now be called Trusted Firmware-A, shortened to TF-A.
https://trustedfirmware-a.readthedocs.io/en/latest/index.html

documentation/ref-manual/classes.rst The variables used by this class are: · line 3405

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`: specifie the

path to the ATF image.

s/specifie/specifies/

Please also reiterate what ATF stands for (ARM Trusted Firmware) and/or use the new name as well. I think it's a good idea to try to not use only abbreviations.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3406

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_TEE`: enable the Trusted Execution Environment (TEE)

image.

I would rather suggest:

include the Trusted Execution Environment (TEE) image in the U-Boot FIT image.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3407

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_TEE_IMAGE`: specifie the path to the TEE image.

s/specifie/specifies/

Please also reiterate what TEE stands for (Tee Execution Environment). I think it's a good idea to try to not use only abbreviations.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3408

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_USER_SETTINGS`: add a user-specific snippet to the

ITS. Users can

documentation/ref-manual/classes.rst The variables used by this class are: · line 3409

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+   include their custom ITS snippet in this variable.

s/add/adds/

If I'm not mistaken, this is to be inserted in the /images node, before the /configurations node.

documentation/ref-manual/classes.rst The variables used by this class are: · line 3410

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+-  :term:`UBOOT_FIT_CONF_USER_LOADABLES`: adds a user-defined

image to the loadable

s/a user-defined image/one or more user-defined images/

s/loadable/loadables/

documentation/ref-manual/classes.rst The variables used by this class are: · line 3411

Quoted 1 line
documentation/ref-manual/classes.rst +1 -0
+   property of the configuration node. It should be a comma-separated list

of strings.

Quoted 1 line

I believe the strings should be surrounded each by quotes as well?

Quoted 2 lines

See U-Boot's documentation for details about `verified boot

<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/verified-
boot.txt>`__

Review

Quoted 1 line
(quoted diff) +0 -0

b/documentation/ref-manual/variables.rst

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

Quoted 4 lines

index 60984cc8f..dbbaac56d 100644

documentation/ref-manual/variables.rst +0 -0
@@ -9884,6 +9884,78 @@ system and gives an overview of their function

and contents.

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

Quoted 4 lines
documentation/ref-manual/variables.rst +1 -0
        See the :ref:`ref-classes-uboot-sign` class for details.
 
+   :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`

Please order this alphabetically, so before UBOOT_FIT_DESC.

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      ARM Trusted Firmware (ATF) is a reference implementation of

secure world

I would recommend also mentioning the new name (Trusted Firmware-A aka TF-A).

Additionally, provide a link to the project, e.g.
https://www.trustedfirmware.org/projects/tf-a

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      software for Arm A-Profile architectures (Armv8-A and Armv7-A),

including

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

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+      an Exception Level 3 (EL3) Secure Monitor. This variable enables the
+      generation of a U-Boot FIT image with an ATF image.
+
+      Its default value is "0", so set it to "1" to enable this functionality::
+
+         UBOOT_FIT_ARM_TRUSTED_FIRMWARE = "1"
+
+   :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`
+      Specifies the path to the ATF image. Its default value is "bl31.bin"
+

Missing the double colon here to make the line below a code-block.

Please also reiterate what ATF stands for and provide the new name (with its abbreviation as well).

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

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+         UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE ?= "bl31.bin"
+
+   :term:`UBOOT_FIT_TEE`

Please order this alphabetically, so before UBOOT_FITIMAGE_ENABLE.

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      A Trusted Execution Environment (TEE) is a secure environment for

executing

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

Quoted 2 lines
documentation/ref-manual/variables.rst +2 -0
+      code, ensuring high levels of trust in asset management within the
+      surrounding system. This variable enables the generation of a

U-Boot FIT

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

Quoted 8 lines
documentation/ref-manual/variables.rst +8 -0
+      image with a TEE image.
+
+      Its default value is "0", so set it to "1" to enable this functionality::
+
+         UBOOT_FIT_TEE = "1"
+
+   :term:`UBOOT_FIT_TEE_IMAGE`
+      Specifies the path to the TEE image. Its default value is

"tee-raw.bin"::

Please reiterate what TEE stands for.

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

Quoted 5 lines
documentation/ref-manual/variables.rst +5 -0
+
+         UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
+
+   :term:`UBOOT_FIT_USER_SETTINGS`
+      Add a user-specific snippet to the ITS. Users can include their

custom ITS

Please mention it's for U-Boot ITS and specifically to add to the /images node.

Please specify what ITS stands for.

You could also provide a link to the specs, c.f.
https://fitspec.osfw.foundation/

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

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+      snippet in this variable.
+
+      Ex::

s/snippet in this variable./snippet in this variable, e.g.::/

Quoted 4 lines
documentation/ref-manual/variables.rst +4 -0
+
+         UBOOT_FIT_FWA_ITS = '\
+             fwa {\n\
+                 description = \"FW A\";\n\

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

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+                 data = /incbin/(\"fwa.bin\");\n\
+                 type = \"fwtype\";\n\
+                 arch = \"fwarch\";\n\
+                 os = \"fwos\";\n\
+                 load = <0xb2000000>;\n\
+                 entry = <0xb2000000>;\n\
+                 compression = \"none\";\n\
+             };\n\
+         '
+

question: are the \n necessary? If so, we should document it that newlines are stripped and if they need to be added, they need to be explicitly added, via \n.

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

Quoted 3 lines
documentation/ref-manual/variables.rst +3 -0
+         UBOOT_FIT_USER_SETTINGS = "${UBOOT_FIT_FWA_ITS}"
+
+       The generated Image Tree Source (ITS):

Missing second colon to make the below a code block.

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

Quoted 12 lines
documentation/ref-manual/variables.rst +12 -0
+
+         fwa {
+             description = "FW A";
+             data = /incbin/("fwa.bin");
+             type = "fwtype";
+             arch = "fwarch";
+             os = "fwos";
+             load = <0xb2000000>;
+             entry = <0xb2000000>;
+             compression = "none";
+         };
+

This is not properly aligned. It should be three whitespaces compared to the paragraph it's rattached to (i.e. where T character in "The generated Image Tree Source" is).

I am not entirely sure what should be understood from this example though? Maybe provide a full dummy ITS without this variable set and then with the variable set and show the changes?

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+   :term:`UBOOT_FIT_CONF_USER_LOADABLES`

Please order this alphabetically, so before UBOOT_FIT_USER_SETTINGS.

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      Adds a user-defined image to the loadable property of the

configuration node.

s/loadable/``loadables``/

s/of the configuration node/of the configuration node of the U-Boot Image Tree Source (ITS)/

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

Quoted 4 lines
documentation/ref-manual/variables.rst +4 -0
+      It should be a comma-separated list of strings.
+
+      Ex::
+

s/It should be a comma-separated list of strings./It should be a comma-separated list of strings, e.g.::/

Quoted 3 lines

I believe each string needs to be surrounded by quotes too (like in your example)? If that really is the case, then we should mention it as well.

Thanks for your review and all your suggestions.
I re-send v3 patch here, https://patchwork.yoctoproject.org/project/docs/patch/[email protected]/
Thanks-Jamin

Quoted 4 lines

Looking good otherwise!

Cheers,
Quentin