17c5c6098aa67df998e52198152377abb989d0d5
[openwrt/staging/wigyori.git] /
1 From 363547d2191cbc32ca954ba75d72908712398ff2 Mon Sep 17 00:00:00 2001
2 From: Andrew Davis <afd@ti.com>
3 Date: Mon, 24 Oct 2022 12:34:28 -0500
4 Subject: [PATCH] kbuild: Allow DTB overlays to built from .dtso named source
5 files
6
7 Currently DTB Overlays (.dtbo) are build from source files with the same
8 extension (.dts) as the base DTs (.dtb). This may become confusing and
9 even lead to wrong results. For example, a composite DTB (created from a
10 base DTB and a set of overlays) might have the same name as one of the
11 overlays that create it.
12
13 Different files should be generated from differently named sources.
14 .dtb <-> .dts
15 .dtbo <-> .dtso
16
17 We do not remove the ability to compile DTBO files from .dts files here,
18 only add a new rule allowing the .dtso file name. The current .dts named
19 overlays can be renamed with time. After all have been renamed we can
20 remove the other rule.
21
22 Signed-off-by: Andrew Davis <afd@ti.com>
23 Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
24 Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
25 Reviewed-by: Frank Rowand <frowand.list@gmail.com>
26 Tested-by: Frank Rowand <frowand.list@gmail.com>
27 Link: https://lore.kernel.org/r/20221024173434.32518-2-afd@ti.com
28 Signed-off-by: Rob Herring <robh@kernel.org>
29 ---
30 scripts/Makefile.lib | 3 +++
31 1 file changed, 3 insertions(+)
32
33 --- a/scripts/Makefile.lib
34 +++ b/scripts/Makefile.lib
35 @@ -408,6 +408,9 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_T
36 $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
37 $(call if_changed_dep,dtc)
38
39 +$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
40 + $(call if_changed_dep,dtc)
41 +
42 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
43
44 # Bzip2