From: Tom Rini <trini@konsulko.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>,
Peter Maydell <peter.maydell@linaro.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Andrew Phelps <andrew.phelps@canonical.com>,
Alexander Graf <agraf@csgraf.de>, Bin Meng <bmeng.cn@gmail.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Jerry Van Baren <vanbaren@cideas.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Lukas Funke <lukas.funke@weidmueller.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Max Filippov <jcmvbkbc@gmail.com>,
Michal Simek <michal.simek@amd.com>,
Oliver Gaskell <Oliver.Gaskell@analog.com>,
Patrick Rudolph <patrick.rudolph@9elements.com>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
Robert Marko <robert.marko@sartura.hr>,
Sumit Garg <sumit.garg@linaro.org>,
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v2] emulation: fdt: Allow using U-Boot's device tree with QEMU
Date: Wed, 16 Apr 2025 07:50:15 -0600 [thread overview]
Message-ID: <20250416135015.GP5495@bill-the-cat> (raw)
In-Reply-To: <82103ca6-0e9c-4f4a-bfbf-547d1c06d976@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 2529 bytes --]
On Wed, Apr 16, 2025 at 07:33:51AM +0200, Heinrich Schuchardt wrote:
> On 4/5/25 21:07, Simon Glass wrote:
> > At present it is impossible to change the qemu_arm64 defconfig to
> > obtain a devicetree from the U-Boot build.
> >
> > This is necessary for FIT validation, for example, where the signature
> > node must be compiled into U-Boot.
>
> This description looks wrong:
>
> Signatures are in FIT images.
>
> Only public keys to validate the signatures should be compiled into U-Boot.
>
> >
> > A proposed change to QEMU to allow device tree additions has been
> > blocked for several years. The only known workaround is to use QEMU's
> > dumpdtb option, merge in the signature node manually, disable
> > OF_HAS_PRIOR_STAGE and then start QEMU with special arguments. This is
> > complicated enough that it is documented in U-Boot[1].
>
> This seems to relate to
> [PATCH] hw/arm/virt: Allow additions to the generated device tree
> https://lore.kernel.org/qemu-devel/20210926183410.256484-1-sjg@chromium.org/
>
> As your describe in [1] QEMU already provides a -dtb parameter if you want a
> crafted device-tree. Your proposed change is confounding boot stages and and
> would not provide value to the QEMU project. It was therefore rejected for
> good.
>
> It remains unclear why you would disable OF_HAS_PRIOR_STAGE if you were
> using QEMU's -dtb parameter.
>
> What would be the benefit of compiling the DT into U-Boot instead of
> providing it via the -dtb parameter?
>
> >
> > Unfortunately the only way to disable OF_HAS_PRIOR_STAGE at present is
> > to hack the Kconfig.
> >
> > Add a new QEMU_MANUAL_DTB Kconfig option which makes OF_HAS_PRIOR_STAGE
> > optional, thus avoiding needing to patch U-Boot to get this working.
> >
> > This seems a clearer solution than just making OF_HAS_PRIOR_STAGE
> > visible, since that symbol is intended to be set automatically by each
> > platform.
>
> To me the new parameter is harder to use than simply making
> CONFIG_OF_HAS_PRIOR_STAGE always editable.
I don't want OF_HAS_PRIOR_STAGE to be editable. Ideally, we shouldn't
ever be asking the user/developer to put this in the config, it's a
feature of the board. But as part of Simon's whole "Why don't [I] try
saying yes?" request, I'm trying to accommodate the design he has in
mind. And so, for QEMU, we need something here, because on real hardware
implementing the scheme, everything required would already be in the
provided tree.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-04-16 13:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-05 19:07 [PATCH v2] emulation: fdt: Allow using U-Boot's device tree with QEMU Simon Glass
2025-04-14 22:53 ` Tom Rini
2025-04-15 7:22 ` Ilias Apalodimas
2025-04-15 14:12 ` Tom Rini
2025-04-15 18:45 ` Ilias Apalodimas
2025-04-17 21:39 ` Simon Glass
2025-04-17 22:04 ` Tom Rini
2025-04-16 5:33 ` Heinrich Schuchardt
2025-04-16 13:50 ` Tom Rini [this message]
2025-04-17 21:35 ` Simon Glass
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=20250416135015.GP5495@bill-the-cat \
--to=trini@konsulko.com \
--cc=Oliver.Gaskell@analog.com \
--cc=agraf@csgraf.de \
--cc=andrew.phelps@canonical.com \
--cc=bmeng.cn@gmail.com \
--cc=caleb.connolly@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jan.kiszka@siemens.com \
--cc=jcmvbkbc@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=lukas.funke@weidmueller.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=michal.simek@amd.com \
--cc=patrick.rudolph@9elements.com \
--cc=peter.maydell@linaro.org \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=robert.marko@sartura.hr \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=tuomas.tynkkynen@iki.fi \
--cc=u-boot@lists.denx.de \
--cc=vanbaren@cideas.com \
--cc=xypron.glpk@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.