Commit 4d6b697f authored by Walter Lozano's avatar Walter Lozano

dts: move Makefile rules

In order to make rules clearer, move the dts rules to the proper
Makefile.
Signed-off-by: Walter Lozano's avatarWalter Lozano <walter.lozano@collabora.com>
parent 20ab0405
......@@ -1147,9 +1147,6 @@ dtbs: dts/dt.dtb
PHONY += dts/dt.dtb
dts/dt.dtb: tools
$(Q)$(MAKE) $(build)=dts dtbs
$(CP) dts/dt.dtb dts/dt-full.dtb
$(DTOC) compatible -d dts/dt-full.dtb -o include/generated/compatible.h
$(DTOC) shrink -d dts/dt-full.dtb -o dts/dt.dtb
PHONY += compatible
compatible: include/generated/compatible.h
......
......@@ -5,6 +5,10 @@
# This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is
# enabled. See doc/README.fdt-control for more details.
RM = rm
CP = cp
DTOC = $(objtree)/tools/dtoc/dtoc
DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
ifeq ($(DEVICE_TREE),)
DEVICE_TREE := unset
......@@ -16,15 +20,24 @@ else
DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
endif
$(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
$(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep $(objtree)/tools/dtoc FORCE
$(call if_changed,fdtgrep)
ifeq ($(CONFIG_OF_DTB_PROPS_REMOVE),y)
$(obj)/dt.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
$(RM) $(obj)/dt.dtb
$(call if_changed,fdt_rm_props)
$(CP) $(obj)/dt.dtb $(obj)/dt-full.dtb
$(DTOC) compatible -d $(obj)/dt-full.dtb -o $(obj)/../include/generated/compatible.h
$(DTOC) shrink -d $(obj)/dt-full.dtb -o $(obj)/dt.dtb
else
$(obj)/dt.dtb: $(DTB) FORCE
$(RM) $(obj)/dt.dtb
$(call if_changed,fdt_rm_props)
$(call if_changed,shipped)
$(CP) $(obj)/dt.dtb $(obj)/dt-full.dtb
$(DTOC) compatible -d $(obj)/dt-full.dtb -o $(obj)/../include/generated/compatible.h
$(DTOC) shrink -d $(obj)/dt-full.dtb -o $(obj)/dt.dtb
endif
targets += dt.dtb dt-spl.dtb
......
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