aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2019-01-17 17:01:14 -0500
committerRob Herring <robh@kernel.org>2019-02-28 12:40:48 -0500
commit87143fce31240242d97f2c3cb1b61601a38bf7ea (patch)
tree9062e4e879136a08aaef86690ad08d9878dfcc70 /scripts
parent89716dc353bdf1ab34c3a41d3f157ce28b4fbe7d (diff)
of: add dtc annotations functionality to dtx_diff
Add -T and --annotations command line arguments to dtx_diff. These arguments will be passed through to dtc. dtc will then add source location annotations to its output. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dtc/dtx_diff13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index 8c4fbad2055e..0d8572008729 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -21,6 +21,7 @@ Usage:
21 diff DTx_1 and DTx_2 21 diff DTx_1 and DTx_2
22 22
23 23
24 --annotate synonym for -T
24 -f print full dts in diff (--unified=99999) 25 -f print full dts in diff (--unified=99999)
25 -h synonym for --help 26 -h synonym for --help
26 -help synonym for --help 27 -help synonym for --help
@@ -28,6 +29,7 @@ Usage:
28 -s SRCTREE linux kernel source tree is at path SRCTREE 29 -s SRCTREE linux kernel source tree is at path SRCTREE
29 (default is current directory) 30 (default is current directory)
30 -S linux kernel source tree is at root of current git repo 31 -S linux kernel source tree is at root of current git repo
32 -T Annotate output .dts with input source file and line (-T -T for more details)
31 -u unsorted, do not sort DTx 33 -u unsorted, do not sort DTx
32 34
33 35
@@ -174,6 +176,7 @@ compile_to_dts() {
174 176
175# ----- start of script 177# ----- start of script
176 178
179annotate=""
177cmd_diff=0 180cmd_diff=0
178diff_flags="-u" 181diff_flags="-u"
179dtx_file_1="" 182dtx_file_1=""
@@ -208,6 +211,14 @@ while [ $# -gt 0 ] ; do
208 shift 211 shift
209 ;; 212 ;;
210 213
214 -T | --annotate )
215 if [ "${annotate}" = "" ] ; then
216 annotate="-T"
217 elif [ "${annotate}" = "-T" ] ; then
218 annotate="-T -T"
219 fi
220 shift
221 ;;
211 -u ) 222 -u )
212 dtc_sort="" 223 dtc_sort=""
213 shift 224 shift
@@ -327,7 +338,7 @@ cpp_flags="\
327DTC="\ 338DTC="\
328 ${DTC} \ 339 ${DTC} \
329 -i ${srctree}/scripts/dtc/include-prefixes \ 340 -i ${srctree}/scripts/dtc/include-prefixes \
330 -O dts -qq -f ${dtc_sort} -o -" 341 -O dts -qq -f ${dtc_sort} ${annotate} -o -"
331 342
332 343
333# ----- do the diff or decompile 344# ----- do the diff or decompile