From patchwork Tue Sep 4 08:05:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 10586955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2EA12174C for ; Tue, 4 Sep 2018 08:09:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B63C28FC6 for ; Tue, 4 Sep 2018 08:09:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F36628FC8; Tue, 4 Sep 2018 08:09:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6EA6028FC6 for ; Tue, 4 Sep 2018 08:09:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MsS0DTF+q/+e6YzSIRtI1JSCVWSvE5bKCPR2ZY13f2Y=; b=Ecr5YJFs5jnFME /YPqXcUB9bpeI8bKXK0HX5uxEoPsXAy74m5KYcWIquDw7mxbAm6p4p3QJ3E4nOKJ0RozMVtaypHdT /oxIY4OrLjm0gtz5eeGvqaTn9PL5BbXKVmQQ7psIFyTZyr2tZBDUo3XuXXzujzWAJyWrJaMiJN7bJ AC/Utqtzfiz8Fq4729Z6nrCt4ApTFeVlIGnhB6f3PcyhLT9Epjn2NfeK9MxGIG/CPo6VgoP6sVYyt 1uluBdoqwW8z0o7FBQE4FF5f6hwEQqLYrw4akPy4wfAxvSRJgK/y+H5LxateTDRVsfYqpMoGYpPYP Ur7e96y2n44uK+43JyJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fx6Ot-00031T-Gz; Tue, 04 Sep 2018 08:09:27 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fx6MO-0001qx-JV for linux-arm-kernel@lists.infradead.org; Tue, 04 Sep 2018 08:06:56 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w8486Pfa107074; Tue, 4 Sep 2018 03:06:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1536048385; bh=vLXnr8l/BDKBJnxItklTJCoQ7PJGWAoA21dhsacLKVU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kwNNa0GWUmBTZ55ipaBd6mHpEIg10gWBc5GO9YD3EPJovXk7+2A+aQ3mSXLMgAVDd fdRJogRF69HVYJstr8+zsqP4nNmChjUcIQY6y+t1+20Eacn8mgywnpJI5/+MtvH+O0 0TLp9EdsJLMcM6b6XhNwzClaoxBzETH+PjPCQCns= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8486P1Q003652; Tue, 4 Sep 2018 03:06:25 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 4 Sep 2018 03:06:24 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 4 Sep 2018 03:06:24 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8486FX0005423; Tue, 4 Sep 2018 03:06:22 -0500 From: Tero Kristo To: , , , , Subject: [RESEND PATCHv2 2/4] ARM: dts: add support for individual build flags for DT subdirs Date: Tue, 4 Sep 2018 11:05:42 +0300 Message-ID: <1536048344-9995-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1536048344-9995-1-git-send-email-t-kristo@ti.com> References: <1535719666-13595-1-git-send-email-t-kristo@ti.com> <1536048344-9995-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180904_010652_771098_766A5C26 X-CRM114-Status: GOOD ( 15.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, tony@atomide.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the makefile is setup in such manner that even if we build a DT file in a subdirectory under arch/arm/boot/dts, it gets built based on the base boot/dts/Makefile rules. This patch modifies the base makefile in such manner, that it detects which makefile to use based on build target path. This allows setting for example per-directory DTC_FLAGS and using those for the subdir build. The dtbdir local variable is setup to target to the build path. Signed-off-by: Tero Kristo --- arch/arm/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index ab555a0..b7c21e8 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -339,8 +339,10 @@ $(BOOT_TARGETS): vmlinux $(INSTALL_TARGETS): $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ +%.dtb %.dtbo: dtbdir = $(patsubst %/,%,$(patsubst %./,%,$(boot)/dts/$(dir $@))) + %.dtb %.dtbo: | scripts - $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ + $(Q)$(MAKE) $(build)=$(dtbdir) MACHINE=$(MACHINE) $(boot)/dts/$@ PHONY += dtbs dtbs_install