diff options
Diffstat (limited to 'scripts/dtc/dtx_diff')
| -rwxr-xr-x | scripts/dtc/dtx_diff | 22 |
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 | |||
| 86 | compile_to_dts() { | 86 | compile_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 | ||
| 321 | cpp_flags="\ | 322 | cpp_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 | ||
| 328 | dtc_flags="\ | 327 | DTC="\ |
| 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 | |||
| 334 | DTC="${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 -" | |||
| 339 | if (( ${cmd_diff} )) ; then | 335 | if (( ${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 | ||
| 345 | else | 341 | else |
| 346 | 342 | ||
| 347 | compile_to_dts "${dtx_file_1}" | 343 | compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}" |
| 348 | 344 | ||
| 349 | fi | 345 | fi |
