If this is really a question of needing to dynamically generate the device
tree, then you have no choice. It's worth mentioning, though, that the device
tree compiler (dtc) does have the ability to include files, making it easier to
create and maintain device trees that are static but which share devices.
> -----Original Message-----
> From: email@example.com [mailto:linux-mips-bounce@linux-
> mips.org] On Behalf Of Grant Likely
> Sent: Thursday, October 14, 2010 6:29 PM
> To: Warner Losh
> Cc: firstname.lastname@example.org; email@example.com; linux-
> firstname.lastname@example.org; email@example.com
> Subject: Re: Device Tree questions WRT MIPS/Octeon SOCs.
> On Thu, Oct 14, 2010 at 7:13 PM, Warner Losh <firstname.lastname@example.org> wrote:
> > In message: <AANLkTi=UM2p26JJMqv-
> > Grant Likely <email@example.com> writes:
> > : Overall the plan makes sense, however I would suggest the
> > : instead of 'live' modifying the tree, another option is to carry a
> > : of 'stock' device trees in the kernel; one per board. Of course
> > : assumes that your current ad-hoc code is keying on the specific
> > : If it is interpreting data provided by the firmware, then your
> > : suggestion of modifying a single stock tree probably makes more
> > : or possibly a combination of the too. In general you should avoid
> > : live modification as much as possible.
> > The one draw back on this is that there's lots of different "stock"
> > boards that the Cavium Octeon SDK supports. These will be difficult
> > to drag along for every kernel. And they'd be mostly the same to,
> > which is why I think that David is suggesting the live modification
> > thing...
> Okay. Do what makes the most sense for your platform.