Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305920

Re: [PATCH v2] dtc: create tool to diff device trees

From Frank Rowand <frowand.list@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] dtc: create tool to diff device trees
Date 2016-01-11 09:00 +0100
Message-ID <qPFyp-7Lg-3@gated-at.bofh.it> (permalink)
References <qOo6C-3Zq-11@gated-at.bofh.it> <qPCqU-5KZ-61@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 1/10/2016 6:37 PM, David Gibson wrote:
> On Thu, Jan 07, 2016 at 11:03:14AM -0800, Frank Rowand wrote:
>> From: Frank Rowand <frank.rowand@sonymobile.com>
>>
>> Create script to diff device trees.
>>
>> The device tree can be in any of the forms recognized by the dtc compiler:
>>   - source
>>   - binary blob
>>   - file system tree (from /proc/devicetree)
>>
>> If the device tree is a source file, then it is pre-processed in the
>> same way as it would be when built in the linux kernel source tree
>> before diffing.
>>
>> Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
>> ---
>>
>> Tools to develop and debug device tree are somewhat inadequate.  This is a
>> small step in improving the situation.
>>
>> Rationale for and examples of using the script are provided in slides
>> 1 - 78 of the elce 2015 presentation "Solving Device Tree Issues",
>> which can be found at:
>>
>>    http://elinux.org/images/0/04/Dt_debugging_elce_2015_151006_0421.pdf
>>
>> (The script was named dtdiff instead of dtx_diff in the presentation.)
>>
>> Changes in v2:
>>   - Remove dt-bindings from list of includes in cpp_flags
>>   - Remove arch_dtc_flags, which were generated from the arch specific
>>     dts makefile
>>   - Reformat to 8 character tabs
>>   - compile_to_dts(): added back missing return for binary blob
>>
>>
>>  scripts/dtc/dtx_diff |  343 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 343 insertions(+)
>>
>> Index: b/scripts/dtc/dtx_diff
> 
> I think this is probably the wrong directory to put this in.  Because
> it preprocesses in the style of the kernel, this script belongs in the
> kernel tree, not the upstream dtc tree.  However, basically everything
> else in this directory is imported directly from upstream dtc.
> 
> Putting this kernel-specific file in here will probably make updates
> to newer upstream dtc versions more complicated.

I agree with the concern (and had the same concern when I made the choice).

One thing that makes me more comfortable with the location is that the files
in the directory are updated with scripts/dtc/update-dtc-source.sh, which
explicitly lists which files it copies into the Linux tree.  But even with
that, I still admit to some discomfort with the location.

Without getting too deeply into bike shedding, does anyone have a better
location?  And keep in mind that there are several more tools coming in
the pipeline that would likely end up in the same location.

< snip >

-Frank

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] dtc: create tool to diff device trees Frank Rowand <frowand.list@gmail.com> - 2016-01-07 20:10 +0100
  Re: [PATCH v2] dtc: create tool to diff device trees David Gibson <david@gibson.dropbear.id.au> - 2016-01-11 05:40 +0100
    Re: [PATCH v2] dtc: create tool to diff device trees Frank Rowand <frowand.list@gmail.com> - 2016-01-11 09:00 +0100
      Re: [PATCH v2] dtc: create tool to diff device trees David Gibson <david@gibson.dropbear.id.au> - 2016-01-12 05:40 +0100

csiph-web