[dtc] Add support for flat device tree format version 17

David Gibson david at gibson.dropbear.id.au
Thu Mar 15 10:07:12 EST 2007


On Wed, Mar 14, 2007 at 04:20:29PM -0500, Timur Tabi wrote:
> Jerry Van Baren wrote:
> 
> > The best solution, which I'm making progress on but slowly, is to pull 
> > David Gibson's libfdt utilities into u-boot and use them to manipulate 
> > the tree.  
> 
> I don't think that will help, because the problem is how do you
> update a device tree that you don't know everything about?
> 
>  > I very much want v17 blobs because that removes my
> > "write-in-place" restrictions on changing the properties.
> 
> Another idea which just came to light is to have the compatibility
> field be only useful to code that just *reads* the DTB.  Any code
> that *writes* the DTB should look it.

Yes, that's always been true for the compatibility version field
(version 3 had exactly the same problem, for example).  Code which
writes the dtb has to understand everything it writes.  Or to put it
another way, the 'version' field records the version of the writer,
'last_comp_version' field records the version of the reader.

But a program which manipulates a tree, like u-boot is both a reader
and a writer.  It *can* take in a higher compatible version and alter
it as long as it downgrades the version on its output to the highest
thing it fully understands.

-- 
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



More information about the Linuxppc-dev mailing list