From patchwork Mon Oct 1 15:45:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 1531821 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7E8D63FE80 for ; Mon, 1 Oct 2012 15:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518Ab2JAPq1 (ORCPT ); Mon, 1 Oct 2012 11:46:27 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:60933 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469Ab2JAPqC (ORCPT ); Mon, 1 Oct 2012 11:46:02 -0400 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 38C656318; Mon, 1 Oct 2012 09:47:09 -0600 (MDT) Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 21671E4786; Mon, 1 Oct 2012 09:45:59 -0600 (MDT) From: Stephen Warren To: Michal Marek Cc: linux-kbuild@vger.kernel.org, David Gibson , Jon Loeliger , Grant Likely , Rob Herring , Scott Wood , Mark Brown , Jean-Christophe PLAGNIOL-VILLARD , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Stephen Warren Subject: [PATCH V3 1/2] kbuild: centralize .dts->.dtb rule Date: Mon, 1 Oct 2012 09:45:50 -0600 Message-Id: <1349106351-17714-2-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1349106351-17714-1-git-send-email-swarren@wwwdotorg.org> References: <1349106351-17714-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Stephen Warren All architectures that use cmd_dtc do so in the same way. Move the build rule to a central location to avoid duplication. Signed-off-by: Stephen Warren --- v3: No change. v2: New patch. --- arch/arm/boot/Makefile | 4 ---- arch/c6x/boot/Makefile | 3 --- arch/openrisc/boot/Makefile | 3 --- arch/powerpc/boot/Makefile | 4 ---- scripts/Makefile.lib | 3 +++ 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 3fdab01..da33331 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -61,10 +61,6 @@ endif targets += $(dtb-y) -# Rule to build device tree blobs -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) - $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) clean-files := *.dtb diff --git a/arch/c6x/boot/Makefile b/arch/c6x/boot/Makefile index 6891257..ad605fb 100644 --- a/arch/c6x/boot/Makefile +++ b/arch/c6x/boot/Makefile @@ -12,9 +12,6 @@ ifneq ($(DTB),) obj-y += linked_dtb.o endif -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) - quiet_cmd_cp = CP $< $@$2 cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) diff --git a/arch/openrisc/boot/Makefile b/arch/openrisc/boot/Makefile index 0995835..fd329bd 100644 --- a/arch/openrisc/boot/Makefile +++ b/arch/openrisc/boot/Makefile @@ -10,6 +10,3 @@ obj-y += $(BUILTIN_DTB) clean-files := *.dtb.S #DTC_FLAGS ?= -p 1024 - -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 6a15c96..90206f2 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -356,10 +356,6 @@ $(obj)/treeImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) $(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb) -# Rule to build device tree blobs -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) - # If there isn't a platform selected then just strip the vmlinux. ifeq (,$(image-y)) image-y := vmlinux.strip diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0be6f11..425578e 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -266,6 +266,9 @@ $(obj)/%.dtb.S: $(obj)/%.dtb quiet_cmd_dtc = DTC $@ cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< +$(obj)/%.dtb: $(src)/dts/%.dts FORCE + $(call if_changed_dep,dtc) + # Bzip2 # ---------------------------------------------------------------------------