diff mbox series

[1/1] package/linux: fix custom dts files handling

Message ID 20180313113217.27657-1-rafal.susz@gmail.com
State Superseded
Headers show
Series [1/1] package/linux: fix custom dts files handling | expand

Commit Message

Rafal Susz March 13, 2018, 11:32 a.m. UTC
Custom dts files are still conditionally copied based on non existing
boolean. So it is currently not possible to use custom dts file(s) at all.

List of dts files is now iterated and files are copied into dedicated kernel arch dir.

Signed-off-by: Rafal Susz <rafal.susz@gmail.com>
---
 linux/linux.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Baruch Siach March 13, 2018, 11:49 a.m. UTC | #1
Hi Rafal,

On Tue, Mar 13, 2018 at 12:32:17PM +0100, Rafal Susz wrote:
> Custom dts files are still conditionally copied based on non existing
> boolean. So it is currently not possible to use custom dts file(s) at all.
> 
> List of dts files is now iterated and files are copied into dedicated kernel arch dir.
> 
> Signed-off-by: Rafal Susz <rafal.susz@gmail.com>
> ---
>  linux/linux.mk | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index e98b25cb72..12f0b03dbc 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -370,8 +370,9 @@ endif
>  # Compilation. We make sure the kernel gets rebuilt when the
>  # configuration has changed.
>  define LINUX_BUILD_CMDS
> -	$(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
> -		cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)

Commit f142f23ecf9ee (package/linux: drop useless intermediate DTS booleans) 
should have removed BR2_LINUX_KERNEL_USE_CUSTOM_DTS. There is another 
reference to this symbol below.

> +	@for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \
> +		cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ;   \
> +	done
>  	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
>  	@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then	\
>  		$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ;	\

baruch
Rafal Susz March 13, 2018, 12:31 p.m. UTC | #2
Hello Baruch,

could you point where is "another reference" to this bool. I grepped br and
did not find any other files.
In general it was good idea to drop these booleans and basing on
user-entered strings take do some action or not.

best regards,
Rafal



2018-03-13 12:49 GMT+01:00 Baruch Siach <baruch@tkos.co.il>:

> Hi Rafal,
>
> On Tue, Mar 13, 2018 at 12:32:17PM +0100, Rafal Susz wrote:
> > Custom dts files are still conditionally copied based on non existing
> > boolean. So it is currently not possible to use custom dts file(s) at
> all.
> >
> > List of dts files is now iterated and files are copied into dedicated
> kernel arch dir.
> >
> > Signed-off-by: Rafal Susz <rafal.susz@gmail.com>
> > ---
> >  linux/linux.mk | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/linux/linux.mk b/linux/linux.mk
> > index e98b25cb72..12f0b03dbc 100644
> > --- a/linux/linux.mk
> > +++ b/linux/linux.mk
> > @@ -370,8 +370,9 @@ endif
> >  # Compilation. We make sure the kernel gets rebuilt when the
> >  # configuration has changed.
> >  define LINUX_BUILD_CMDS
> > -     $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
> > -             cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))
> $(KERNEL_ARCH_PATH)/boot/dts/)
>
> Commit f142f23ecf9ee (package/linux: drop useless intermediate DTS
> booleans)
> should have removed BR2_LINUX_KERNEL_USE_CUSTOM_DTS. There is another
> reference to this symbol below.
>
> > +     @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH));
> do \
> > +             cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ;   \
> > +     done
> >       $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)
> $(LINUX_TARGET_NAME)
> >       @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then      \
> >               $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)
> modules ;        \
>
> baruch
>
> --
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open
> Systems
> =}------------------------------------------------ooO--U--
> Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
>
<div dir="ltr"><div><div><div>Hello Baruch,<br><br></div><div>could you point where is &quot;another reference&quot; to this bool. I grepped br and did not find any other files.<br></div>In general it was good idea to drop these booleans and basing on user-entered strings take do some action or not.<br></div><div></div><div><br></div>best regards,<br></div>Rafal<br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-13 12:49 GMT+01:00 Baruch Siach <span dir="ltr">&lt;<a href="mailto:baruch@tkos.co.il" target="_blank">baruch@tkos.co.il</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rafal,<br>
<span class=""><br>
On Tue, Mar 13, 2018 at 12:32:17PM +0100, Rafal Susz wrote:<br>
&gt; Custom dts files are still conditionally copied based on non existing<br>
&gt; boolean. So it is currently not possible to use custom dts file(s) at all.<br>
&gt;<br>
&gt; List of dts files is now iterated and files are copied into dedicated kernel arch dir.<br>
&gt;<br>
&gt; Signed-off-by: Rafal Susz &lt;<a href="mailto:rafal.susz@gmail.com">rafal.susz@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  linux/<a href="http://linux.mk" rel="noreferrer" target="_blank">linux.mk</a> | 5 +++--<br>
&gt;  1 file changed, 3 insertions(+), 2 deletions(-)<br>
&gt;<br>
&gt; diff --git a/linux/<a href="http://linux.mk" rel="noreferrer" target="_blank">linux.mk</a> b/linux/<a href="http://linux.mk" rel="noreferrer" target="_blank">linux.mk</a><br>
&gt; index e98b25cb72..12f0b03dbc 100644<br>
&gt; --- a/linux/<a href="http://linux.mk" rel="noreferrer" target="_blank">linux.mk</a><br>
&gt; +++ b/linux/<a href="http://linux.mk" rel="noreferrer" target="_blank">linux.mk</a><br>
&gt; @@ -370,8 +370,9 @@ endif<br>
&gt;  # Compilation. We make sure the kernel gets rebuilt when the<br>
&gt;  # configuration has changed.<br>
&gt;  define LINUX_BUILD_CMDS<br>
&gt; -     $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_<wbr>DTS),<br>
&gt; -             cp -f $(call qstrip,$(BR2_LINUX_KERNEL_<wbr>CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)<br>
<br>
</span>Commit f142f23ecf9ee (package/linux: drop useless intermediate DTS booleans)<br>
should have removed BR2_LINUX_KERNEL_USE_CUSTOM_<wbr>DTS. There is another<br>
reference to this symbol below.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; +     @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_<wbr>CUSTOM_DTS_PATH)); do \<br>
&gt; +             cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ;   \<br>
&gt; +     done<br>
&gt;       $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)<br>
&gt;       @if grep -q &quot;CONFIG_MODULES=y&quot; $(@D)/.config; then      \<br>
&gt;               $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ;        \<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">baruch<br>
<br>
--<br>
     <a href="http://baruch.siach.name/blog/" rel="noreferrer" target="_blank">http://baruch.siach.name/blog/</a>                  ~. .~   Tk Open Systems<br>
