提交 35f3c984 编写于 作者: F Frank Rowand 提交者: Rob Herring

scripts/dtc: dtx_diff - 2nd update of include dts paths to match build

Update dtx_diff include paths in the same manner as:
commit b12869a8 ("of: remove drivers/of/testcase-data from
include search path for CPP"), commit 5ffa2aed ("of: remove
arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
commit 50f9ddaf ("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: NFrank Rowand <frank.rowand@sony.com>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 a6899e90
...@@ -86,6 +86,7 @@ eod ...@@ -86,6 +86,7 @@ eod
compile_to_dts() { compile_to_dts() {
dtx="$1" dtx="$1"
dtc_include="$2"
if [ -d "${dtx}" ] ; then if [ -d "${dtx}" ] ; then
...@@ -113,7 +114,7 @@ compile_to_dts() { ...@@ -113,7 +114,7 @@ compile_to_dts() {
# ----- input is DTS (source) # ----- input is DTS (source)
if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \ if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
| ${DTC} -I dts ) ; then | ${DTC} ${dtc_include} -I dts ) ; then
return return
fi fi
...@@ -320,18 +321,13 @@ fi ...@@ -320,18 +321,13 @@ fi
cpp_flags="\ cpp_flags="\
-nostdinc \ -nostdinc \
-I${srctree}/arch/${ARCH}/boot/dts \
-I${srctree}/scripts/dtc/include-prefixes \ -I${srctree}/scripts/dtc/include-prefixes \
-I${srctree}/drivers/of/testcase-data \
-undef -D__DTS__" -undef -D__DTS__"
dtc_flags="\ DTC="\
-i ${srctree}/arch/${ARCH}/boot/dts/ \ ${DTC} \
-i ${srctree}/kernel/dts \ -i ${srctree}/scripts/dtc/include-prefixes \
${dtx_path_1_dtc_include} \ -O dts -qq -f ${dtc_sort} -o -"
${dtx_path_2_dtc_include}"
DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
# ----- do the diff or decompile # ----- do the diff or decompile
...@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -" ...@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
if (( ${cmd_diff} )) ; then if (( ${cmd_diff} )) ; then
diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \ diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
<(compile_to_dts "${dtx_file_1}") \ <(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
<(compile_to_dts "${dtx_file_2}") <(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
else else
compile_to_dts "${dtx_file_1}" compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
fi fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册