devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files
@ 2022-10-14 15:13 Andrew Davis
  2022-10-20 22:47 ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Davis @ 2022-10-14 15:13 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Masahiro Yamada,
	Michal Marek, Nick Desaulniers, Rob Herring, devicetree,
	linux-kbuild, linux-kernel
  Cc: Andrew Davis

Currently DTB Overlays (.dtbo) are build from source files with the same
extension (.dts) as the base DTs (.dtb). This may become confusing and
even lead to wrong results. For example, a composite DTB (created from a
base DTB and a set of overlays) might have the same name as one of the
overlays that create it.

Different files should be generated from differently named sources.
 .dtb  <-> .dts
 .dtbo <-> .dtso

We do not remove the ability to compile DTBO files from .dts files here,
only add a new rule allowing the .dtso file name. The current .dts named
overlays can be renamed with time. After all have been renamed we can
remove the other rule.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 scripts/Makefile.lib | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 3aa384cec76b..0376a6f18bfb 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -408,6 +408,9 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
 $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
 	$(call if_changed_dep,dtc)
 
+$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
+	$(call if_changed_dep,dtc)
+
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
 # Bzip2
-- 
2.37.3


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

* Re: [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files
  2022-10-14 15:13 [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files Andrew Davis
@ 2022-10-20 22:47 ` Rob Herring
  2022-10-21  6:52   ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2022-10-20 22:47 UTC (permalink / raw)
  To: Andrew Davis, Geert Uytterhoeven
  Cc: Nishanth Menon, Vignesh Raghavendra, Masahiro Yamada,
	Michal Marek, Nick Desaulniers, devicetree, linux-kbuild,
	linux-kernel

On Fri, Oct 14, 2022 at 10:13 AM Andrew Davis <afd@ti.com> wrote:
>
> Currently DTB Overlays (.dtbo) are build from source files with the same
> extension (.dts) as the base DTs (.dtb). This may become confusing and
> even lead to wrong results. For example, a composite DTB (created from a
> base DTB and a set of overlays) might have the same name as one of the
> overlays that create it.
>
> Different files should be generated from differently named sources.
>  .dtb  <-> .dts
>  .dtbo <-> .dtso
>
> We do not remove the ability to compile DTBO files from .dts files here,
> only add a new rule allowing the .dtso file name. The current .dts named
> overlays can be renamed with time. After all have been renamed we can
> remove the other rule.

There was a patch from Geert converting everything. I'd rather not
support both ways.

Rob

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

* Re: [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files
  2022-10-20 22:47 ` Rob Herring
@ 2022-10-21  6:52   ` Geert Uytterhoeven
  2022-10-21 14:44     ` Andrew Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2022-10-21  6:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: Andrew Davis, Geert Uytterhoeven, Nishanth Menon,
	Vignesh Raghavendra, Masahiro Yamada, Michal Marek,
	Nick Desaulniers, devicetree, linux-kbuild, linux-kernel,
	Frank Rowand

Hi Rob,

On Fri, Oct 21, 2022 at 12:47 AM Rob Herring <robh+dt@kernel.org> wrote:
> On Fri, Oct 14, 2022 at 10:13 AM Andrew Davis <afd@ti.com> wrote:
> > Currently DTB Overlays (.dtbo) are build from source files with the same
> > extension (.dts) as the base DTs (.dtb). This may become confusing and
> > even lead to wrong results. For example, a composite DTB (created from a
> > base DTB and a set of overlays) might have the same name as one of the
> > overlays that create it.
> >
> > Different files should be generated from differently named sources.
> >  .dtb  <-> .dts
> >  .dtbo <-> .dtso
> >
> > We do not remove the ability to compile DTBO files from .dts files here,
> > only add a new rule allowing the .dtso file name. The current .dts named
> > overlays can be renamed with time. After all have been renamed we can
> > remove the other rule.
>
> There was a patch from Geert converting everything. I'd rather not
> support both ways.

Actually that was a patch from Frank?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files
  2022-10-21  6:52   ` Geert Uytterhoeven
@ 2022-10-21 14:44     ` Andrew Davis
  2022-10-21 16:59       ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Davis @ 2022-10-21 14:44 UTC (permalink / raw)
  To: Geert Uytterhoeven, Rob Herring
  Cc: Geert Uytterhoeven, Nishanth Menon, Vignesh Raghavendra,
	Masahiro Yamada, Michal Marek, Nick Desaulniers, devicetree,
	linux-kbuild, linux-kernel, Frank Rowand

On 10/21/22 1:52 AM, Geert Uytterhoeven wrote:
> Hi Rob,
> 
> On Fri, Oct 21, 2022 at 12:47 AM Rob Herring <robh+dt@kernel.org> wrote:
>> On Fri, Oct 14, 2022 at 10:13 AM Andrew Davis <afd@ti.com> wrote:
>>> Currently DTB Overlays (.dtbo) are build from source files with the same
>>> extension (.dts) as the base DTs (.dtb). This may become confusing and
>>> even lead to wrong results. For example, a composite DTB (created from a
>>> base DTB and a set of overlays) might have the same name as one of the
>>> overlays that create it.
>>>
>>> Different files should be generated from differently named sources.
>>>   .dtb  <-> .dts
>>>   .dtbo <-> .dtso
>>>
>>> We do not remove the ability to compile DTBO files from .dts files here,
>>> only add a new rule allowing the .dtso file name. The current .dts named
>>> overlays can be renamed with time. After all have been renamed we can
>>> remove the other rule.
>>
>> There was a patch from Geert converting everything. I'd rather not
>> support both ways.
> 
> Actually that was a patch from Frank?
> 

That series looks to have stalled?

It won't be easy to convert all the files in one go, especially with series
in-flight with both names, not sure how we avoid having both extensions for
at least one cycle. Plus having both allowed lets rename the existing files
in a more granular/bisectable way.

Thanks,
Andrew

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

* Re: [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files
  2022-10-21 14:44     ` Andrew Davis
@ 2022-10-21 16:59       ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2022-10-21 16:59 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Geert Uytterhoeven, Geert Uytterhoeven, Nishanth Menon,
	Vignesh Raghavendra, Masahiro Yamada, Michal Marek,
	Nick Desaulniers, devicetree, linux-kbuild, linux-kernel,
	Frank Rowand

On Fri, Oct 21, 2022 at 9:44 AM Andrew Davis <afd@ti.com> wrote:
>
> On 10/21/22 1:52 AM, Geert Uytterhoeven wrote:
> > Hi Rob,
> >
> > On Fri, Oct 21, 2022 at 12:47 AM Rob Herring <robh+dt@kernel.org> wrote:
> >> On Fri, Oct 14, 2022 at 10:13 AM Andrew Davis <afd@ti.com> wrote:
> >>> Currently DTB Overlays (.dtbo) are build from source files with the same
> >>> extension (.dts) as the base DTs (.dtb). This may become confusing and
> >>> even lead to wrong results. For example, a composite DTB (created from a
> >>> base DTB and a set of overlays) might have the same name as one of the
> >>> overlays that create it.
> >>>
> >>> Different files should be generated from differently named sources.
> >>>   .dtb  <-> .dts
> >>>   .dtbo <-> .dtso
> >>>
> >>> We do not remove the ability to compile DTBO files from .dts files here,
> >>> only add a new rule allowing the .dtso file name. The current .dts named
> >>> overlays can be renamed with time. After all have been renamed we can
> >>> remove the other rule.
> >>
> >> There was a patch from Geert converting everything. I'd rather not
> >> support both ways.
> >
> > Actually that was a patch from Frank?
> >
>
> That series looks to have stalled?

Feel free to resurrect it if Frank is not going to.

>
> It won't be easy to convert all the files in one go, especially with series
> in-flight with both names, not sure how we avoid having both extensions for
> at least one cycle. Plus having both allowed lets rename the existing files
> in a more granular/bisectable way.

Fair enough. I'd propose a series adding the build support and
converting the unittest. Then I can provide a branch for arm-soc and
the dts conversions.

Rob

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

end of thread, other threads:[~2022-10-21 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-14 15:13 [PATCH] kbuild: Allow DTB overlays to built from .dtso named source files Andrew Davis
2022-10-20 22:47 ` Rob Herring
2022-10-21  6:52   ` Geert Uytterhoeven
2022-10-21 14:44     ` Andrew Davis
2022-10-21 16:59       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).