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 7, 2025 – Mar 12, 2025

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Jamin Lin

author
#0 lore raw

PATCH v3 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   |  13 ++++
 documentation/ref-manual/variables.rst | 102 +++++++++++++++++++++++++
 2 files changed, 115 insertions(+)
documentation/ref-manual/classes.rst +13 -0
index b93279ff6..02749df3d 100644
@@ -3401,6 +3401,19 @@ 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`: include the Trusted Firmware-A (TF-A) image
+   in the U-Boot FIT image.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`: specifies the path to the
+   Trusted Firmware-A (TF-A) image.
+-  :term:`UBOOT_FIT_TEE`: include the Trusted Execution Environment (TEE) image in the
+   U-Boot FIT image.
+-  :term:`UBOOT_FIT_TEE_IMAGE`: specifies the path to the Trusted Execution Environment
+   (TEE) image.
+-  :term:`UBOOT_FIT_USER_SETTINGS`: adds a user-specific snippet to the ITS. Users can
+   include their custom ITS snippet in this variable.
+-  :term:`UBOOT_FIT_CONF_USER_LOADABLES`: adds one or more user-defined images to the
+   loadables property of the configuration node. It should be a comma-separated list of
+   strings and each string needs to be surrounded by quotes too.
 
 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 +102 -0

114 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw

Hi Jamin,

Quoted 37 lines · Jamin Lin

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

---
 documentation/ref-manual/classes.rst   |  13 ++++
 documentation/ref-manual/variables.rst | 102 +++++++++++++++++++++++++
 2 files changed, 115 insertions(+)
documentation/ref-manual/classes.rst +13 -0
index b93279ff6..02749df3d 100644
@@ -3401,6 +3401,19 @@ 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`: include the Trusted Firmware-A (TF-A) image
+   in the U-Boot FIT image.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`: specifies the path to the
+   Trusted Firmware-A (TF-A) image.
+-  :term:`UBOOT_FIT_TEE`: include the Trusted Execution Environment (TEE) image in the
+   U-Boot FIT image.
+-  :term:`UBOOT_FIT_TEE_IMAGE`: specifies the path to the Trusted Execution Environment
+   (TEE) image.
+-  :term:`UBOOT_FIT_USER_SETTINGS`: adds a user-specific snippet to the ITS. Users can
+   include their custom ITS snippet in this variable.
+-  :term:`UBOOT_FIT_CONF_USER_LOADABLES`: adds one or more user-defined images to the
+   loadables property of the configuration node. It should be a comma-separated list of
+   strings and each string needs to be surrounded by quotes too.
 
 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 +0 -0
index 60984cc8f..3c7e627f5 100644

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

Quoted 5 lines
documentation/ref-manual/variables.rst +2 -0
@@ -9826,6 +9826,28 @@ system and gives an overview of their function and contents.
 
       See `more details about #address-cells <https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.
 
+   :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`
+      Trusted Firmware-A (TF-A) <https://www.trustedfirmware.org/projects/tf-a> is a reference implementation of

Can you use the hyperlink syntax instead:

Trusted Firmware-A (TF-A) <https://www.trustedfirmware.org/projects/tf-a>__

Also when possible try to wrap the lines to 80 chars, as per our standards.md file.

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

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+      secure world 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 Trusted Firmware-A (TF-A) 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 Trusted Firmware-A (TF-A) image. Its default value is "bl31.bin"::

I suppose this path is relative to $DEPLOY_DIR_IMAGE? Or $B? Can you maybe specify this here?

Same for the UBOOT_*_IMAGE variables added by this patch.

Quoted 27 lines
documentation/ref-manual/variables.rst +20 -0
+
+         UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE ?= "bl31.bin"
+
+   :term:`UBOOT_FIT_CONF_USER_LOADABLES`
+      Adds one or more user-defined images to the ``loadables`` property of the configuration node
+      of the U-Boot Image Tree Source (ITS). It should be a comma-separated list of strings and
+      each string needs to be surrounded by quotes too, e.g.::
+
+         UBOOT_FIT_CONF_USER_LOADABLES = '\"fwa\", \"fwb\"'
+
    :term:`UBOOT_FIT_DESC`
       Specifies the description string encoded into a U-Boot fitImage. The default
       value is set by the :ref:`ref-classes-uboot-sign` class as follows::
@@ -9874,6 +9896,86 @@ system and gives an overview of their function and contents.
       of bits. The default value for this variable is set to "2048"
       by the :ref:`ref-classes-uboot-sign` class.
 
+   :term:`UBOOT_FIT_TEE`
+      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 Trusted Execution Environment (TEE) image.
+
+      Its default value is "0", so set it to "1" to enable this functionality::
+
+         UBOOT_FIT_TEE = "1"
+

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

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+   :term:`UBOOT_FIT_TEE_IMAGE`
+      Specifies the path to the Trusted Execution Environment (TEE) image. Its
+      default value is "tee-raw.bin"::
+
+         UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
+
+   :term:`UBOOT_FIT_USER_SETTINGS`
+      Add a user-specific snippet to the U-Boot Image Tree Source (ITS). This variable
+      allows the user to add one or more user-defined ``/images`` node to the U-Boot
+      Image Tree Source (ITS). For more details, please refer to <https://fitspec.osfw.foundation/>.

You can remove <> surrounding the link here

Quoted 53 lines
documentation/ref-manual/variables.rst +53 -0
+
+      The original contents of the U-Boot Image Tree Source (ITS) are as follows::
+
+         images {
+             uboot {
+                 description = "U-Boot image";
+                 data = /incbin/("u-boot-nodtb.bin");
+                 type = "standalone";
+                 os = "u-boot";
+                 arch = "";
+                 compression = "none";
+                 load = <0x80000000>;
+                 entry = <0x80000000>;
+             };
+         };
+
+      Users can include their custom ITS snippet in this variable, e.g.::
+
+         UBOOT_FIT_FWA_ITS = '\
+             fwa {\n\
+                 description = \"FW A\";\n\
+                 data = /incbin/(\"fwa.bin\");\n\
+                 type = \"firmware\";\n\
+                 arch = \"\";\n\
+                 os = \"\";\n\
+                 load = <0xb2000000>;\n\
+                 entry = <0xb2000000>;\n\
+                 compression = \"none\";\n\
+             };\n\
+         '
+
+         UBOOT_FIT_USER_SETTINGS = "${UBOOT_FIT_FWA_ITS}"
+
+      Newlines are stripped, and if they need to be included, they must be explicitly added using ``\n``.
+
+      The generated contents of the U-Boot Image Tree Source (ITS) are as follows::
+
+          images {
+              uboot {
+                  description = "U-Boot image";
+                  data = /incbin/("u-boot-nodtb.bin");
+                  type = "standalone";
+                  os = "u-boot";
+                  arch = "";
+                  compression = "none";
+                  load = <0x80000000>;
+                  entry = <0x80000000>;
+              };
+              fwa {
+                  description = "FW A";
+                  data = /incbin/("fwa.bin");
+                  type = "firmware";
+                  arch = "";

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

Quoted 10 lines
documentation/ref-manual/variables.rst +7 -0
+                  os = "";
+                  load = <0xb2000000>;
+                  entry = <0xb2000000>;
+                  compression = "none";
+              };
+          };
+
    :term:`UBOOT_FITIMAGE_ENABLE`
       This variable allows to generate a FIT image for U-Boot, which is one
       of the ways to implement a verified boot process.

Thanks,
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#2 lore raw

Hi Antonin

Quoted 214 lines

From: [email protected] <[email protected]> On Behalf Of Antonin Godard via lists.yoctoproject.org
Sent: Tuesday, March 11, 2025 6:23 PM
To: Jamin Lin <[email protected]>; [email protected]
Cc: Troy Lee <[email protected]>
Subject: Re: [docs] [PATCH v3] ref-manual: uboot-sign: Add how to enable ATF, TEE and User defined snippet ITS for U-Boot FIT image

Hi Jamin,

Quoted 1 line · Jamin Lin

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

generation.

Quoted 14 lines
---
 documentation/ref-manual/classes.rst   |  13 ++++
 documentation/ref-manual/variables.rst | 102
+++++++++++++++++++++++++
 2 files changed, 115 insertions(+)
documentation/ref-manual/classes.rst +0 -0
index b93279ff6..02749df3d 100644

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

Quoted 1 line
documentation/ref-manual/classes.rst +0 -0
@@ -3401,6 +3401,19 @@ 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`: include the Trusted

Firmware-A (TF-A) image

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

Quoted 2 lines
documentation/ref-manual/classes.rst +2 -0
+   in the U-Boot FIT image.
+-  :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE`: specifies the

path to the

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

Quoted 2 lines
documentation/ref-manual/classes.rst +2 -0
+   Trusted Firmware-A (TF-A) image.
+-  :term:`UBOOT_FIT_TEE`: include the Trusted Execution Environment

(TEE) image in the

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

Quoted 2 lines
documentation/ref-manual/classes.rst +2 -0
+   U-Boot FIT image.
+-  :term:`UBOOT_FIT_TEE_IMAGE`: specifies the path to the Trusted

Execution Environment

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

Quoted 2 lines
documentation/ref-manual/classes.rst +2 -0
+   (TEE) image.
+-  :term:`UBOOT_FIT_USER_SETTINGS`: adds a user-specific snippet to the

ITS. Users can

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

Quoted 2 lines
documentation/ref-manual/classes.rst +2 -0
+   include their custom ITS snippet in this variable.
+-  :term:`UBOOT_FIT_CONF_USER_LOADABLES`: adds one or more

user-defined images to the

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

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

comma-separated list of

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

Quoted 10 lines
documentation/ref-manual/classes.rst +1 -0
+   strings and each string needs to be surrounded by quotes too.
 
 See U-Boot's documentation for details about `verified boot

<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/ver
ified-boot.txt>`__ diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 60984cc8f..3c7e627f5 100644

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

and contents.

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

Quoted 2 lines
documentation/ref-manual/variables.rst +0 -0
       See `more details about #address-cells

<https://elinux.org/Device_Tree_Usage#How_Addressing_Works>`__.

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

Quoted 5 lines
documentation/ref-manual/variables.rst +4 -0
+   :term:`UBOOT_FIT_ARM_TRUSTED_FIRMWARE`
+      Trusted Firmware-A (TF-A)
+ <https://www.trustedfirmware.org/projects/tf-a> is a reference
+ implementation of

Can you use the hyperlink syntax instead:

`Trusted Firmware-A (TF-A)
<https://www.trustedfirmware.org/projects/tf-a>`__

Also when possible try to wrap the lines to 80 chars, as per our standards.md file.

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

Quoted 2 lines
documentation/ref-manual/variables.rst +2 -0
+      secure world software for Arm A-Profile architectures
+      (Armv8-A and Armv7-A), including an Exception Level 3 (EL3) Secure

Monitor. This variable enables the

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      generation of a U-Boot FIT image with an Trusted Firmware-A (TF-A)

image.

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

Quoted 7 lines
documentation/ref-manual/variables.rst +7 -0
+
+      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 Trusted Firmware-A (TF-A) image. Its

default value is "bl31.bin"::

I suppose this path is relative to $DEPLOY_DIR_IMAGE? Or $B? Can you maybe specify this here?

Same for the UBOOT_*_IMAGE variables added by this patch.

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_ARM_TRUSTED_FIRMWARE_IMAGE ?= "bl31.bin"
+
+   :term:`UBOOT_FIT_CONF_USER_LOADABLES`
+      Adds one or more user-defined images to the ``loadables`` property

of the configuration node

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      of the U-Boot Image Tree Source (ITS). It should be a

comma-separated list of strings and

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

