From e1f5f22b3023dc7a2174fcb776d459faf2405db2 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 8 Sep 2026 13:22:42 +0200 Subject: [PATCH] fitimage: add support for specifying FITIMAGE_CONFIG_FDTO_PREFIX 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 Signed-off-by: Fabian Pflug Signed-off-by: Khem Raj --- meta-oe/classes/fitimage.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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: