diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-01-02 13:27:14 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2013-02-23 22:12:52 -0500 |
commit | 2a02bc166dd1c7dae71bd3115fb10ec0c351a31f (patch) | |
tree | 41afb43a7ceb5b4c1197c6583e254c1d1553f9a5 | |
parent | 127bc79e30387c57206aab8d9d0ef6c8c34a474e (diff) |
xtensa: use new common dtc rule
The current rules have the .dtb files build in a different directory
from the .dts files. This patch changes xtensa to use the generic dtb
rule which builds .dtb files in the same directory as the source .dts.
This requires moving parts of arch/xtensa/boot/Makefile into newly
created arch/xtensa/boot/dts/Makefile, and updating arch/xtensa/Makefile
to call the new Makefile.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
-rw-r--r-- | arch/xtensa/Makefile | 4 | ||||
-rw-r--r-- | arch/xtensa/boot/Makefile | 12 | ||||
-rw-r--r-- | arch/xtensa/boot/dts/Makefile | 15 |
3 files changed, 17 insertions, 14 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 0aa72702f179..48c1a5b3bd35 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -88,7 +88,7 @@ core-y += $(buildvar) $(buildplf) | |||
88 | libs-y += arch/xtensa/lib/ $(LIBGCC) | 88 | libs-y += arch/xtensa/lib/ $(LIBGCC) |
89 | 89 | ||
90 | ifneq ($(CONFIG_BUILTIN_DTB),"") | 90 | ifneq ($(CONFIG_BUILTIN_DTB),"") |
91 | core-$(CONFIG_OF) += arch/xtensa/boot/ | 91 | core-$(CONFIG_OF) += arch/xtensa/boot/dts/ |
92 | endif | 92 | endif |
93 | 93 | ||
94 | boot := arch/xtensa/boot | 94 | boot := arch/xtensa/boot |
@@ -101,7 +101,7 @@ zImage: vmlinux | |||
101 | $(Q)$(MAKE) $(build)=$(boot) $@ | 101 | $(Q)$(MAKE) $(build)=$(boot) $@ |
102 | 102 | ||
103 | %.dtb: | 103 | %.dtb: |
104 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 104 | $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ |
105 | 105 | ||
106 | define archhelp | 106 | define archhelp |
107 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' | 107 | @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' |
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile index 818647e815d7..64ffc4b53df6 100644 --- a/arch/xtensa/boot/Makefile +++ b/arch/xtensa/boot/Makefile | |||
@@ -25,18 +25,6 @@ bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf | |||
25 | bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot | 25 | bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot |
26 | bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot | 26 | bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot |
27 | 27 | ||
28 | |||
29 | BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB)).dtb.o | ||
30 | ifneq ($(CONFIG_BUILTIN_DTB),"") | ||
31 | obj-$(CONFIG_OF) += $(BUILTIN_DTB) | ||
32 | endif | ||
33 | |||
34 | # Rule to build device tree blobs | ||
35 | $(obj)/%.dtb: $(src)/dts/%.dts FORCE | ||
36 | $(call if_changed_dep,dtc) | ||
37 | |||
38 | clean-files := *.dtb.S | ||
39 | |||
40 | zImage Image: $(bootdir-y) | 28 | zImage Image: $(bootdir-y) |
41 | 29 | ||
42 | $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ | 30 | $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ |
diff --git a/arch/xtensa/boot/dts/Makefile b/arch/xtensa/boot/dts/Makefile new file mode 100644 index 000000000000..5f711bba8307 --- /dev/null +++ b/arch/xtensa/boot/dts/Makefile | |||
@@ -0,0 +1,15 @@ | |||
1 | # | ||
2 | # arch/xtensa/boot/dts/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | ||
5 | # License. See the file "COPYING" in the main directory of this archive | ||
6 | # for more details. | ||
7 | # | ||
8 | # | ||
9 | |||
10 | BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB)).dtb.o | ||
11 | ifneq ($(CONFIG_BUILTIN_DTB),"") | ||
12 | obj-$(CONFIG_OF) += $(BUILTIN_DTB) | ||
13 | endif | ||
14 | |||
15 | clean-files := *.dtb.S | ||