xtensa: use new common dtc rule
authorStephen Warren <swarren@nvidia.com>
Wed, 2 Jan 2013 18:27:14 +0000 (11:27 -0700)
committerChris Zankel <chris@zankel.net>
Sun, 24 Feb 2013 03:12:52 +0000 (19:12 -0800)
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>
arch/xtensa/Makefile
arch/xtensa/boot/Makefile
arch/xtensa/boot/dts/Makefile [new file with mode: 0644]

index 0aa72702f1796b1892258ba995c4128a9df00a7b..48c1a5b3bd3565689a76b507c78365a7f12b921c 100644 (file)
@@ -88,7 +88,7 @@ core-y                += $(buildvar) $(buildplf)
 libs-y         += arch/xtensa/lib/ $(LIBGCC)
 
 ifneq ($(CONFIG_BUILTIN_DTB),"")
-core-$(CONFIG_OF) += arch/xtensa/boot/
+core-$(CONFIG_OF) += arch/xtensa/boot/dts/
 endif
 
 boot           := arch/xtensa/boot
@@ -101,7 +101,7 @@ zImage: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
 %.dtb:
-       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+       $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
 define archhelp
   @echo '* zImage      - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
index 818647e815d7e4bb6812668d56f7db6f2d9d5c32..64ffc4b53df6468484379f302f96bc194e292361 100644 (file)
@@ -25,18 +25,6 @@ bootdir-$(CONFIG_XTENSA_PLATFORM_ISS)         += boot-elf
 bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
 bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
 
-
-BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB)).dtb.o
-ifneq ($(CONFIG_BUILTIN_DTB),"")
-obj-$(CONFIG_OF) += $(BUILTIN_DTB)
-endif
-
-# Rule to build device tree blobs
-$(obj)/%.dtb: $(src)/dts/%.dts FORCE
-       $(call if_changed_dep,dtc)
-
-clean-files := *.dtb.S
-
 zImage Image: $(bootdir-y)
 
 $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
diff --git a/arch/xtensa/boot/dts/Makefile b/arch/xtensa/boot/dts/Makefile
new file mode 100644 (file)
index 0000000..5f711bb
--- /dev/null
@@ -0,0 +1,15 @@
+#
+# arch/xtensa/boot/dts/Makefile
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+#
+
+BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB)).dtb.o
+ifneq ($(CONFIG_BUILTIN_DTB),"")
+obj-$(CONFIG_OF) += $(BUILTIN_DTB)
+endif
+
+clean-files := *.dtb.S