=}----------------------------<wbr>--------------------ooO--U--<wbr>Ooo------------{=<br>
   - <a href="mailto:baruch@tkos.co.il">baruch@tkos.co.il</a> - tel: <a href="tel:%2B972.52.368.4656" value="+972523684656">+972.52.368.4656</a>, <a href="http://www.tkos.co.il" rel="noreferrer" target="_blank">http://www.tkos.co.il</a> -<br>
</font></span></blockquote></div><br></div>
Baruch Siach March 13, 2018, 12:45 p.m. UTC | #3
Hi Rafał,

On Tue, Mar 13, 2018 at 01:31:36PM +0100, Rafał Susz wrote:
> could you point where is "another reference" to this bool. I grepped br and
> did not find any other files.
> In general it was good idea to drop these booleans and basing on
> user-entered strings take do some action or not.

Here is what I get for current git master:

$ git grep KERNEL_USE_CUSTOM_DTS origin/master 
origin/master:configs/s6lx9_microboard_defconfig:BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y
origin/master:linux/linux.mk:   $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
origin/master:linux/linux.mk:BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings)

Your patch only removes the second reference. There a two more to be 
converted/removed.

baruch

> 2018-03-13 12:49 GMT+01:00 Baruch Siach <baruch@tkos.co.il>:
> > On Tue, Mar 13, 2018 at 12:32:17PM +0100, Rafal Susz wrote:
> > > Custom dts files are still conditionally copied based on non existing
> > > boolean. So it is currently not possible to use custom dts file(s) at
> > all.
> > >
> > > List of dts files is now iterated and files are copied into dedicated
> > kernel arch dir.
> > >
> > > Signed-off-by: Rafal Susz <rafal.susz@gmail.com>
> > > ---
> > >  linux/linux.mk | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/linux/linux.mk b/linux/linux.mk
> > > index e98b25cb72..12f0b03dbc 100644
> > > --- a/linux/linux.mk
> > > +++ b/linux/linux.mk
> > > @@ -370,8 +370,9 @@ endif
> > >  # Compilation. We make sure the kernel gets rebuilt when the
> > >  # configuration has changed.
> > >  define LINUX_BUILD_CMDS
> > > -     $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
> > > -             cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))
> > $(KERNEL_ARCH_PATH)/boot/dts/)
> >
> > Commit f142f23ecf9ee (package/linux: drop useless intermediate DTS
> > booleans)
> > should have removed BR2_LINUX_KERNEL_USE_CUSTOM_DTS. There is another
> > reference to this symbol below.
> >
> > > +     @for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH));
> > do \
> > > +             cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ;   \
> > > +     done
> > >       $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)
> > $(LINUX_TARGET_NAME)
> > >       @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then      \
> > >               $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D)
> > modules ;        \
> >
> > baruch
diff mbox series

Patch

diff --git a/linux/linux.mk b/linux/linux.mk
index e98b25cb72..12f0b03dbc 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -370,8 +370,9 @@  endif
 # Compilation. We make sure the kernel gets rebuilt when the
 # configuration has changed.
 define LINUX_BUILD_CMDS
-	$(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
-		cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)
+	@for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \
+		cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ;   \
+	done
 	$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
 	@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then	\
 		$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ;	\