All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build
@ 2017-09-15 22:16 ` frowand.list-Re5JQEeQqe8AvxtiuMwx3w
  0 siblings, 0 replies; 6+ messages in thread
From: frowand.list @ 2017-09-15 22:16 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel

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

Update dtx_diff include paths in the same manner as:
commit b12869a8d519 ("of: remove drivers/of/testcase-data from
include search path for CPP"), commit 5ffa2aed389c ("of: remove
arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
commit 50f9ddaf64e1 ("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.

---

The referenced commits b12869a8d519, 5ffa2aed389c, 50f9ddaf64e1
are in v4.14-rc1.  No stable kernels need this patch.

 scripts/dtc/dtx_diff |   22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
---
 scripts/dtc/dtx_diff | 22 +++++++++-------------
 1 file 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
 compile_to_dts() {
 
 	dtx="$1"
+	dtc_include="$2"
 
 	if [ -d "${dtx}" ] ; then
 
@@ -113,7 +114,7 @@ compile_to_dts() {
 		# -----  input is DTS (source)
 
 		if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
-			| ${DTC} -I dts ) ; then
+			| ${DTC} ${dtc_include} -I dts ) ; then
 			return
 		fi
 
@@ -320,18 +321,13 @@ fi
 
 cpp_flags="\
 	-nostdinc                                  \
-	-I${srctree}/arch/${ARCH}/boot/dts         \
 	-I${srctree}/scripts/dtc/include-prefixes  \
-	-I${srctree}/drivers/of/testcase-data      \
 	-undef -D__DTS__"
 
-dtc_flags="\
-	-i ${srctree}/arch/${ARCH}/boot/dts/ \
-	-i ${srctree}/kernel/dts             \
-	${dtx_path_1_dtc_include}            \
-	${dtx_path_2_dtc_include}"
-
-DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
+DTC="\
+	${DTC}                                     \
+	-i ${srctree}/scripts/dtc/include-prefixes \
+	-O dts -qq -f ${dtc_sort} -o -"
 
 
 # -----  do the diff or decompile
@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
 if (( ${cmd_diff} )) ; then
 
 	diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
-		<(compile_to_dts "${dtx_file_1}") \
-		<(compile_to_dts "${dtx_file_2}")
+		<(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
+		<(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
 
 else
 
-	compile_to_dts "${dtx_file_1}"
+	compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
 
 fi
-- 
Frank Rowand <frank.rowand@sony.com>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build
@ 2017-09-15 22:16 ` frowand.list-Re5JQEeQqe8AvxtiuMwx3w
  0 siblings, 0 replies; 6+ messages in thread
From: frowand.list-Re5JQEeQqe8AvxtiuMwx3w @ 2017-09-15 22:16 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>

