From patchwork Wed Sep 7 23:03:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Walker (danielwa)" X-Patchwork-Id: 12969434 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DF43C38145 for ; Wed, 7 Sep 2022 23:04:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbiIGXEt (ORCPT ); Wed, 7 Sep 2022 19:04:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbiIGXEq (ORCPT ); Wed, 7 Sep 2022 19:04:46 -0400 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 07 Sep 2022 16:04:45 PDT Received: from alln-iport-2.cisco.com (alln-iport-2.cisco.com [173.37.142.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EB892A95E for ; Wed, 7 Sep 2022 16:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1445; q=dns/txt; s=iport; t=1662591885; x=1663801485; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SLlPm/SYAr6MHV57O37iy4qpo4ZJe+PXVGQYATH7WfQ=; b=Q7bowQ8vh6t39ceJwWZjSbrwfO8yXtZ4ylAIqtNLBj941FgWc6sAFgcP HIJ9Gk6sJvH8hXBGilKumEKzu6Imc56h/eGmUVoCBnPdw2v/nGojF6IZL Y6OuVTKA7ZgXwN1MWfO1KsoOek/INbI0xWsfWqoIfS8ULflyR2pbOb253 E=; X-IPAS-Result: A0ATAACWIhljmJRdJa1aH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/x1iWgLFW0smm9oasx/niWzwFr1rXpGMTad8bMRshPmEuc4 GXc8AzRBhAcKczayjCY83agrvHAkDm9W48IErC8sPlwjzW7wGAeExQLUV26rOOiokG5XN1bJ gof/S9Gha0z/0yiSp/5XBi8iHuNpB0bRdsWFeAmgCmIw7Hd4weDAXksTTNbbtEi8sgsSlQXO kShhdjlA3lkt6eYDCvHsLyVtji1fyMSKAfueBPoUyMkzsb4jotogSmUDfBdIouJgfryEHbZl mXiQDcFu50fissC1qOe9F/Bgi6xqpWhcuLTzliMNo5Cxl4kDLNJd7BE+nCAt6ccc9zxok2p+ SlaxJDEs4jiGLnXzESwrPMx8KZFDhpvGAfdil5mBZU68DLFF5WLIt0IsGgWyKuEzq85ldLBe kTfv0Za44VeeSLwK6R2eIm2Tc8tyMAM9OgJtNiJP7KigbAoJGdrGR2Cg2bLhQgBd2B3yskC1 W+zK5rEMJrjIf0PIMCKb+kcy6Q34Ss12HneQ5v2pzz+j+TEOSHIFexebgrRBgzc0E9iiFiFm zq4H5baoyizrMWiCsUq2ddJdAtTfSRT6W7e8pALJoZv3TaK6El4W6OOntvNiqRunr9eka/T7 2qhV0pDoGcTdlWZQThmnktLMeu1Nb4m9CpTFXV1bT6AhSN5Ca7xt/h3SnfCVeR9nACV5aQqH 6BtlgTpKqkndwkrDBxENcal99Y8JEzw7e9MVgL8CAUCk1dbb1Sh0rfZksHHrUHi0gLfWRMCn oCd IronPort-HdrOrdr: A9a23:zoR4z62zwW9dUMbJFWxypgqjBL0kLtp133Aq2lEZdPWaSKClfq eV7ZYmPHDP5gr5NEtLpTniAtjifZqjz/9ICOAqVN/IYOCMggSVxe9ZgLcK6geQfhEWjtQ86U +lGJIOb+EZyjNB/KLH3DU= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="5.93,298,1654560000"; d="scan'208";a="934725774" Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 07 Sep 2022 23:03:41 +0000 Received: from localhost.localdomain ([10.25.130.54]) by rcdn-core-12.cisco.com (8.15.2/8.15.2) with ESMTP id 287N3deT010146; Wed, 7 Sep 2022 23:03:39 GMT From: Daniel Walker To: Masahiro Yamada , Michal Marek , Nick Desaulniers Cc: xe-linux-external@cisco.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC-PATCH] Makefile: dts: include directory makefile for DTC_FLAGS Date: Wed, 7 Sep 2022 16:03:38 -0700 Message-Id: <20220907230339.271633-1-danielwa@cisco.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.25.130.54, [10.25.130.54] X-Outbound-Node: rcdn-core-12.cisco.com Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The current Makefile will drop the DTC_FLAGS depending on how you build. For example, make dtbs includes correct DTC_FLAGS. However if you run, make nvidia/tegra210-p2371-2180.dtb The DTC_FLAGS are dropped. This appears to be caused by the top level Makefile not including the Makefile from the directory where the dts lives. This normally doesn't matter because most dts files have nothing added from the Makefile. This changes when you have overlays, and the DTC_FLAGS modifier is mandatory for the dtb to work correctly. This change adds a -f argument which includes the Makefile from the directory where the dts file reside. This change is also required for dtbo files. Cc: xe-linux-external@cisco.com Signed-off-by: Daniel Walker --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ac16bd92b156..bc245e2dc8d1 100644 --- a/Makefile +++ b/Makefile @@ -1460,10 +1460,10 @@ endif ifneq ($(dtstree),) %.dtb: dtbs_prepare - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + $(Q)$(MAKE) -f $(srctree)/$(dtstree)/$(dir $@)Makefile $(build)=$(dtstree) $(dtstree)/$@ %.dtbo: dtbs_prepare - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + $(Q)$(MAKE) -f $(srctree)/$(dtstree)/$(dir $@)Makefile $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_prepare dtbs_install dtbs_check dtbs: dtbs_prepare