Mirror of DTC
Find a file
David Gibson b16a2bd89d dtc: Flexible tree checking infrastructure (v2)
dtc: Flexible tree checking infrastructure

Here, at last, is a substantial start on revising dtc's infrastructure
for checking the tree; this is the rework I've been saying was
necessary practically since dtc was first release.

In the new model, we have a table of "check" structures, each with a
name, references to checking functions, and status variables.  Each
check can (in principle) be individually switched off or on (as either
a warning or error).  Checks have a list of prerequisites, so if
checks need to rely on results from earlier checks to make sense (or
even to avoid crashing) they just need to list the relevant other
checks there.

For now, only the "structural" checks and the fixups for phandle
references are converted to the new mechanism.  The rather more
involved semantic checks (which is where this new mechanism will
really be useful) will have to be converted in future patches.

At present, there's no user interface for turning on/off the checks -
the -f option now forces output even if "error" level checks fail.
Again, future patches will be needed to add the fine-grained control,
but that should be quite straightforward with the infrastructure
implemented here.

Also adds a testcase for the handling of bad references, which catches
a bug encountered while developing this patch.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-11-26 16:00:08 -06:00
Documentation dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
libfdt dtc: Add valgrind support to testsuite 2007-11-26 15:57:58 -06:00
scripts Add DTC release version information. 2007-07-07 13:52:25 -05:00
tests dtc: Flexible tree checking infrastructure (v2) 2007-11-26 16:00:08 -06:00
.gitignore Merge libfdt into dtc. 2007-06-14 15:05:55 +10:00
checks.c dtc: Flexible tree checking infrastructure (v2) 2007-11-26 16:00:08 -06:00
comment-test.dts Initial label support. Also switch to glr-parser mode and get rid of 2005-06-16 14:36:37 +10:00
data.c dtc: data.c doesn't need to include dtc-parser.tab.h 2007-10-22 09:54:16 -05:00
dtc-lexer.l dtc: Switch dtc to C-style literals 2007-11-08 11:14:07 -06:00
dtc-parser.y dtc: Switch dtc to C-style literals 2007-11-08 11:14:07 -06:00
dtc.c dtc: Flexible tree checking infrastructure (v2) 2007-11-26 16:00:08 -06:00
dtc.h dtc: Flexible tree checking infrastructure (v2) 2007-11-26 16:00:08 -06:00
flattree.c Quiet a bogus "May be used uninitialized" warning. 2007-10-23 10:13:00 -05:00
fstree.c dtc: Whitespace cleanup 2007-09-18 09:43:26 -05:00
ftdump.c dtc: Use libfdt/fdt.h instead of flat_dt.h 2007-09-27 08:21:18 -05:00
GPL dtc: Remove redundant copy of the GPL 2007-06-25 21:43:11 -05:00
livetree.c dtc: Flexible tree checking infrastructure (v2) 2007-11-26 16:00:08 -06:00
Makefile dtc: Add missing dependencies for tests 2007-11-13 07:33:01 -06:00
Makefile.dtc dtc: Move tree checking code to checks.c 2007-11-01 08:03:37 -05:00
srcpos.c DTC: Add support for a C-like #include "file" mechanism. 2007-03-26 08:36:07 -05:00
srcpos.h dtc: move declaration of yyerror 2007-07-07 10:07:27 -05:00
TODO Update TODO 2005-10-19 16:29:52 +10:00
treesource.c dtc: -Odts produces v1 output 2007-11-12 07:46:04 -06:00