Update dtx_diff include paths in the same manner as:
commit b12869a8d519 ("of: remove drivers/of/testcase-data from
include search path for CPP"), commit 5ffa2aed389c ("of: remove
arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
commit 50f9ddaf64e1 ("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.

---

The referenced commits b12869a8d519, 5ffa2aed389c, 50f9ddaf64e1
are in v4.14-rc1.  No stable kernels need this patch.

 scripts/dtc/dtx_diff |   22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

Signed-off-by: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
---
 scripts/dtc/dtx_diff | 22 +++++++++-------------
 1 file 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
 compile_to_dts() {
 
 	dtx="$1"
+	dtc_include="$2"
 
 	if [ -d "${dtx}" ] ; then
 
@@ -113,7 +114,7 @@ compile_to_dts() {
 		# -----  input is DTS (source)
 
 		if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
-			| ${DTC} -I dts ) ; then
+			| ${DTC} ${dtc_include} -I dts ) ; then
 			return
 		fi
 
@@ -320,18 +321,13 @@ fi
 
 cpp_flags="\
 	-nostdinc                                  \
-	-I${srctree}/arch/${ARCH}/boot/dts         \
 	-I${srctree}/scripts/dtc/include-prefixes  \
-	-I${srctree}/drivers/of/testcase-data      \
 	-undef -D__DTS__"
 
-dtc_flags="\
-	-i ${srctree}/arch/${ARCH}/boot/dts/ \
-	-i ${srctree}/kernel/dts             \
-	${dtx_path_1_dtc_include}            \
-	${dtx_path_2_dtc_include}"
-
-DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
+DTC="\
+	${DTC}                                     \
+	-i ${srctree}/scripts/dtc/include-prefixes \
+	-O dts -qq -f ${dtc_sort} -o -"
 
 
 # -----  do the diff or decompile
@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
 if (( ${cmd_diff} )) ; then
 
 	diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
-		<(compile_to_dts "${dtx_file_1}") \
-		<(compile_to_dts "${dtx_file_2}")
+		<(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
+		<(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
 
 else
 
-	compile_to_dts "${dtx_file_1}"
+	compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
 
 fi
-- 
Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build
  2017-09-15 22:16 ` frowand.list-Re5JQEeQqe8AvxtiuMwx3w
  (?)
@ 2017-09-15 22:42 ` Rob Herring
  2017-09-16 17:52     ` Frank Rowand
  -1 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2017-09-15 22:42 UTC (permalink / raw)
  To: Frank Rowand; +Cc: devicetree, linux-kernel

On Fri, Sep 15, 2017 at 5:16 PM,  <frowand.list@gmail.com> wrote:
> From: Frank Rowand <frank.rowand@sony.com>

I feel like we just had the same subject. Can you make it more specific.

> Update dtx_diff include paths in the same manner as:
> commit b12869a8d519 ("of: remove drivers/of/testcase-data from
> include search path for CPP"), commit 5ffa2aed389c ("of: remove
> arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
> commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
> for both CPP and DTC").

We need a better way for this to stop happening besides me remembering
in reviews...

Perhaps a separate file of include paths that all tools can use?

>
> 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.
>
> ---
>
> The referenced commits b12869a8d519, 5ffa2aed389c, 50f9ddaf64e1
> are in v4.14-rc1.  No stable kernels need this patch.
>
>  scripts/dtc/dtx_diff |   22 +++++++++-------------
>  1 file changed, 9 insertions(+), 13 deletions(-)
>
> Signed-off-by: Frank Rowand <frank.rowand@sony.com>

This is going to get dropped.

Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build
@ 2017-09-16 17:52     ` Frank Rowand
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Rowand @ 2017-09-16 17:52 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel

On 09/15/17 15:42, Rob Herring wrote:
> On Fri, Sep 15, 2017 at 5:16 PM,  <frowand.list@gmail.com> wrote:
>> From: Frank Rowand <frank.rowand@sony.com>
> 
> I feel like we just had the same subject. Can you make it more specific.

Yes, the previous one was pretty much the same words, but the one line
description is not an exact match.  I will come up with a more unique
subject.


>> Update dtx_diff include paths in the same manner as:
>> commit b12869a8d519 ("of: remove drivers/of/testcase-data from
>> include search path for CPP"), commit 5ffa2aed389c ("of: remove
>> arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
>> commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
>> for both CPP and DTC").
> 
> We need a better way for this to stop happening besides me remembering
> in reviews...

Yep, me remembering in reviews.  Which I have.  :-)


> Perhaps a separate file of include paths that all tools can use?

I considered that with the very first version of dtx_diff.  At the time,
I expected changes to the include path to be very rare.  I still have
that expectation looking forward.

I considered having dtx_diff scrape the include paths out of Makefile.lib,
but that seemed fragile and kludgey.  I could create a shell script that
outputs the include paths,  Then Makefile.lib and dtx_diff could use
that script to get the include paths.


>> 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.
>>
>> ---
>>
>> The referenced commits b12869a8d519, 5ffa2aed389c, 50f9ddaf64e1
>> are in v4.14-rc1.  No stable kernels need this patch.
>>
>>  scripts/dtc/dtx_diff |   22 +++++++++-------------
>>  1 file changed, 9 insertions(+), 13 deletions(-)
>>
>> Signed-off-by: Frank Rowand <frank.rowand@sony.com>
> 
> This is going to get dropped.
> 
> Rob

I am assuming the drop is because of the request to have a common
file for all tools to source for the include paths.  I'll re-spin
to implement that.

-Frank

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build
@ 2017-09-16 17:52     ` Frank Rowand
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Rowand @ 2017-09-16 17:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 09/15/17 15:42, Rob Herring wrote:
> On Fri, Sep 15, 2017 at 5:16 PM,  <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> From: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
> 
> I feel like we just had the same subject. Can you make it more specific.

Yes, the previous one was pretty much the same words, but the one line
description is not an exact match.  I will come up with a more unique
subject.


>> Update dtx_diff include paths in the same manner as:
>> commit b12869a8d519 ("of: remove drivers/of/testcase-data from
>> include search path for CPP"), commit 5ffa2aed389c ("of: remove
>> arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
>> commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
>> for both CPP and DTC").
> 
> We need a better way for this to stop happening besides me remembering
> in reviews...

Yep, me remembering in reviews.  Which I have.  :-)


> Perhaps a separate file of include paths that all tools can use?

I considered that with the very first version of dtx_diff.  At the time,
I expected changes to the include path to be very rare.  I still have
that expectation looking forward.

I considered having dtx_diff scrape the include paths out of Makefile.lib,
but that seemed fragile and kludgey.  I could create a shell script that
outputs the include paths,  Then Makefile.lib and dtx_diff could use
that script to get the include paths.


>> 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.
>>
>> ---
>>
>> The referenced commits b12869a8d519, 5ffa2aed389c, 50f9ddaf64e1
>> are in v4.14-rc1.  No stable kernels need this patch.
>>
>>  scripts/dtc/dtx_diff |   22 +++++++++-------------
>>  1 file changed, 9 insertions(+), 13 deletions(-)
>>
>> Signed-off-by: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
> 
> This is going to get dropped.
> 
> Rob

I am assuming the drop is because of the request to have a common
file for all tools to source for the include paths.  I'll re-spin
to implement that.

-Frank

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build
  2017-09-16 17:52     ` Frank Rowand
  (?)
@ 2017-09-18 15:01     ` Rob Herring
  -1 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-09-18 15:01 UTC (permalink / raw)
  To: Frank Rowand; +Cc: devicetree, linux-kernel

On Sat, Sep 16, 2017 at 12:52 PM, Frank Rowand <frowand.list@gmail.com> wrote:
> On 09/15/17 15:42, Rob Herring wrote:
>> On Fri, Sep 15, 2017 at 5:16 PM,  <frowand.list@gmail.com> wrote:
>>> From: Frank Rowand <frank.rowand@sony.com>
>>
>> I feel like we just had the same subject. Can you make it more specific.
>
> Yes, the previous one was pretty much the same words, but the one line
> description is not an exact match.  I will come up with a more unique
> subject.
>
>
>>> Update dtx_diff include paths in the same manner as:
>>> commit b12869a8d519 ("of: remove drivers/of/testcase-data from
>>> include search path for CPP"), commit 5ffa2aed389c ("of: remove
>>> arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
>>> commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
>>> for both CPP and DTC").
>>
>> We need a better way for this to stop happening besides me remembering
>> in reviews...
>
> Yep, me remembering in reviews.  Which I have.  :-)
>
>
>> Perhaps a separate file of include paths that all tools can use?
>
> I considered that with the very first version of dtx_diff.  At the time,
> I expected changes to the include path to be very rare.  I still have
> that expectation looking forward.

Let's hope so...

> I considered having dtx_diff scrape the include paths out of Makefile.lib,
> but that seemed fragile and kludgey.  I could create a shell script that
> outputs the include paths,  Then Makefile.lib and dtx_diff could use
> that script to get the include paths.
>
>
>>> 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.
>>>
>>> ---
>>>
>>> The referenced commits b12869a8d519, 5ffa2aed389c, 50f9ddaf64e1
>>> are in v4.14-rc1.  No stable kernels need this patch.
>>>
>>>  scripts/dtc/dtx_diff |   22 +++++++++-------------
>>>  1 file changed, 9 insertions(+), 13 deletions(-)
>>>
>>> Signed-off-by: Frank Rowand <frank.rowand@sony.com>
>>
>> This is going to get dropped.
>>
>> Rob
>
> I am assuming the drop is because of the request to have a common
> file for all tools to source for the include paths.  I'll re-spin
> to implement that.

No, I just mean your S-o-B is going to get dropped by git-am since it
is below the first '---'. Just improve the subject otherwise.

Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-18 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 22:16 [PATCH] scripts/dtc: update dtx_diff cpp and dts include paths to match build frowand.list
2017-09-15 22:16 ` frowand.list-Re5JQEeQqe8AvxtiuMwx3w
2017-09-15 22:42 ` Rob Herring
2017-09-16 17:52   ` Frank Rowand
2017-09-16 17:52     ` Frank Rowand
2017-09-18 15:01     ` Rob Herring

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.