From patchwork Tue Aug 28 12:32:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 145312 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1133073ljw; Tue, 28 Aug 2018 05:33:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbDQ9KNdrOzrcToVrrc2msrQVDZaJXrFkWqz3L155jzIVYGHfEMzwweVqeNTgtxDrOCPhDZ X-Received: by 2002:a62:3ac8:: with SMTP id v69-v6mr1391376pfj.164.1535459597381; Tue, 28 Aug 2018 05:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535459597; cv=none; d=google.com; s=arc-20160816; b=Jm1RVz6pagf1j3jhDP2+A2vhXqPrpanRYRFlw35OW/W1T3qIKGWePWJ9QvcPfHvdS9 +H2Czell+NswDqRMIMaUFdlK0j962Z39djXkScn8C9qeyfE29uaVDEFqXJrhIJmjCbra DUCCtWnzw1DjVagzGTE0Svxvm33twIYUFUxek9PLhcmTVMN61QmdhyG9SOerCt7WXB7A 0IViFoTdd+VoarzapM0cQsg23q+DGq2j1W3h+4N1Uw3wsUp1SEOoLYkC7UQLCNRiRIk/ k0Z26gZmllvUVzaBVANsolh/1/L8OhT01CDUJyDHjmVO1JgHI9SrN1CSGoTjz5WjPQdp pqTw== 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=MxAmjxEEUc+Ra/nArc5MB1jw2C4Q09jWKYpB+gvGQOGzz9Ue3sB0X2UnunDtvCKFIe w7jz22GwDoexI6+Bj36wjrArQfj9mC7CATKsI7hWoVyJF74WdEGkSVYdgBsGZ1Neb86w b/wFkmLhBwNS0ITJBpOuWLhjaFbckHv+B67of27euz10/WFuFo27QR0FESAXi4XWKM34 uDo6sjA7GjYuwTxb5NV2xSjk3Am12aMNzn5tDKIYw+gdgo+IQHmCOY50Seb9kV5tOeMp jraEJGcseTPOyDQBcfIUCDUbocOHjFX5EJJOdWfsWhhEm3kjaW3IAZ5EGMEto/U/YHQc TM+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nojPuiJu; 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 t71-v6si879370pfi.221.2018.08.28.05.33.17; Tue, 28 Aug 2018 05:33:17 -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=nojPuiJu; 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 S1727312AbeH1QYn (ORCPT + 6 others); Tue, 28 Aug 2018 12:24:43 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:42876 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbeH1QYm (ORCPT ); Tue, 28 Aug 2018 12:24:42 -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 w7SCWlwN066683; Tue, 28 Aug 2018 07:32:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1535459567; bh=vLXnr8l/BDKBJnxItklTJCoQ7PJGWAoA21dhsacLKVU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nojPuiJu23VvHpzQI20fjLlY5P6xdU0cRcrmvEYjH3GCLKb8TrV57eTLgfzqgZebx kmFbCDp96ZSz7O1kTIrabYqgURUzIflAyG4PFIVKeFQ1rVnYiC+70teQT4IC1PZDOu 1Om1wer5KmMRHYSvdajNspiapNufRPKmNZcldCOY= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w7SCWluC011784; Tue, 28 Aug 2018 07:32:47 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 28 Aug 2018 07:32:46 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 28 Aug 2018 07:32:46 -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 w7SCWaPu018414; Tue, 28 Aug 2018 07:32:44 -0500 From: Tero Kristo To: , , , , CC: , Subject: [PATCH 3/7] ARM: dts: add support for individual build flags for DT subdirs Date: Tue, 28 Aug 2018 15:32:08 +0300 Message-ID: <1535459532-17211-4-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535459532-17211-1-git-send-email-t-kristo@ti.com> References: <1535459532-17211-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