Devicetree Schema Checking Prototype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi folks,

I'll be talking about this at Linaro Connect in Hong Kong later today
(I believe the session with be recorded and put on YouTube; I'll send
the link when it is). Rob and I have been working on a prototype
implementation of schema checking written in Python, using YAML schema
files and using the JSON Schema vocabulary. Here's the link to the
project on GitHub:

https://github.com/robherring/yaml-bindings

Look at the README file for instructions on setting up the environment
(might be buggy; works on my machine, but Rob had problems with it ...
Will try to make it more robust tomorrow)

Please remember that this is prototype code and I am not suggesting it
is ready to use. What it does do in very few lines of Python code
(about 250 lines, plus 75 lines of test code) is implement a basic
tool which validates both devicetrees, and devicetree schema files. At
this stage it is a conceptual design, but it doesn't yet work with the
devicetree files in the kernel. It does work with a YAML-transcoded
copy of the Juno devicetree in the tests/ directory. You can run the
validator against the Juno file with the following command:

$ ./dt-validate.py tests/juno.cpp.yaml

You can run the test cases just by running:

$ make test

Finally, you can see an example of a schema file failing validation
tests with this command:

$ make demo-bad-schema

If you run that from within Vim, it will map the errors back to lines
of source code.

Cheers,
g.
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux