Skip to contentSkip to conversation

kbuild: Allow DTB overlays to built from .dtso named source files

PATCH In review Andrew Davis 3 participants 5 messages Oct 14, 2022 – Oct 21, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Allow DTB overlays to built from .dtso named source files

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.

---
 scripts/Makefile.lib | 3 +++
 1 file changed, 3 insertions(+)
scripts/Makefile.lib +3 -0
index 3aa384cec76b..0376a6f18bfb 100644
@@ -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
Signature · 1 line
2.37.3
#1 lore raw
Quoted 7 lines · 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.

Quoted 8 lines

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

#2 lore raw

Hi Rob,

Quoted 11 lines · Rob Herring
Quoted 10 lines · 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

Quoted 7 lines
Quoted 4 lines

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 -- [email protected]

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

#3 lore raw
Quoted 19 lines · Geert Uytterhoeven

Hi Rob,

Quoted 16 lines · Rob Herring
Quoted 14 lines · 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.

Quoted 5 lines
Quoted 2 lines

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

#4 lore raw
Quoted 21 lines · Andrew Davis
Quoted 19 lines · Geert Uytterhoeven

Hi Rob,

Quoted 16 lines · Rob Herring
Quoted 14 lines · 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.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 5 lines

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