Skip to content

Commit ce88c9c

Browse files
vireshkrobherring
authored andcommitted
kbuild: Add support to build overlays (%.dtbo)
Add support for building DT overlays (%.dtbo). The overlay's source file will have the usual extension, i.e. .dts, though the blob will have .dtbo extension to distinguish it from normal blobs. Acked-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/434ba2467dd0cd011565625aeb3450650afe0aae.1611904394.git.viresh.kumar@linaro.org
1 parent 59b48a7 commit ce88c9c

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*.c.[012]*.*
1919
*.dt.yaml
2020
*.dtb
21+
*.dtbo
2122
*.dtb.S
2223
*.dwo
2324
*.elf

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,9 @@ ifneq ($(dtstree),)
13371337
%.dtb: include/config/kernel.release scripts_dtc
13381338
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
13391339

1340+
%.dtbo: include/config/kernel.release scripts_dtc
1341+
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
1342+
13401343
PHONY += dtbs dtbs_install dtbs_check
13411344
dtbs: include/config/kernel.release scripts_dtc
13421345
$(Q)$(MAKE) $(build)=$(dtstree)
@@ -1816,7 +1819,7 @@ clean: $(clean-dirs)
18161819
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
18171820
\( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \
18181821
-o -name '*.ko.*' \
1819-
-o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
1822+
-o -name '*.dtb' -o -name '*.dtbo' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
18201823
-o -name '*.dwo' -o -name '*.lst' \
18211824
-o -name '*.su' -o -name '*.mod' \
18221825
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \

scripts/Makefile.dtbinst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ quiet_cmd_dtb_install = INSTALL $@
2929
$(dst)/%.dtb: $(obj)/%.dtb
3030
$(call cmd,dtb_install)
3131

32+
$(dst)/%.dtbo: $(obj)/%.dtbo
33+
$(call cmd,dtb_install)
34+
3235
PHONY += $(subdirs)
3336
$(subdirs):
3437
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)

scripts/Makefile.lib

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
8686

8787
ifneq ($(CHECK_DTBS),)
8888
extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
89+
extra-y += $(patsubst %.dtbo,%.dt.yaml, $(dtb-y))
8990
extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
91+
extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtb-))
9092
endif
9193

9294
# Add subdir path
@@ -327,6 +329,9 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ;
327329
$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
328330
$(call if_changed_dep,dtc)
329331

332+
$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
333+
$(call if_changed_dep,dtc)
334+
330335
DT_CHECKER ?= dt-validate
331336
DT_BINDING_DIR := Documentation/devicetree/bindings
332337
# DT_TMP_SCHEMA may be overridden from Documentation/devicetree/bindings/Makefile

0 commit comments

Comments
 (0)