Openembedded Core Discussions
 help / color / mirror / Atom feed
From: kavinaya@qti.qualcomm.com
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2] kernel-fitimage: add support for custom ITS file override
Date: Wed, 24 Sep 2025 01:30:38 -0700	[thread overview]
Message-ID: <3586.1758702638415588291@lists.openembedded.org> (raw)
In-Reply-To: <809c00d00ea6231c966cecd56a8dfca39f68a02c.camel@siemens.com>

On Tue, Sep 23, 2025 at 02:28 AM, Adrian Freihofer wrote:

>
> Could you clarify the specific need for this custom ITS file? Perhaps
> the desired outcome could be achieved by leveraging the existing
> KERNEL_DEVICETREE_* variables without needing to introduce a separate
> custom file that overrides the generated one.
> 
> I would like to understand:
> * What specific limitations or requirements does the generated ITS
> file not meet for your use case?
> * Could you share an example of how your custom ITS file differs from
> what's generated?
>
Hi Adrian,

1.The compatible string format required by our UEFI implementation is different from what dynamic generation allows. The format we rely on is:
   compatible = "qcom,<SoC>[-<soc_version>][-<foundry_id>]-<board>[/<subtype>][-<pmic>][-<board_version>]"
   This structure enables precise identification of the appropriate DTB for each board variant.

2.As in the upstream kernel Makefile for QCOM platforms (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/qcom/Makefile ), overlays are used to generate composite DTBs:
 
   dtb-$(CONFIG_ARCH_QCOM)	+= qcs6490-rb3gen2.dtb
   qcs6490-rb3gen2-vision-mezzanine-dtbs := qcs6490-rb3gen2.dtb qcs6490-rb3gen2-vision-mezzanine.dtbo
   qcs6490-rb3gen2-industrial-mezzanine-dtbs := qcs6490-rb3gen2.dtb qcs6490-rb3gen2-industrial-mezzanine.dtbo

   In the above cases, the base DTB remains the same, but the overlays differ. Without manual .its file support, we cannot assign unique compatible strings to these variants.

The ITS file generated dynamically will look like:
             configurations {
                default = "conf-qcs6490-rb3gen2.dtb";
                conf-qcs6490-rb3gen2.dtb {
                        description = "1 Linux kernel, FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-qcs6490-rb3gen2.dtb";
                        compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
                        hash-1 {
                                algo = "sha256";
                        };
                };
                conf-qcs6490-rb3gen2-vision-mezzanine.dtb {
                        description = "0 Linux kernel, FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-qcs6490-rb3gen2-vision-mezzanine.dtb";
                        compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
                        hash-1 {
                                algo = "sha256";
                        };
                };
                conf-qcs6490-rb3gen2-industrial-mezzanine.dtb {
                        description = "0 Linux kernel, FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-qcs6490-rb3gen2-industrial-mezzanine.dtb";
                        compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
                        hash-1 {
                                algo = "sha256";
                };
               };




The ITS file that would meet our requirements will look like:
        configurations {
                default = "conf-qcs6490-rb3gen2.dtb";
                conf-qcs6490-rb3gen2.dtb {
                        description = "1 Linux kernel, FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-qcs6490-rb3gen2.dtb";
                        compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
                        hash-1 {
                                algo = "sha256";
                        };
                };
                conf-qcs6490-rb3gen2-vision-mezzanine.dtb {
                        description = "0 Linux kernel, FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-qcs6490-rb3gen2-vision-mezzanine.dtb";
                        compatible = "qcom,qcs6490-rb-subtype5";
                        hash-1 {
                                algo = "sha256";
                        };
                };
                conf-qcs6490-rb3gen2-industrial-mezzanine.dtb {
                        description = "0 Linux kernel, FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-qcs6490-rb3gen2-industrial-mezzanine.dtb";
                        compatible = "qcom,qcs6490-rb-subtype2";
                        hash-1 {
                                algo = "sha256";
                };
               };
Please look into the difference in the compatible string in both cases.

Thanks,
Kavinaya



  reply	other threads:[~2025-09-24  8:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250919073335.2069114-1-kavinaya@qti.qualcomm.com>
2025-09-19  7:33 ` [PATCH 1/2] kernel-fitimage: add support for custom ITS file override Kavinaya S
2025-09-21 11:40   ` [OE-core] " Freihofer, Adrian
2025-09-22  8:41     ` kavinaya
2025-09-22  9:58       ` [OE-core] " Alexander Kanavin
     [not found]   ` <1867495AF42A64B8.23261@lists.openembedded.org>
2025-09-22 20:58     ` Freihofer, Adrian
2025-09-24  8:30       ` kavinaya [this message]
2025-09-24  9:46       ` kavinaya
2025-09-26  3:42         ` kavinaya
2025-09-26  7:31           ` [OE-core] " Alexander Kanavin
2025-09-29 14:26             ` kavinaya
2025-09-19  7:33 ` [PATCH 2/2] image-fitimage.conf: introduce CUSTOM_ITS_FILE variable Kavinaya S
2025-09-22  9:44   ` [OE-core] " Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3586.1758702638415588291@lists.openembedded.org \
    --to=kavinaya@qti.qualcomm.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox