linux-stable/scripts/dtc
Rob Herring ef8795f3f1 dt-bindings: kbuild: Use DTB files for validation
Switch the DT validation to use DTB files directly instead of a DTS to
YAML conversion.

The original motivation for supporting validation on DTB files was to
enable running validation on a running system (e.g. 'dt-validate
/sys/firmware/fdt') or other cases where the original source DTS is not
available.

The YAML format was not without issues. Using DTBs with the schema type
information solves some of those problems. The YAML format relies on the
DTS source level information including bracketing of properties, size
directives, and phandle tags all of which are lost in a DTB file. While
standardizing the bracketing is a good thing, it does cause a lot of
extra warnings and churn to fix them.

Another issue has been signed types are not validated correctly as sign
information is not propagated to YAML. Using the schema type information
allows for proper handling of signed types. YAML also can't represent
the full range of 64-bit integers as numbers are stored as floats by
most/all parsers.

The DTB validation works by decoding property values using the type
information in the schemas themselves. The main corner case this does
not work for is matrix types where neither dimension is fixed. For
now, checking the dimensions in these cases are skipped.

Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220310160513.1708182-3-robh@kernel.org
2022-03-11 11:16:16 -06:00
..
include-prefixes dts: drop dangling c6x symlink 2021-02-23 21:37:09 -06:00
libfdt scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
checks.c scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
data.c scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 2021-02-04 09:00:04 -06:00
dt_to_config
dtc-lexer.l scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
dtc-parser.y scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121 2020-10-12 09:58:15 -05:00
dtc.c scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
dtc.h scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
dtx_diff scripts/dtc: dtx_diff: remove broken example from help text 2022-01-17 16:26:44 -06:00
fdtget.c
fdtoverlay.c scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 2021-02-04 09:00:04 -06:00
fdtput.c
flattree.c scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
fstree.c scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
livetree.c scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
Makefile dt-bindings: kbuild: Use DTB files for validation 2022-03-11 11:16:16 -06:00
of_unittest_expect of: unittest: add program to process EXPECT messages 2022-02-28 15:20:32 -06:00
srcpos.c scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 2021-02-04 09:00:04 -06:00
srcpos.h scripts/dtc: Update to upstream version v1.5.0-30-g702c1b6c0e73 2019-06-21 12:53:52 -06:00
treesource.c scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
update-dtc-source.sh dt-bindings: kbuild: Use DTB files for validation 2022-03-11 11:16:16 -06:00
util.c scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 2019-12-26 15:39:13 -07:00
util.h scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
version_gen.h scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00
yamltree.c scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 2021-10-29 08:55:38 -05:00