aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2017-09-18 20:18:44 -0400
committerRob Herring <robh@kernel.org>2017-09-20 11:13:05 -0400
commit35f3c984548524be5eb4c3f5295cf58d909e8746 (patch)
treeb096ef639feb6863bd10ff38a5684ceb98af0e88
parenta6899e900509bb2442239d6198dc8bc64f8437ec (diff)
scripts/dtc: dtx_diff - 2nd update of include dts paths to match build
Update dtx_diff include paths in the same manner as: commit b12869a8d519 ("of: remove drivers/of/testcase-data from include search path for CPP"), commit 5ffa2aed389c ("of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP"), and commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path for both CPP and DTC"). Remove proposed include path kernel/dts/, which was never implemented for the dtb build. For the diff case, each source file is compiled separately. For each of those compiles, provide the location of the source file as an include path, not the location of both source files. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
-rwxr-xr-xscripts/dtc/dtx_diff22
1 files changed, 9 insertions, 13 deletions
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index f9a3d8d23c64..8c4fbad2055e 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -86,6 +86,7 @@ eod
86compile_to_dts() { 86compile_to_dts() {
87 87
88 dtx="$1" 88 dtx="$1"
89 dtc_include="$2"
89 90
90 if [ -d "${dtx}" ] ; then 91 if [ -d "${dtx}" ] ; then
91 92
@@ -113,7 +114,7 @@ compile_to_dts() {
113 # ----- input is DTS (source) 114 # ----- input is DTS (source)
114 115
115 if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \ 116 if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
116 | ${DTC} -I dts ) ; then 117 | ${DTC} ${dtc_include} -I dts ) ; then
117 return 118 return
118 fi 119 fi
119 120
@@ -320,18 +321,13 @@ fi
320 321
321cpp_flags="\ 322cpp_flags="\
322 -nostdinc \ 323 -nostdinc \
323 -I${srctree}/arch/${ARCH}/boot/dts \
324 -I${srctree}/scripts/dtc/include-prefixes \ 324 -I${srctree}/scripts/dtc/include-prefixes \
325 -I${srctree}/drivers/of/testcase-data \
326 -undef -D__DTS__" 325 -undef -D__DTS__"
327 326
328dtc_flags="\ 327DTC="\
329 -i ${srctree}/arch/${ARCH}/boot/dts/ \ 328 ${DTC} \
330 -i ${srctree}/kernel/dts \ 329 -i ${srctree}/scripts/dtc/include-prefixes \
331 ${dtx_path_1_dtc_include} \ 330 -O dts -qq -f ${dtc_sort} -o -"
332 ${dtx_path_2_dtc_include}"
333
334DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
335 331
336 332
337# ----- do the diff or decompile 333# ----- do the diff or decompile
@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
339if (( ${cmd_diff} )) ; then 335if (( ${cmd_diff} )) ; then
340 336
341 diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \ 337 diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
342 <(compile_to_dts "${dtx_file_1}") \ 338 <(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
343 <(compile_to_dts "${dtx_file_2}") 339 <(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
344 340
345else 341else
346 342
347 compile_to_dts "${dtx_file_1}" 343 compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
348 344
349fi 345fi