nios2: build .dtb files in dts directory
authorRob Herring <robh@kernel.org>
Thu, 8 Oct 2015 00:21:18 +0000 (19:21 -0500)
committerRob Herring <robh@kernel.org>
Tue, 2 Oct 2018 14:22:49 +0000 (09:22 -0500)
Align nios2 with other architectures which build the dtb files in the
same directory as the dts files. This is also in line with most other
build targets which are located in the same directory as the source.
This move will help enable the 'dtbs' target which builds all the dtbs
regardless of kernel config.

This transition could break some scripts if they expect dtb files in
the old location.

Cc: Ley Foon Tan <lftan@altera.com>
Cc: nios2-dev@lists.rocketboards.org
Signed-off-by: Rob Herring <robh@kernel.org>
arch/nios2/Makefile
arch/nios2/boot/Makefile
arch/nios2/boot/dts/Makefile [new file with mode: 0644]

index 8673a79dca9c6cef030158cff20e0c3d89208d1b..50eece1c6adbccd705cecda6646660fa33ad3190 100644 (file)
@@ -59,10 +59,10 @@ archclean:
        $(Q)$(MAKE) $(clean)=$(nios2-boot)
 
 %.dtb: | scripts
-       $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+       $(Q)$(MAKE) $(build)=$(nios2-boot)/dts $(nios2-boot)/dts/$@
 
 dtbs:
-       $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+       $(Q)$(MAKE) $(build)=$(nios2-boot)/dts
 
 $(BOOT_TARGETS): vmlinux
        $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
index 2ba23a6797320a06ccf46e10e1ea348205a423ee..007586094dde8fa32fb7a3fa83af2ddbbeb70f44 100644 (file)
@@ -47,10 +47,6 @@ obj-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) += linked_dtb.o
 
 targets += $(dtb-y)
 
-# Rule to build device tree blobs with make command
-$(obj)/%.dtb: $(src)/dts/%.dts FORCE
-       $(call if_changed_dep,dtc)
-
 $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
 
 install:
diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile
new file mode 100644 (file)
index 0000000..f66554c
--- /dev/null
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0