summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sonymobile.com>2016-02-02 11:02:35 -0800
committerAmit Pundir <amit.pundir@linaro.org>2018-03-05 21:56:13 +0530
commitb5192e1bb7f76de12abfaca3b46d8acc1c6c594c (patch)
tree9341589055a50cbd6a1d67c4b6ffd6f2068b904f /scripts
parentef0c2d48eb06743ffa140133a9131d225f3f1cb6 (diff)
UPSTREAM: scripts/dtc: dtx_diff - add info to error message
If kernel config options are not properly set, "make scripts" will not compile dtc. Update the unable to find dtc error message to check the kernel config and give better advice on how to create dtc. Reword another error message to increase clarity. Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com> Signed-off-by: Rob Herring <robh@kernel.org> (cherry picked from commit 60c7f4cb1fa4df62b7ba07e9b087728ca7ce5bc8) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dtc/dtx_diff14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index f1160053d75e..959ab2646d38 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -136,8 +136,7 @@ compile_to_dts() {
echo "" >&2
echo " architecture ${dtx_arch} is in file path," >&2
echo " but does not match shell variable \$ARCH" >&2
- echo " (${ARCH}) does not match shell variable" >&2
- echo " \$ARCH (${ARCH})" >&2
+ echo " >>\$ARCH<< is: >>${ARCH}<<" >&2
fi
if [ ! -d ${srctree}/arch/${ARCH} ] ; then
@@ -267,6 +266,14 @@ DTC="${__KBUILD_OUTPUT}/scripts/dtc/dtc"
if [ ! -x ${DTC} ] ; then
__DTC="dtc"
+ if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
+ make_command='
+ make scripts'
+ else
+ make_command='
+ Enable CONFIG_DTC in the kernel configuration
+ make scripts'
+ fi
if ( ! which ${__DTC} >/dev/null ) ; then
# use spaces instead of tabs in the error message
@@ -280,8 +287,7 @@ ERROR: unable to find a 'dtc' program
'dtc' is: ${DTC}
If it does not exist, create it from the root of the Linux source tree:
-
- 'make scripts'.
+${make_command}
If not at the root of the Linux kernel source tree -s SRCTREE or -S
may need to be specified to find 'dtc'.