public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <kavinaya@qti.qualcomm.com>, <openembedded-core@lists.openembedded.org>
Cc: "Alexander Kanavin" <alex.kanavin@gmail.com>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Subject: Re: [OE-core] [PATCH v5] kernel-fit-image: allow extending compatible string property for DTBs
Date: Sun, 12 Oct 2025 09:58:56 +0200	[thread overview]
Message-ID: <DDG6NHU3783G.1S9MK3XL1X71V@bootlin.com> (raw)
In-Reply-To: <20251011094815.950261-1-kavinaya@qti.qualcomm.com>

On Sat Oct 11, 2025 at 11:48 AM CEST, Kavinaya S via lists.openembedded.org wrote:
> The Linux kernel allows multiple DTBs to share the same compatible string.
> For example:
> qcs6490-rb3gen2.dtb
> qcs6490-rb3gen2-vision-mezzanine.dtb
> qcs6490-rb3gen2-industrial-mezzanine.dtb
>
> All of these use the same base compatible string:
> compatible = "qcom,qcs6490-rb3gen2", "qcom,qcm6490";
>
> Since the latter two DTBs are overlays on top of the base DTB and do not
> modify platform properties, they retain the same compatible string.
>
> When these DTBs are bundled into a single fitImage, the bootloader cannot
> distinguish between them due to identical compatible strings.
>
> To address this, introduce a mechanism to extend the compatible string
> using a OE build variable:
> FIT_DTB_COMPATIBLE_EXTENTION[dtb_name] = "extension"
>
> This appends the extension to the first compatible string in the DTB,
> resulting in unique entries in the generated .its file. For example:
> FIT_DTB_COMPATIBLE_EXTENTION[qcs6490-rb3gen2-vision-mezzanine] = "vision"
> FIT_DTB_COMPATIBLE_EXTENTION[qcs6490-rb3gen2-industrial-mezzanine] = "industrial"
>
> Generates:
> compatible = "qcom,qcs6490-rb3gen2-vision", "qcom,qcm6490";
> compatible = "qcom,qcs6490-rb3gen2-industrial", "qcom,qcm6490";
>
> Suggested-By: Alexander Kanavin <alex.kanavin@gmail.com>
> Suggested-By: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Kavinaya S <kavinaya@qti.qualcomm.com>
> ---

Hi Kavinaya,

Thanks for the new version.

It looks like this is breaking some selftest:

AssertionError: 'ti,am335x-bone-green-subtypeA' not found in '/dts-v1/;\n\n/ {\n        description = "Kernel fitImage for Poky (Yocto Project Reference Distro)/1.0/beaglebone-yocto";\n        #address-cells = <1>;\n        images {\n                kernel-1 {\n                        description = "Linux kernel";\n                        type = "kernel";\n                        compression = "none";\n                        data = /incbin/("linux.bin");\n                        arch = "arm";\n                        os = "linux";\n                        load = <0x20008000>;\n                        entry = <0x20008000>;\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n                fdt-am335x-bone.dtb {\n                        description = "Flattened Device Tree blob";\n                        type = "flat_dt";\n                        compression = "none";\n                        data = /incbin/("am335x-bone.dtb");\n                        arch = "arm";\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n                fdt-am335x-boneblack.dtb {\n                        description = "Flattened Device Tree blob";\n                        type = "flat_dt";\n                        compression = "none";\n                        data = /incbin/("am335x-boneblack.dtb");\n                        arch = "arm";\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n                fdt-am335x-bonegreen.dtb {\n                        description = "Flattened Device Tree blob";\n                        type = "flat_dt";\n                        compression = "none";\n                        data = /incbin/("am335x-bonegreen.dtb");\n                        arch = "arm";\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n        };\n        configurations {\n                default = "conf-am335x-bone.dtb";\n                conf-am335x-bone.dtb {\n                        description = "1 Linux kernel, FDT blob";\n                        kernel = "kernel-1";\n                        fdt = "fdt-am335x-bone.dtb";\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n                conf-am335x-boneblack.dtb {\n                        description = "0 Linux kernel, FDT blob";\n                        kernel = "kernel-1";\n                        fdt = "fdt-am335x-boneblack.dtb";\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n                conf-am335x-bonegreen.dtb {\n                        description = "0 Linux kernel, FDT blob";\n                        kernel = "kernel-1";\n                        fdt = "fdt-am335x-bonegreen.dtb";\n                        hash-1 {\n                                algo = "sha256";\n                        };\n                };\n        };\n};\n'
...
2025-10-11 15:18:18,764 - oe-selftest - INFO - fitimage.KernelFitImageRecipeTests.test_fitimage_compatible_extn_in_its (subunit.RemotedTestCase)
2025-10-11 15:18:18,771 - oe-selftest - INFO -  ... FAIL

Can you have a look at this failure, please?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  parent reply	other threads:[~2025-10-12  7:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-11  9:48 [PATCH v5] kernel-fit-image: allow extending compatible string property for DTBs Kavinaya S
2025-10-11 17:32 ` Alexander Kanavin
2025-10-11 19:03 ` [OE-core] " Gyorgy Sarvari
2025-10-11 20:07 ` Dmitry Baryshkov
2025-10-12  4:18   ` Kavinaya S
2025-10-12 15:06     ` Dmitry Baryshkov
2025-10-12 16:17       ` Kavinaya S
2025-10-12  7:58 ` Mathieu Dubois-Briand [this message]
2025-10-12  9:45   ` Kavinaya S

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=DDG6NHU3783G.1S9MK3XL1X71V@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=alex.kanavin@gmail.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=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