Commit 87143fce authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

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: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 89716dc3
...@@ -21,6 +21,7 @@ Usage: ...@@ -21,6 +21,7 @@ Usage:
diff DTx_1 and DTx_2 diff DTx_1 and DTx_2
--annotate synonym for -T
-f print full dts in diff (--unified=99999) -f print full dts in diff (--unified=99999)
-h synonym for --help -h synonym for --help
-help synonym for --help -help synonym for --help
...@@ -28,6 +29,7 @@ Usage: ...@@ -28,6 +29,7 @@ Usage:
-s SRCTREE linux kernel source tree is at path SRCTREE -s SRCTREE linux kernel source tree is at path SRCTREE
(default is current directory) (default is current directory)
-S linux kernel source tree is at root of current git repo -S linux kernel source tree is at root of current git repo
-T Annotate output .dts with input source file and line (-T -T for more details)
-u unsorted, do not sort DTx -u unsorted, do not sort DTx
...@@ -174,6 +176,7 @@ compile_to_dts() { ...@@ -174,6 +176,7 @@ compile_to_dts() {
# ----- start of script # ----- start of script
annotate=""
cmd_diff=0 cmd_diff=0
diff_flags="-u" diff_flags="-u"
dtx_file_1="" dtx_file_1=""
...@@ -208,6 +211,14 @@ while [ $# -gt 0 ] ; do ...@@ -208,6 +211,14 @@ while [ $# -gt 0 ] ; do
shift shift
;; ;;
-T | --annotate )
if [ "${annotate}" = "" ] ; then
annotate="-T"
elif [ "${annotate}" = "-T" ] ; then
annotate="-T -T"
fi
shift
;;
-u ) -u )
dtc_sort="" dtc_sort=""
shift shift
...@@ -327,7 +338,7 @@ cpp_flags="\ ...@@ -327,7 +338,7 @@ cpp_flags="\
DTC="\ DTC="\
${DTC} \ ${DTC} \
-i ${srctree}/scripts/dtc/include-prefixes \ -i ${srctree}/scripts/dtc/include-prefixes \
-O dts -qq -f ${dtc_sort} -o -" -O dts -qq -f ${dtc_sort} ${annotate} -o -"
# ----- do the diff or decompile # ----- do the diff or decompile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment