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: 145879 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3376278ljw; Tue, 4 Sep 2018 01:06:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+gqI1VTM+hoZ14nil20jjuM5RMk1DfLYMLlxHv8jcAYScGctl8TnzBUPJHHoo3fppl9f/ X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr32660692pls.233.1536048417699; Tue, 04 Sep 2018 01:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536048417; cv=none; d=google.com; s=arc-20160816; b=H2h8PwmwnMbf7w05qFqbu9FoYbngQk9VhjzWLY4jaDeezyQIM7yc4D0Jp5zNc0utl8 BoypPfUQlKIGV3P75JXQRr1G77OLIXLOU38RsU0uGMPiKOq+QTES9SXomeBKwRJ2dqbd 1z0zNhbzAVkjZS7bM4W1gQsXI+vyCpjtH4GSPq7J9fnVmXWEf+LvrU0LPHvQ5vFNuM4j BgmCdSn5b9rOOw6Hcor2kBSv+aBtacRkY4OIGbX97NDPu1tUIXDPsd+KC7X7AYlIGnsv I0CGH+7xMTOgOZhqQp962TR/Uwmg38iQVkAH30m/+AZ2U68CXtNYzBG0Mr2Jma/l9ixT D0Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vLXnr8l/BDKBJnxItklTJCoQ7PJGWAoA21dhsacLKVU=; b=B3yJj2TtKC5i1gBT6RQEFFQMduNfH6Xay6nHXh602E7Ff/uHogbI6v6y4wEH+ujwqa jJ/m+3XMOVgbJv/kQJBcw1YVe5SdP0YQHo1tczUPvGKv0vJeEtdy6WHiofN8z/uqRYYQ hzAOO3l57F4TW8xsZAlyEKTkyAq+prVgz8p1v/ijQ1XSgImx5HoiB9fbGyU6/0U9xCxK VjZc+TOjL1sh7JQfJkQ/VU8SyU6WMokkSi2yGhJRZE4A+EBztvIpKl8VBLcvct7gB8jQ L0qO1h3ZH8UU173KUF9EL7gbvt3in5+P8SvUNOMlhMEcR92twf9vdW7iVhDkzQin1hDA NVNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kwNNa0GW; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j13-v6si22338248pfd.319.2018.09.04.01.06.57; Tue, 04 Sep 2018 01:06:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kwNNa0GW; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbeIDMaz (ORCPT + 6 others); Tue, 4 Sep 2018 08:30:55 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45554 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726288AbeIDMaz (ORCPT ); Tue, 4 Sep 2018 08:30:55 -0400 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: , , , , CC: , , , 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki 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