All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] scripts/dtc: dtx_diff - add info to error message
Date: Tue, 02 Feb 2016 11:02:35 -0800	[thread overview]
Message-ID: <56B0FD4B.8080600@gmail.com> (raw)

From: Frank Rowand <frank.rowand@sonymobile.com>

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>
---
 scripts/dtc/dtx_diff |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Index: b/scripts/dtc/dtx_diff
===================================================================
--- 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'.

             reply	other threads:[~2016-02-02 19:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 19:02 Frank Rowand [this message]
     [not found] ` <56B0FD4B.8080600-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-12  0:50   ` [PATCH] scripts/dtc: dtx_diff - add info to error message Frank Rowand
2016-02-12  0:50     ` Frank Rowand
2016-02-12  1:41     ` Rob Herring
     [not found]       ` <CAL_JsqL0CpbcACqNjo1u7KYUz_rnKVWj8ZjKuyE2mefNw=Li4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-12 17:37         ` Frank Rowand
2016-02-12 17:37           ` Frank Rowand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B0FD4B.8080600@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.