nios2: fix building all dtbs
authorRob Herring <robh@kernel.org>
Wed, 1 Aug 2018 17:49:58 +0000 (11:49 -0600)
committerRob Herring <robh@kernel.org>
Tue, 2 Oct 2018 14:22:49 +0000 (09:22 -0500)
nios2 has a 'dtbs' target, but nothing is added to 'dtb-*' targets and
no dtbs were getting built. This enables building all the dts files in
arch/nios2/boot/dts/ when COMPILE_TEST and OF_ALL_DTBS are enabled.

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

index f6358e395b250d11fb725864c30e19f2b243ff18..a91a0b09be6336b07e01b73c467699ad3b4513de 100644 (file)
@@ -1,3 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-y := $(patsubst "%.dts",%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
+
+dtstree                := $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))