Skip to content

Commit 35f3c98

Browse files
frowandrobherring
authored andcommitted
scripts/dtc: dtx_diff - 2nd update of include dts paths to match build
Update dtx_diff include paths in the same manner as: commit b12869a ("of: remove drivers/of/testcase-data from include search path for CPP"), commit 5ffa2ae ("of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP"), and commit 50f9dda ("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 <[email protected]> Signed-off-by: Rob Herring <[email protected]>
1 parent a6899e9 commit 35f3c98

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

scripts/dtc/dtx_diff

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ eod
8686
compile_to_dts() {
8787

8888
dtx="$1"
89+
dtc_include="$2"
8990

9091
if [ -d "${dtx}" ] ; then
9192

@@ -113,7 +114,7 @@ compile_to_dts() {
113114
# ----- input is DTS (source)
114115

115116
if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
116-
| ${DTC} -I dts ) ; then
117+
| ${DTC} ${dtc_include} -I dts ) ; then
117118
return
118119
fi
119120

@@ -320,30 +321,25 @@ fi
320321

321322
cpp_flags="\
322323
-nostdinc \
323-
-I${srctree}/arch/${ARCH}/boot/dts \
324324
-I${srctree}/scripts/dtc/include-prefixes \
325-
-I${srctree}/drivers/of/testcase-data \
326325
-undef -D__DTS__"
327326

328-
dtc_flags="\
329-
-i ${srctree}/arch/${ARCH}/boot/dts/ \
330-
-i ${srctree}/kernel/dts \
331-
${dtx_path_1_dtc_include} \
332-
${dtx_path_2_dtc_include}"
333-
334-
DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
327+
DTC="\
328+
${DTC} \
329+
-i ${srctree}/scripts/dtc/include-prefixes \
330+
-O dts -qq -f ${dtc_sort} -o -"
335331

336332

337333
# ----- do the diff or decompile
338334

339335
if (( ${cmd_diff} )) ; then
340336

341337
diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
342-
<(compile_to_dts "${dtx_file_1}") \
343-
<(compile_to_dts "${dtx_file_2}")
338+
<(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
339+
<(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
344340

345341
else
346342

347-
compile_to_dts "${dtx_file_1}"
343+
compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
348344

349345
fi

0 commit comments

Comments
 (0)