Commit 25fff6aa authored by Rob Herring's avatar Rob Herring

Merge branch 'all-dtbs-v2' into for-next

parents 3f5ceec9 99085704
...@@ -121,7 +121,7 @@ $(boot_targets): vmlinux ...@@ -121,7 +121,7 @@ $(boot_targets): vmlinux
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
dtbs: scripts dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts dtbs $(Q)$(MAKE) $(build)=$(boot)/dts
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
......
...@@ -6,10 +6,12 @@ ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"") ...@@ -6,10 +6,12 @@ ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
endif endif
obj-y += $(builtindtb-y).dtb.o obj-y += $(builtindtb-y).dtb.o
targets += $(builtindtb-y).dtb dtb-y := $(builtindtb-y).dtb
.SECONDARY: $(obj)/$(builtindtb-y).dtb.S .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
dtbs: $(addprefix $(obj)/, $(builtindtb-y).dtb) dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always := $(dtb-y)
clean-files := *.dtb *.dtb.S clean-files := *.dtb *.dtb.S
...@@ -740,5 +740,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ ...@@ -740,5 +740,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
endif endif
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always := $(dtb-y) always := $(dtb-y)
clean-files := *.dtb clean-files := *.dtb
...@@ -14,3 +14,9 @@ dts-dirs += sprd ...@@ -14,3 +14,9 @@ dts-dirs += sprd
dts-dirs += xilinx dts-dirs += xilinx
subdir-y := $(dts-dirs) subdir-y := $(dts-dirs)
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
always := $(dtb-y)
...@@ -8,5 +8,8 @@ dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb ...@@ -8,5 +8,8 @@ dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb
dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb
dtb-$(CONFIG_H8S_EDOSK2674) := edosk2674.dtb dtb-$(CONFIG_H8S_EDOSK2674) := edosk2674.dtb
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always := $(dtb-y) always := $(dtb-y)
clean-files := *.dtb.S *.dtb clean-files := *.dtb.S *.dtb
...@@ -72,7 +72,7 @@ $(boot_targets): vmlinux ...@@ -72,7 +72,7 @@ $(boot_targets): vmlinux
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
dtbs: scripts dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts dtbs $(Q)$(MAKE) $(build)=$(boot)/dts
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
......
...@@ -12,11 +12,10 @@ endif ...@@ -12,11 +12,10 @@ endif
dtb-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb dtb-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb
obj-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb.o obj-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb.o
targets += dtbs dtstree := $(srctree)/$(src)
targets += $(dtb-y) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
.SECONDARY: $(obj)/$(builtindtb-y).dtb.S .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
dtbs: $(addprefix $(obj)/, $(dtb-y)) always += $(dtb-y)
clean-files += *.dtb *.dtb.S clean-files += *.dtb *.dtb.S
...@@ -9,6 +9,9 @@ dts-dirs += ralink ...@@ -9,6 +9,9 @@ dts-dirs += ralink
obj-y := $(addsuffix /, $(dts-dirs)) obj-y := $(addsuffix /, $(dts-dirs))
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
always := $(dtb-y) always := $(dtb-y)
subdir-y := $(dts-dirs) subdir-y := $(dts-dirs)
clean-files := *.dtb *.dtb.S clean-files := *.dtb *.dtb.S
...@@ -101,6 +101,10 @@ zImage: vmlinux ...@@ -101,6 +101,10 @@ zImage: vmlinux
%.dtb: %.dtb:
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts
define archhelp define archhelp
@echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
@echo ' dtbs - Build device tree blobs for enabled boards'
endef endef
...@@ -12,4 +12,9 @@ ifneq ($(CONFIG_BUILTIN_DTB),"") ...@@ -12,4 +12,9 @@ ifneq ($(CONFIG_BUILTIN_DTB),"")
obj-$(CONFIG_OF) += $(BUILTIN_DTB) obj-$(CONFIG_OF) += $(BUILTIN_DTB)
endif endif
clean-files := *.dtb.S dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always += $(dtb-y)
clean-files += *.dtb *.dtb.S
...@@ -23,6 +23,16 @@ config OF_UNITTEST ...@@ -23,6 +23,16 @@ config OF_UNITTEST
If unsure, say N here, but this option is safe to enable. If unsure, say N here, but this option is safe to enable.
config OF_ALL_DTBS
bool "Build all Device Tree Blobs"
depends on COMPILE_TEST
select DTC
help
This option builds all possible Device Tree Blobs (DTBs) for the
current architecture.
If unsure, say N here, but this option is safe to enable.
config OF_FLATTREE config OF_FLATTREE
bool bool
select DTC select DTC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment