]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
uboot-sign: allow customizing the FIT configuration description
authorRicardo Salveti <ricardo.salveti@oss.qualcomm.com>
Mon, 22 Jun 2026 18:09:09 +0000 (18:09 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Jun 2026 09:37:38 +0000 (10:37 +0100)
The U-Boot fitImage configuration node description was hardcoded to
"Boot with signed U-Boot FIT". Some targets need a board/hardware
specific configuration description so the correct configuration can be
identified when the SPL loads the U-Boot FIT (SPL -> u-boot.itb).

When CONFIG_SPL_LOAD_FIT is enabled, the SPL selects a U-Boot FIT
configuration via fit_find_config_node(), which matches each
configuration node's "description" property against the board's
board_fit_config_name_match() hook. Boards that override this hook
(e.g. CZ.NIC Turris MOX matching "armada-3720-turris-mox", Engicam
i.CoreM6 matching "imx6q-icore", StarFive VisionFive2 and Siemens
IOT2050) require the description to be a specific board/DT-derived
string. The previously hardcoded "Boot with signed U-Boot FIT" can
never match such a hook; it only works by falling through to the
default configuration and breaks when the right configuration must be
selected by name.

Introduce UBOOT_FIT_CONF_DESC to make the configuration node
description overridable, mirroring the existing UBOOT_FIT_DESC variable
used for the root node description. The default value preserves the
previous behaviour, so existing layers are unaffected.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/uboot-sign.bbclass
meta/lib/oeqa/selftest/cases/fitimage.py

index 2b10e71730285c0a88b7345b496f993d6018426a..78d85aaa9c4f3b178bf2387015beded707bc29d7 100644 (file)
@@ -103,6 +103,9 @@ UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
 # User specific settings
 UBOOT_FIT_USER_SETTINGS ?= ""
 
+# U-Boot fitImage configuration description
+UBOOT_FIT_CONF_DESC ?= "Boot with signed U-Boot FIT"
+
 # Sets the firmware property to select the image to boot first.
 # If not set, the first entry in "loadables" is used instead.
 UBOOT_FIT_CONF_FIRMWARE ?= ""
@@ -452,7 +455,7 @@ EOF
     configurations {
         default = "conf";
         conf {
-            description = "Boot with signed U-Boot FIT";
+            description = "${UBOOT_FIT_CONF_DESC}";
             ${conf_firmware}
             loadables = ${conf_loadables};
             fdt = "fdt";
index 67b03c1d9f54c2a710bc50f86874a5f464237fc0..c5f29752230d6b9a6c8f64b3513a30e556c2b8d0 100644 (file)
@@ -1641,6 +1641,7 @@ class UBootFitImageTests(FitImageTestCase):
             'UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE',
             'UBOOT_FIT_ARM_TRUSTED_FIRMWARE_LOADADDRESS',
             'UBOOT_FIT_ARM_TRUSTED_FIRMWARE',
+            'UBOOT_FIT_CONF_DESC',
             'UBOOT_FIT_CONF_USER_LOADABLES',
             'UBOOT_FIT_DESC',
             'UBOOT_FIT_HASH_ALG',
@@ -1757,7 +1758,7 @@ class UBootFitImageTests(FitImageTestCase):
             loadables.insert(0, "atf")
         its_field_check += [
             'default = "conf";',
-            'description = "Boot with signed U-Boot FIT";',
+            'description = "%s";' % bb_vars['UBOOT_FIT_CONF_DESC'],
             'loadables = "%s";' % '", "'.join(loadables),
             'fdt = "fdt";',
         ]
@@ -1915,6 +1916,9 @@ class UBootFitImageTests(FitImageTestCase):
                      Image Tree Source. Not all the fields are tested,
                      only the key fields that wont vary between
                      different architectures.
+                     3. The custom root node (UBOOT_FIT_DESC) and
+                     configuration node (UBOOT_FIT_CONF_DESC) descriptions
+                     are honoured in the Image Tree Source.
         Product:     oe-core
         Author:      Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
                      based on work by Usama Arif <usama.arif@arm.com>
@@ -1930,6 +1934,7 @@ UBOOT_FITIMAGE_ENABLE = "1"
 UBOOT_LOADADDRESS = "0x80080000"
 UBOOT_ENTRYPOINT = "0x80080000"
 UBOOT_FIT_DESC = "A model description"
+UBOOT_FIT_CONF_DESC = "Boot board XYZ config"
 """
         config = FitImageTestCase._config_add_machine_settings(config, machine, keys=["UBOOT_MACHINE", "SPL_BINARY"])
         self.write_config(config)