User Tools

Site Tools


comparing_device_trees_with_dtx_diff

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
comparing_device_trees_with_dtx_diff [2018/11/17 16:09]
rpjday [Preparing for comparison]
comparing_device_trees_with_dtx_diff [2018/11/17 16:13]
rpjday [Comparing two .dts files already in the kernel source tree (Part one)]
Line 50: Line 50:
         .. etc etc ...         .. etc etc ...
 </​code>​ </​code>​
 +
 +===== Comparing two .dts files already in the kernel source tree (Part deux) =====
 +
 +In the above example, you were located in the root directory of the relevant kernel source tree, which is the default for the ''​dtx_diff''​ script, where it knows how to process device tree source file includes. If, however, you're in the actual underlying ''​dts''​ directory (or somewhere else in the kernel source tree), you can't just run the script as is since it won't know the kernel source tree to use to process ''​include''​ directives:
 +
 +<​code>​
 +$ cd arch/​arm/​boot/​dts
 +$ dtx_diff imx6q{,​p}-sabresd.dts
 +
 +... snip ...
 +
 +In file included from imx6qp.dtsi:​43:​0,​
 +                 from imx6qp-sabresd.dts:​45:​
 +imx6q.dtsi:​11:​50:​ error: no include path in which to search for dt-bindings/​interrupt-controller/​irq.h
 + #​include <​dt-bindings/​interrupt-controller/​irq.h>​
 +
 +... snip ...
 +
 +  ./arch/arm/ does not exist
 +  Is $ARCH='​arm'​ correct?
 +  Possible fix: use '​-s'​ option
 +
 +  ./arch/arm/ does not exist
 +  Is $ARCH='​arm'​ correct?
 +  Possible fix: use '​-s'​ option
 +  Possible fix: use '​-S'​ option
 +
 +  Possible fix: use '​-S'​ option
 +$
 +</​code>​
 +
 +Instead, you need to use one of these two variations, depending on whether you're in a Git repository, or just a regular source tree:
 +
 +<​code>​
 +$ dtx_diff -s ~/k/git imx6q{,​p}-sabresd.dts ​   (specify source tree with ''​-s''​)
 +$ dtx_diff -S imx6q{,​p}-sabresd.dts ​           (''​-S''​ means this is a Git repo)
 +</​code>​
 +
 +In short, as long as you're still inside the relevant kernel source tree, comparisons will work -- you just need to make sure the ''​dtx_diff''​ script is told where the top of the kernel source tree is.
comparing_device_trees_with_dtx_diff.txt ยท Last modified: 2018/11/17 18:33 by rpjday