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

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).