Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Frank Rowand and committed by
Rob Herring
87143fce 89716dc3

+12 -1
+12 -1
scripts/dtc/dtx_diff
··· 21 21 diff DTx_1 and DTx_2 22 22 23 23 24 + --annotate synonym for -T 24 25 -f print full dts in diff (--unified=99999) 25 26 -h synonym for --help 26 27 -help synonym for --help ··· 29 28 -s SRCTREE linux kernel source tree is at path SRCTREE 30 29 (default is current directory) 31 30 -S linux kernel source tree is at root of current git repo 31 + -T Annotate output .dts with input source file and line (-T -T for more details) 32 32 -u unsorted, do not sort DTx 33 33 34 34 ··· 176 174 177 175 # ----- start of script 178 176 177 + annotate="" 179 178 cmd_diff=0 180 179 diff_flags="-u" 181 180 dtx_file_1="" ··· 211 208 shift 212 209 ;; 213 210 211 + -T | --annotate ) 212 + if [ "${annotate}" = "" ] ; then 213 + annotate="-T" 214 + elif [ "${annotate}" = "-T" ] ; then 215 + annotate="-T -T" 216 + fi 217 + shift 218 + ;; 214 219 -u ) 215 220 dtc_sort="" 216 221 shift ··· 338 327 DTC="\ 339 328 ${DTC} \ 340 329 -i ${srctree}/scripts/dtc/include-prefixes \ 341 - -O dts -qq -f ${dtc_sort} -o -" 330 + -O dts -qq -f ${dtc_sort} ${annotate} -o -" 342 331 343 332 344 333 # ----- do the diff or decompile