All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: linuxppc-dev@ozlabs.org, "David H. Lynch Jr." <dhlii@dlasys.net>
Subject: Re: device trees.
Date: Tue, 12 May 2009 12:37:50 +1000	[thread overview]
Message-ID: <1242095870.7421.30.camel@concordia> (raw)
In-Reply-To: <20090511225631.GA15371@yookeroo.seuss>

[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]

On Tue, 2009-05-12 at 08:56 +1000, David Gibson wrote:
> On Mon, May 11, 2009 at 05:38:16PM -0400, David H. Lynch Jr. wrote:
> > Grant Likely wrote:
> > >>    Anyway, all I was looking for was a leg up on figuring out how to do
> > >> what I want with them. Rather than starting from scratch.
> > >>    I am not looking to be convinced that I am approaching this all wrong.
> > >>    If you are happy with what you have - great. I am not.
> > >>    While I was not looking to restart a great debate over device trees
> > >> - I do not actually think they are a bad idea.
> > >>     
> > >
> > > I still don't understand what you're worried about starting an arguing
> > > about.  Pretty much any of the PowerPC maintainers can point at warts
> > > and problems in the current handling of device trees.  I'm not
> > > particularly happy with simpleImage (and I wrote it), but it takes
> > > time and effort to write something more capable.
> > >   
> >     I was not trying to start an argument, my initial question was
> > 
> >    "Is there an example somewhere that shows building a device tree on the fly ?"
> > 
> >    The responses have questioned why I want to do that rather than how can I do that.
> >    I was not actually seeking a debate over the merit of device trees, or u-boot, or libdft, or .... 
> 
> Probably the closest things to suitable examples here are
> arch/powerpc/kernel/prom_init.c, which builds the dtb from the "live"
> OF device tree.  At the moment that's a bit of a special case, but
> there's no inherent reason that logic couldn't be moved to the
> bootwrapper.
> 
> The other, not in the main tree, is Paul's restodt, which builds a
> device tree from old-style PReP residual information.  I recall it was
> sent to the list as a userspace program (we were gathering information
> on the sorts of PReP out there).  I think Paul made at least a first
> cut at fusing it into the bootwrapper, but I don't know if that ever
> got sent out to the list.


There's also the iseries code, which is not pretty, but shows a very
minimal example of constructing a device tree on the fly, some of it
based on static config and some that's not.

The routines for constructing DT nodes and properties is about 110
lines, and most of that is brackets.

arch/powerpc/platforms/iseries/dt.c

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-05-12  2:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 16:03 device trees David H. Lynch Jr.
2009-05-08 17:15 ` Timur Tabi
2009-05-08 18:43 ` Kumar Gala
2009-05-09 20:51 ` Grant Likely
2009-05-11  2:00   ` Michael Ellerman
2009-05-11  4:08     ` Grant Likely
2009-05-11  6:32       ` David H. Lynch Jr.
2009-05-11 13:51         ` Grant Likely
2009-05-11 15:52           ` Stephen Neuendorffer
2009-05-11 16:58             ` David H. Lynch Jr.
     [not found]               ` <20090511183638.F07C01438054@mail184-wa4.bigfish.com>
     [not found]                 ` <4A08C599.2030100@dlasys.net>
     [not found]                   ` <20090512005554.EEE1019D009B@mail129-dub.bigfish.com>
2009-05-12  2:34                     ` David H. Lynch Jr.
2009-05-12  4:27                       ` Stephen Neuendorffer
2009-05-12  5:30                         ` Grant Likely
2009-05-13  0:10                           ` Stephen Neuendorffer
2009-05-13  2:36                             ` David Gibson
2009-05-13  4:03                               ` Grant Likely
2009-05-13  6:11                               ` David H. Lynch Jr.
2009-05-13  6:21                                 ` David Gibson
2009-05-13 18:11                                   ` David H. Lynch Jr.
2009-05-14  3:08                                     ` David Gibson
2009-05-14 12:51                                       ` David H. Lynch Jr.
2009-05-13  6:58                                 ` Stephen Neuendorffer
2009-05-11 16:45           ` David H. Lynch Jr.
2009-05-11 17:47             ` Grant Likely
2009-05-11 21:38               ` David H. Lynch Jr.
2009-05-11 22:29                 ` Benjamin Herrenschmidt
2009-05-11 22:56                 ` David Gibson
2009-05-12  2:37                   ` Michael Ellerman [this message]
2009-05-11 23:09                 ` Grant Likely
2009-05-12  1:12                   ` David Gibson
2009-05-12  5:22                     ` Grant Likely
2009-05-12 23:24                       ` David Gibson
2009-05-13  0:01                         ` Grant Likely
2009-05-13  0:13                         ` David H. Lynch Jr.
2009-05-13  1:15                           ` Grant Likely
2009-05-13  2:32                           ` David Gibson
2009-05-11 23:19                 ` Stephen Neuendorffer
2009-05-12  0:04                   ` Grant Likely
2009-05-12  7:38                     ` Wolfram Sang
2009-05-11 14:58         ` Timur Tabi
2009-05-11 16:54           ` David H. Lynch Jr.
2009-05-11 23:27             ` David Gibson
2009-05-11 22:25       ` Benjamin Herrenschmidt
     [not found] <20110703222042.19386c7wy7zfn4g8@webmail.huji.ac.il>
     [not found] ` <20110703222042.19386c7wy7zfn4g8-2RFepEojUI0+8gVPFGsyePqBs+8SCbDb@public.gmane.org>
2011-07-03 21:01   ` Device Trees 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=1242095870.7421.30.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=david@gibson.dropbear.id.au \
    --cc=dhlii@dlasys.net \
    --cc=linuxppc-dev@ozlabs.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 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.