Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| comparing_device_trees_with_dtx_diff [2018/11/17 16:08] – [Preparing for comparison] rpjday | comparing_device_trees_with_dtx_diff [2018/11/17 18:33] (current) – [Comparing two .dts files already in the kernel source tree (Part deux)] rpjday | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| I mention this so you know that if you already had a ''/ | I mention this so you know that if you already had a ''/ | ||
| + | |||
| + | ===== Comparing two .dts files already in the kernel source tree (Part one) ===== | ||
| + | |||
| + | If you're located at the top of the relevant kernel source tree, and you want to compare two device tree source files already there, say, under '' | ||
| + | |||
| + | < | ||
| + | $ dtx_diff arch/ | ||
| + | --- arch/ | ||
| + | +++ arch/ | ||
| + | @@ -3,8 +3,8 @@ | ||
| + | / { | ||
| + | # | ||
| + | #size-cells = < | ||
| + | - | ||
| + | - model = " | ||
| + | + | ||
| + | + model = " | ||
| + | |||
| + | aliases { | ||
| + | can0 = "/ | ||
| + | @@ -44,14 +44,14 @@ | ||
| + | brightness-levels = <0x0 0x4 0x8 0x10 0x20 0x40 0x80 0xff>; | ||
| + | compatible = " | ||
| + | default-brightness-level = < | ||
| + | - | ||
| + | - pwms = <0x78 0x0 0x4c4b40>; | ||
| + | + | ||
| + | + pwms = <0x80 0x0 0x4c4b40>; | ||
| + | status = " | ||
| + | }; | ||
| + | | ||
| + | .. etc etc ... | ||
| + | </ | ||
| + | |||
| + | ===== 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 '' | ||
| + | |||
| + | < | ||
| + | $ cd arch/ | ||
| + | $ dtx_diff imx6q{, | ||
| + | |||
| + | ... snip ... | ||
| + | |||
| + | In file included from imx6qp.dtsi: | ||
| + | from imx6qp-sabresd.dts: | ||
| + | imx6q.dtsi: | ||
| + | # | ||
| + | |||
| + | ... snip ... | ||
| + | |||
| + | ./arch/arm/ does not exist | ||
| + | Is $ARCH=' | ||
| + | Possible fix: use ' | ||
| + | |||
| + | ./arch/arm/ does not exist | ||
| + | Is $ARCH=' | ||
| + | Possible fix: use ' | ||
| + | Possible fix: use ' | ||
| + | |||
| + | Possible fix: use ' | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | 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: | ||
| + | |||
| + | < | ||
| + | $ dtx_diff -s ~/k/git imx6q{, | ||
| + | $ dtx_diff -S imx6q{, | ||
| + | </ | ||
| + | |||
| + | In short, as long as you're still inside the relevant kernel source tree, comparisons will work -- you just need to make sure the '' | ||
| + | |||
| + | ===== Comparing two device tree files out of tree -- apparent bug ===== | ||
| + | |||
| + | What doesn' | ||
| + | |||
| + | < | ||
| + | $ cp imx6q{, | ||
| + | $ cd /tmp | ||
| + | $ dtx_diff -s ~/k/git imx6q{, | ||
| + | imx6qp-sabresd.dts: | ||
| + | # | ||
| + | ^~~~~~~~~~~~~ | ||
| + | imx6q-sabresd.dts: | ||
| + | # | ||
| + | ^~~~~~~~~~~~ | ||
| + | compilation terminated. | ||
| + | compilation terminated. | ||
| + | Error: imx6qp-sabresd.dts: | ||
| + | |||
| + | FATAL ERROR: FATAL ERROR: Unable to parse input tree | ||
| + | Unable to parse input tree | ||
| + | |||
| + | Possible hints to resolve the above error: | ||
| + | |||
| + | (hints might not fix the problem) | ||
| + | Possible hints to resolve the above error: | ||
| + | (hints might not fix the problem) | ||
| + | |||
| + | |||
| + | No hints available. | ||
| + | No hints available. | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | I have no idea why this fails -- obviously, even when telling '' | ||