public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Gyorgy Sarvari <skandigraun@gmail.com>
To: kavinaya@qti.qualcomm.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] kernel-fit-image: enable compatible string for kernel built-in DTBs
Date: Sun, 12 Oct 2025 19:32:06 +0200	[thread overview]
Message-ID: <1ed65c41-c418-416d-ab99-705116ce4221@gmail.com> (raw)
In-Reply-To: <20251012171634.2110563-1-kavinaya@qti.qualcomm.com>

On 10/12/25 19:16, Kavinaya S via lists.openembedded.org wrote:
> At present, the kernel-fit-image bbclass is adding compatible strings only
> for external DTBs, omitting them for DTBs built from the kernel tree. This
> behavior is limiting the ability to clearly identify the DTBs in FIT image
> that includes multiple kernel built-in DTBs and possibly mix of in tree and
> external ones, due to lack of consistent compatible strings.
>
> To fix this, introduce a new BitBake variable, FIT_DTB_ADD_COMPATIBLE
> when set to "True", the bbclass will extract and include the compatible
> string from kernel-built DTBs also in the .its file, just like it does
> for external DTBs.
>
> Signed-off-by: Kavinaya S <kavinaya@qti.qualcomm.com>
> ---
>  meta/classes-recipe/kernel-fit-image.bbclass | 3 ++-
>  meta/conf/image-fitimage.conf                | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/kernel-fit-image.bbclass b/meta/classes-recipe/kernel-fit-image.bbclass
> index f04aee1807..0e6764cb17 100644
> --- a/meta/classes-recipe/kernel-fit-image.bbclass
> +++ b/meta/classes-recipe/kernel-fit-image.bbclass
> @@ -85,7 +85,8 @@ python do_compile() {
>              # Copy the dtb or dtbo file into the FIT image assembly directory
>              shutil.copyfile(os.path.join(kernel_deploydir, dtb_name), dtb_name)
>              root_node.fitimage_emit_section_dtb(dtb_name, dtb_name,
> -                d.getVar("UBOOT_DTB_LOADADDRESS"), d.getVar("UBOOT_DTBO_LOADADDRESS"))
> +                d.getVar("UBOOT_DTB_LOADADDRESS"), d.getVar("UBOOT_DTBO_LOADADDRESS"),
> +                add_compatible = d.getVar("FIT_DTB_ADD_COMPATIBLE"))

I think something like bb.utils.to_boolean() should be used, otherwise
the non-empty string will always evaluate as True.

>  
>      if external_kernel_devicetree:
>          # iterate over all .dtb and .dtbo files in the external kernel devicetree directory
> diff --git a/meta/conf/image-fitimage.conf b/meta/conf/image-fitimage.conf
> index 090ee148f4..35e0459d09 100644
> --- a/meta/conf/image-fitimage.conf
> +++ b/meta/conf/image-fitimage.conf
> @@ -47,6 +47,9 @@ FIT_LINUX_BIN ?= "linux.bin"
>  # Allow user to select the default DTB for FIT image when multiple dtb's exists.
>  FIT_CONF_DEFAULT_DTB ?= ""
>  
> +# Allow user to choose if DTB in FIT image can have compatible strings.
> +FIT_DTB_ADD_COMPATIBLE ?= "False"
> +
>  # length of address in number of <u32> cells
>  # ex: 1 32bits address, 2 64bits address
>  FIT_ADDRESS_CELLS ?= "1"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#224743): https://lists.openembedded.org/g/openembedded-core/message/224743
> Mute This Topic: https://lists.openembedded.org/mt/115721367/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>



  reply	other threads:[~2025-10-12 17:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-12 17:16 [PATCH] kernel-fit-image: enable compatible string for kernel built-in DTBs Kavinaya S
2025-10-12 17:32 ` Gyorgy Sarvari [this message]
2025-10-13  5:56   ` 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=1ed65c41-c418-416d-ab99-705116ce4221@gmail.com \
    --to=skandigraun@gmail.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