diff mbox series

[1/2] fitimage: add support for specifying FITIMAGE_CONFIG_FDTO_PREFIX

Message ID 20260908112243.1085856-1-f.pflug@pengutronix.de
State New
Headers show
Series [1/2] fitimage: add support for specifying FITIMAGE_CONFIG_FDTO_PREFIX | expand

Commit Message

Fabian Pflug Sept. 8, 2026, 11:22 a.m. UTC
From: Ahmad Fatoum <a.fatoum@pengutronix.de>

FITIMAGE_CONFIG_PREFIX is only used for configurations that contain a
kernel image, but not for mere overlay configurations.

This is inconsistent with the original kernel-fitimage.bbclass.
As the name may be hardcoded in the bootloader, add a new
FITIMAGE_CONFIG_FDTO_PREFIX to be able to customize the prefix for
device tree overlay configuration nodes as well.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
 meta-oe/classes/fitimage.bbclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/classes/fitimage.bbclass b/meta-oe/classes/fitimage.bbclass
index 0e2a02636c..adcfec0f0e 100644
--- a/meta-oe/classes/fitimage.bbclass
+++ b/meta-oe/classes/fitimage.bbclass
@@ -88,7 +88,9 @@  FITIMAGE_HASH_ALGO[doc] = "Hash algorithm to use"
 FITIMAGE_ENCRYPT_ALGO ?= "rsa2048"
 FITIMAGE_ENCRYPT_ALGO[doc] = "Signature algorithm to use"
 FITIMAGE_CONFIG_PREFIX ?= "conf-"
-FITIMAGE_CONFIG_PREFIX[doc] = "Prefix to use for FIT configuration node name"
+FITIMAGE_CONFIG_PREFIX[doc] = "Prefix to use for bootable FIT configuration node name"
+FITIMAGE_CONFIG_FDTO_PREFIX ?= ""
+FITIMAGE_CONFIG_FDTO_PREFIX[doc] = "Prefix to use for fdto FIT configuration node name"
 FITIMAGE_CMDLINE ?= ""
 FITIMAGE_CMDLINE[doc] = "Kernel command line to embed in the FIT configuration node"
 
@@ -347,9 +349,11 @@  def fitimage_emit_section_config(d, fd, dtb, kernelcount, ramdiskcount, setupcou
 #
 def fitimage_emit_section_config_fdto(d, fd, dtb, compatible):
     sign = d.getVar("FITIMAGE_SIGN")
+    conf_prefix = d.getVar('FITIMAGE_CONFIG_FDTO_PREFIX') or ""
+
     bb.note("Adding overlay config section to ITS file")
 
-    fd.write(f'\t\t{dtb} {{\n')
+    fd.write(f'\t\t{conf_prefix}{dtb} {{\n')
     fd.write(f'\t\t\tdescription = "Device Tree Overlay";\n')
     fd.write(f'\t\t\tfdt = "fdt-{dtb}";\n')
     if compatible: