From: adrian.freihofer@gmail.com
To: reatmon@ti.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] kernel-fit-image: Add KERNEL_DTBVENDORED support for FIT_CONF_DEFAULT_DTB
Date: Thu, 02 Jul 2026 11:31:02 +0200 [thread overview]
Message-ID: <59e632d359f41c211f1bcdf10c36b4652e1f3ea6.camel@gmail.com> (raw)
In-Reply-To: <20260630190445.3062430-1-reatmon@ti.com>
Hi Ryan
On Tue, 2026-06-30 at 14:04 -0500, Ryan Eatmon via
lists.openembedded.org wrote:
> When specifying a FIT_CONF_DEFAULT_DTB for a machine, you have to
> exactly align the name with what will be in the fitImage file or you
> will get a build error. If you also turn on KERNEL_DTBVENDORED then
> you
> must also specify the vendor directory as part of the dtb name that
> you
> want for the default, but you must manually do the same mapping that
> the
> kernel-fit-image class is doing when it generates the fit-image.its
> file.
>
> This patch just adds the same logic to figure out the value for the
> requested default dtb and eliminate the need to understand the
> internal
> mapping of the class. It should make specifying the value more
> intuitive. The same value that you put in the KERNEL_DEVICETREE can
> be
> used in the FIT_CONF_DEFAULT_DTB and the new code will correctly
> honor
> the KERNEL_DTBVENDORED setting.
>
> Before:
>
> KERNEL_DEVICETREE = "
> ti/k3-am62p5-sk.dtb \
> ... \
> "
> FIT_CONF_DEFAULT_DTB = "ti_k3-am62p5-sk.dtb"
>
> After:
>
> KERNEL_DEVICETREE = "
> ti/k3-am62p5-sk.dtb \
> ... \
> "
> FIT_CONF_DEFAULT_DTB = "ti/k3-am62p5-sk.dtb"
>
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
> meta/classes-recipe/kernel-fit-image.bbclass | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/kernel-fit-image.bbclass
> b/meta/classes-recipe/kernel-fit-image.bbclass
> index 448a88ccb1..f49838d639 100644
> --- a/meta/classes-recipe/kernel-fit-image.bbclass
> +++ b/meta/classes-recipe/kernel-fit-image.bbclass
> @@ -195,8 +195,21 @@ python do_compile() {
>
> loadable_loadaddress,
>
> loadable_entrypoint)
>
> + # Figure out if we have a default dtb and if we need to honor
> the
> + # KERNEL_DTBVENDORED variable to tweak the name to match what
> will be
> + # in the fitImage.
> + default_dtb = d.getVar("FIT_CONF_DEFAULT_DTB")
> + if default_dtb:
> + # With vendored DTs, replace any path separators with
> underscores,
> + # this matches the behavior used to generate the dtb entry
> in other
> + # parts of the code.
> + if d.getVar('KERNEL_DTBVENDORED') != "1":
> + default_dtb = os.path.basename(default_dtb)
> + else:
> + default_dtb = default_dtb.replace('/', '_')
This is probably needed in addition to
https://git.openembedded.org/openembedded-core/commit/?id=4297b94c3728cd2e320d75b68c508e12ab127719
if I understand correctly.
Would it make sense to move this if else block into a function which
can be used in both places?
Regards,
Adrian
> +
> # Generate the configuration section
> -
> root_node.fitimage_emit_section_config(d.getVar("FIT_CONF_DEFAULT_DTB
> "), d.getVar("FIT_CONF_MAPPINGS"))
> + root_node.fitimage_emit_section_config(default_dtb,
> d.getVar("FIT_CONF_MAPPINGS"))
>
> # Write the its file
> root_node.write_its_file(itsfile)
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#239914):
> https://lists.openembedded.org/g/openembedded-core/message/239914
> Mute This Topic: https://lists.openembedded.org/mt/120052405/4454582
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe:
> https://lists.openembedded.org/g/openembedded-core/unsub [
> adrian.freihofer@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2026-07-02 9:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 19:04 [OE-core][PATCH] kernel-fit-image: Add KERNEL_DTBVENDORED support for FIT_CONF_DEFAULT_DTB Ryan Eatmon
2026-07-02 9:31 ` adrian.freihofer [this message]
2026-07-02 11:06 ` Ryan Eatmon
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=59e632d359f41c211f1bcdf10c36b4652e1f3ea6.camel@gmail.com \
--to=adrian.freihofer@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=reatmon@ti.com \
/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