[PATCH] Remove bogus errors from check_chosen.
David Gibson
david at gibson.dropbear.id.au
Sat Mar 24 10:51:53 EST 2007
On Fri, Mar 23, 2007 at 11:03:13AM -0500, Jon Loeliger wrote:
> On Fri, 2007-03-23 at 10:05, Scott Wood wrote:
> > On Fri, Mar 23, 2007 at 02:31:58PM +1100, David Gibson wrote:
> > > I'm not 100% comfortable with this patch; I'd like for dtc to have the
> > > facility to do more-or-less complete tree validation.
> >
> > That'd be nice as long as it's optional; it should be possible to do a
> > low level dts->dtb transformation without the tool assuming that the
> > output is intended to be a final, valid tree with the specific bindings
> > that dtc knowns about (or even an OF-ish tree at all).
> >
> > -Scott
>
> So, how about adding a "--complete" or "--final"
> sort of flag an having it:
>
> - Enforce presence of /chosen
> - Disallowing the proposed [ ? ? ? ? ] indicators
> - Uh, other stricter checking...
I was thinking of having three basic levels of checking:
- syntactic structure
Checks on the structure of the flat tree: duplicate property / node
names, invalid characters in names and other such basic errors. This
would be on, and fatal by default.
- semantic structure
Checks on the content of nodes: linux,phandle #a and #s properties
have the right size, reg properties match the corresponding #a and #s
nodes, properties which reference phandles contain a valid phandle,
properties supposed to contain strings actually do. This would be on
by default. It would be fatal by default when generating a dtb or asm
from dts, but not in the other direction.
- kernel requirements
Checks this is a complete tree with all the bits that the kernel
needs: /chosen is present, /memory is present and valid, cpu nodes
have the required cache size information etc. This would only be on
if requested.
--
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