diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2014-09-15 13:51:29 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-09-16 11:25:07 +0200 |
commit | c4b37f07e1a9cbf70bc66020819de3143f3b0699 (patch) | |
tree | b26ef9dd9a7327eb2c384b555b6406970f98bbd9 /scripts | |
parent | b5a55172162dad00caad7c38253e68e9fd4e1da0 (diff) | |
download | ptxdist-c4b37f07e1a9cbf70bc66020819de3143f3b0699.tar.gz ptxdist-c4b37f07e1a9cbf70bc66020819de3143f3b0699.tar.xz |
dtc: Do not inhibit linemarker generation if supported
Without linemarkers the error messages are somehwat useless.
To demonstrate I picked a random .dts file file from the arm tree in
linux sources:
DTC ptx-testprj_arm/platform/images/vf610-twr.dtb
Error: /tmp/testprj/platform/state/vf610-twr.dts.tmp:366.1-5 syntax error
FATAL ERROR: Unable to parse input tree
If linemarkers are inserted the error message clearly states in which file
which line caused the error:
DTC ptx-testprj_arm/platform/images/vf610-twr.dtb
Error: /tmp/testprj/platform/build-target/linux/arch/arm/boot/dts/vf610-twr.dts:13.1-5 syntax error
FATAL ERROR: Unable to parse input tree
The support for #line markers was added in the same release as -i was
added. So add -P only if -i is not supported.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_dts_dtc.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_dts_dtc.sh b/scripts/lib/ptxd_make_dts_dtc.sh index d5e8c59c4..2b4a2cc95 100644 --- a/scripts/lib/ptxd_make_dts_dtc.sh +++ b/scripts/lib/ptxd_make_dts_dtc.sh @@ -29,8 +29,12 @@ ptxd_make_dts_dtb() { if dtc -h 2>&1 | grep -q '^[[:space:]]\+-i\(,.*\)\?$'; then dtc_include="-i $(dirname "${dts}") -i ${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts" tmp_dts="${ptx_state_dir}/$(basename "${dts}").tmp" + no_linemarker="" else + # the support for "#line ..." was added in the same relase when -i + # was added. So we add -P only if -i is not supported. tmp_dts="${dts}.tmp" + no_linemarker="-P" fi && deps="${ptx_state_dir}/dtc.$(basename "${dts}").deps" @@ -41,7 +45,7 @@ ptxd_make_dts_dtb() { -Wp,-MD,${tmp_deps} \ -Wp,-MT,${tmp_dts} \ -nostdinc \ - -P \ + ${no_linemarker} \ -I$(dirname "${dts}") \ -I${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts \ -I${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts/include \ |