Quoted 6 lines
documentation/ref-manual/variables.rst +4 -0
+      each string needs to be surrounded by quotes too, e.g.::
+
+         UBOOT_FIT_CONF_USER_LOADABLES = '\"fwa\", \"fwb\"'
+
    :term:`UBOOT_FIT_DESC`
       Specifies the description string encoded into a U-Boot fitImage. The

default

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

Quoted 2 lines
documentation/ref-manual/variables.rst +0 -0
       value is set by the :ref:`ref-classes-uboot-sign` class as follows::
@@ -9874,6 +9896,86 @@ 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.

Quoted 5 lines
documentation/ref-manual/variables.rst +2 -0
       of bits. The default value for this variable is set to "2048"
       by the :ref:`ref-classes-uboot-sign` class.
 
+   :term:`UBOOT_FIT_TEE`
+      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 9902

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 Trusted Execution Environment (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 Trusted Execution Environment (TEE) image.

Its

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

Quoted 6 lines
documentation/ref-manual/variables.rst +6 -0
+      default value is "tee-raw.bin"::
+
+         UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
+
+   :term:`UBOOT_FIT_USER_SETTINGS`
+      Add a user-specific snippet to the U-Boot Image Tree Source (ITS).

This variable

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      allows the user to add one or more user-defined ``/images`` node to

the U-Boot

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

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      Image Tree Source (ITS). For more details, please refer to

<https://fitspec.osfw.foundation/>.

You can remove <> surrounding the link here

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

Quoted 2 lines
documentation/ref-manual/variables.rst +2 -0
+
+      The original contents of the U-Boot Image Tree Source (ITS) are as

follows::

Quoted 22 lines
documentation/ref-manual/variables.rst +22 -0
+
+         images {
+             uboot {
+                 description = "U-Boot image";
+                 data = /incbin/("u-boot-nodtb.bin");
+                 type = "standalone";
+                 os = "u-boot";
+                 arch = "";
+                 compression = "none";
+                 load = <0x80000000>;
+                 entry = <0x80000000>;
+             };
+         };
+
+      Users can include their custom ITS snippet in this variable, e.g.::
+
+         UBOOT_FIT_FWA_ITS = '\
+             fwa {\n\
+                 description = \"FW A\";\n\
+                 data = /incbin/(\"fwa.bin\");\n\
+                 type = \"firmware\";\n\
+                 arch = \"\";\n\

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

Quoted 10 lines
documentation/ref-manual/variables.rst +10 -0
+                 os = \"\";\n\
+                 load = <0xb2000000>;\n\
+                 entry = <0xb2000000>;\n\
+                 compression = \"none\";\n\
+             };\n\
+         '
+
+         UBOOT_FIT_USER_SETTINGS = "${UBOOT_FIT_FWA_ITS}"
+
+      Newlines are stripped, and if they need to be included, they must be

explicitly added using ``\n``.

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

Quoted 2 lines
documentation/ref-manual/variables.rst +2 -0
+
+      The generated contents of the U-Boot Image Tree Source (ITS) are as

follows::

Quoted 16 lines
documentation/ref-manual/variables.rst +16 -0
+
+          images {
+              uboot {
+                  description = "U-Boot image";
+                  data = /incbin/("u-boot-nodtb.bin");
+                  type = "standalone";
+                  os = "u-boot";
+                  arch = "";
+                  compression = "none";
+                  load = <0x80000000>;
+                  entry = <0x80000000>;
+              };
+              fwa {
+                  description = "FW A";
+                  data = /incbin/("fwa.bin");
+                  type = "firmware";

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

Quoted 10 lines
documentation/ref-manual/variables.rst +8 -0
+                  arch = "";
+                  os = "";
+                  load = <0xb2000000>;
+                  entry = <0xb2000000>;
+                  compression = "none";
+              };
+          };
+
    :term:`UBOOT_FITIMAGE_ENABLE`
       This variable allows to generate a FIT image for U-Boot, which is

one

Quoted 5 lines

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

Quoted 1 line
documentation/ref-manual/variables.rst +0 -0
       of the ways to implement a verified boot process.

Thanks,
Antonin

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

Thanks-Jamin

Quoted 4 lines

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com