From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: [U-Boot] Merging device trees at runtime for module-based systems
Date: Fri, 2 Nov 2012 15:53:52 +1100 [thread overview]
Message-ID: <20121102045352.GP27695@truffula.fritz.box> (raw)
In-Reply-To: <5091FC38.2020806-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
On Wed, Oct 31, 2012 at 10:36:08PM -0600, Stephen Warren wrote:
> On 10/31/2012 05:56 PM, Mitch Bradley wrote:
> > On 10/31/2012 1:00 PM, Daniel Mack wrote:
> >> cc devicetree-discuss. Here's a reference to the full thread:
> >>
> >> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/145221/
> >>
> >> On 26.10.2012 20:39, Stephen Warren wrote:
> >>> On 10/24/2012 03:47 AM, Daniel Mack wrote:
> >>>> Hi,
> >>>>
> >>>> a project I'm involved in uses a module/baseboard combo, and components
> >>>> on either board are described in DT. I'm currently using separate dts
> >>>> files which build upon each other with include statements, which works
> >>>> fine for development.
> >>>>
> >>>> In production though, we will certainly have running changes (and hence
> >>>> different versions) over the lifetime of the product for both the
> >>>> baseboard and the module, and the hardware has support for identifying
> >>>> the versions of both sides at runtime.
> ...
> >> I start to believe that the cleanest solution to this would be to
> >> have full DTC functionality in U-Boot and compile the tree
> >
> > ... which is exactly the way that Open Firmware does it, since the
> > invention of the device tree. The model is that the boot firmware,
> > which needs to know the system configuration to do its job anyway,
> > exports that configuration via the device tree.
>
> Doesn't OF generate the DT from internal data structures (although I
> don't know where those come from...),
Well.. in OF the device tree *is* a core live data structure. It will
be constructed as devices are probed, firmware level device drivers
are attached to it and it might be modified by client interface
operations. Traditionally there is no tree in the flattened format,
only the live tree which clients will query with OF calls. Some
recent OF implementations do use the flat tree in some ways - we've
had some systems where a flattened tree is provided by an early boot
to the full OF; it acts as a skeleton that is then extended in OF's
live tree. We've also had some OF implementations that for
compatiblity with kernels that expect a flattened tree flatten their
internal tree structure into the FDT format as the last thing before
entering the OS.
> whereas what Daniel mentions above
> is more like the bootloader having access to a bunch of .dts fragments,
> selecting the appropriate subset of those to use, parsing them into an
> internal data structure (i.e. running dtc), and then generating a DTB
> from it. The overall result is that the bootloader causes a DTB to be
> generated at run-time, so at that level it's the same, but the
> implementation seems pretty different.
How OF constructs its internal tree can vary a lot with the OF
implementation, and I'm not terribly clear on what you had in mind, so
I don't think either side is really sufficiently well defined to
really say if they're similar or not.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2012-11-02 4:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5087B919.2010006@gmail.com>
[not found] ` <508AD8F9.8030105@wwwdotorg.org>
2012-10-31 23:00 ` Merging device trees at runtime for module-based systems Daniel Mack
2012-10-31 23:13 ` Stephen Warren
2012-10-31 23:21 ` Daniel Mack
[not found] ` <5091AD78.3060701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-31 23:56 ` [U-Boot] " Mitch Bradley
2012-11-01 4:36 ` Stephen Warren
[not found] ` <5091FC38.2020806-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-01 5:02 ` [U-Boot] " Mitch Bradley
2012-11-02 4:53 ` David Gibson [this message]
2012-11-06 23:05 ` Grant Likely
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=20121102045352.GP27695@truffula.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.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;
as well as URLs for NNTP newsgroup(s).