From: Andrew Bresticker Date: Thu, 21 Aug 2014 20:04:21 +0000 (-0700) Subject: MIPS: Add support for building device-tree binaries X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c8d333dfe4bab898fd87f4c3ae555f2c1388eb8f;p=openwrt%2Fstaging%2Fblogic.git MIPS: Add support for building device-tree binaries Add a 'dtbs' Makefile target that just builds the device-tree binaries enabled by the configuration. Signed-off-by: Andrew Bresticker Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: James Hogan Cc: Paul Burton Cc: David Daney Cc: John Crispin Cc: Jayachandran C Cc: Qais Yousef Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7557/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/Makefile b/arch/mips/Makefile index bd642623f360..23cb94806fbc 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -339,6 +339,10 @@ core-$(CONFIG_BUILTIN_DTB) += arch/mips/boot/dts/ %.dtb %.dtb.S %.dtb.o: | scripts $(Q)$(MAKE) $(build)=arch/mips/boot/dts arch/mips/boot/dts/$@ +PHONY += dtbs +dtbs: scripts + $(Q)$(MAKE) $(build)=arch/mips/boot/dts dtbs + archprepare: ifdef CONFIG_MIPS32_N32 @echo ' Checking missing-syscalls for N32' @@ -373,6 +377,7 @@ define archhelp echo ' vmlinuz.srec - SREC zboot image' echo ' uImage - U-Boot image' echo ' uImage.gz - U-Boot image (gzip)' + echo ' dtbs - Device-tree blobs for enabled boards' echo echo ' These will be default as appropriate for a configured platform.' endef diff --git a/arch/mips/boot/.gitignore b/arch/mips/boot/.gitignore index a73d6e2c4f64..d3962cd5ce0c 100644 --- a/arch/mips/boot/.gitignore +++ b/arch/mips/boot/.gitignore @@ -5,3 +5,4 @@ zImage zImage.tmp calc_vmlinuz_load_addr uImage +*.dtb diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile index 6bb41df59264..9b3da1f4bc6d 100644 --- a/arch/mips/boot/dts/Makefile +++ b/arch/mips/boot/dts/Makefile @@ -1,3 +1,8 @@ obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) -clean-files += *.dtb.S +targets += dtbs +targets += $(dtb-y) + +dtbs: $(addprefix $(obj)/, $(dtb-y)) + +clean-files += *.dtb *.dtb.S