Commit 1020e29cdab6bed8521a5a1a1b6f6513c393bc85

Authored by Stephen Warren
Committed by Rob Herring
1 parent 19fbd6b296

c6x: use new common dtc rule

The current rules have the .dtb files build in a different directory
from the .dts files. This patch changes c6x to use the generic dtb
rule which builds .dtb files in the same directory as the source .dts.

This requires moving parts of arch/c6x/boot/Makefile into newly created
arch/c6x/boot/dts/Makefile, and updating arch/c6x/Makefile to call the
new Makefile. linked_dtb.S is also moved into boot/dts/ since it's used
by rules that were moved.

Acked-by: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: linux-c6x-dev@linux-c6x.org
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>

Showing 5 changed files with 23 additions and 23 deletions Side-by-side Diff

... ... @@ -41,7 +41,7 @@
41 41 export DTB
42 42  
43 43 ifneq ($(DTB),)
44   -core-y += $(boot)/
  44 +core-y += $(boot)/dts/
45 45 endif
46 46  
47 47 # With make 3.82 we cannot mix normal and wildcard targets
arch/c6x/boot/Makefile
... ... @@ -6,26 +6,6 @@
6 6 $(obj)/vmlinux.bin: vmlinux FORCE
7 7 $(call if_changed,objcopy)
8 8  
9   -DTC_FLAGS ?= -p 1024
10   -
11   -ifneq ($(DTB),)
12   -obj-y += linked_dtb.o
13   -endif
14   -
15   -$(obj)/%.dtb: $(src)/dts/%.dts FORCE
16   - $(call if_changed_dep,dtc)
17   -
18   -quiet_cmd_cp = CP $< $@$2
19   - cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
20   -
21   -# Generate builtin.dtb from $(DTB).dtb
22   -$(obj)/builtin.dtb: $(obj)/$(DTB).dtb
23   - $(call if_changed,cp)
24   -
25   -$(obj)/linked_dtb.o: $(obj)/builtin.dtb
26   -
27 9 $(obj)/dtbImage.%: vmlinux
28 10 $(call if_changed,objcopy)
29   -
30   -clean-files := $(obj)/*.dtb
arch/c6x/boot/dts/Makefile
  1 +#
  2 +# Makefile for device trees
  3 +#
  4 +
  5 +DTC_FLAGS ?= -p 1024
  6 +
  7 +ifneq ($(DTB),)
  8 +obj-y += linked_dtb.o
  9 +endif
  10 +
  11 +quiet_cmd_cp = CP $< $@$2
  12 + cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
  13 +
  14 +# Generate builtin.dtb from $(DTB).dtb
  15 +$(obj)/builtin.dtb: $(obj)/$(DTB).dtb
  16 + $(call if_changed,cp)
  17 +
  18 +$(obj)/linked_dtb.o: $(obj)/builtin.dtb
  19 +
  20 +clean-files := *.dtb
arch/c6x/boot/dts/linked_dtb.S
  1 +.section __fdt_blob,"a"
  2 +.incbin "arch/c6x/boot/dts/builtin.dtb"
arch/c6x/boot/linked_dtb.S
1   -.section __fdt_blob,"a"
2   -.incbin "arch/c6x/boot/builtin.dtb"