From patchwork Fri Jan 22 10:50:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 368621 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1446926jam; Fri, 22 Jan 2021 04:02:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxfbDFW1X9+JIjfi6lO0+3l95+MPhcJY/mRjmg3JhmkCDpQ5piy7Uf/rjX8yd9l7E/V4Bo7 X-Received: by 2002:aa7:d1d4:: with SMTP id g20mr2958488edp.244.1611316939335; Fri, 22 Jan 2021 04:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611316939; cv=none; d=google.com; s=arc-20160816; b=K3rxDZ73fd0C8IsmTrRCC+opvM2mZdYS2CDC6D/1+sWZ1l5Fpl0SJrkkaAvNBHsAT4 pqYcj665KkCvkZiP3/kw4mjANDa54+en3I7kS+QIkwNi9rGrdeonGzYro7kJVAUPMimp TZD+tSXrkwsLb2N9BuKRjRBLK/ZOzP6c7xXyGVznDcccZYftJywR2tKqHJZ+CXsHtxCw icfPKL1R0BbTQsl+FGcvrTbSAvzJMqchnfspee0AySlyG4+DhrWmhIOAO3VroiePzpQS G7IMWtO0y+jU5wvtHTLStXZLvUPSw6uQfMl1pV086AbBwc57VpRArNYn0pK3ZbURu++p 0iXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iEpV/4+pPDDR7a+hsqu9AsNuEUO5TQBQt3UbF56LflA=; b=IKwp645lsl6RIF8QrxHK6yGOOB6DY/xsBex5DhkxgomFsNeDtU+N1ebhNBrkrPdv3t x+4m9MK+dzMlg4dqtcxqmC4j0J0Iau1QPoJDHeESOdTh1QLrad0VyOHzr8ziuZyxfhiJ HwEe2snMGAqrXkXN2TZKO2TwC2vX706zsQfeOdRBiKW1UVNMrLAYhGmaHGHIpHRL2LhC kJMpOTtByjwcCRylMrhdKEAcVtO3dy9ZPnrWef0HtK64NesJdVMNel4Ken83aotuasLn hwNpCjgU9vvtDkeHLrPf+mJU7Pzbei3sWoJay8JreXFAp1EADgp4ijTDKBsp5h9EgZQu 9abw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sWrdcTSn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si3400048edv.345.2021.01.22.04.02.19; Fri, 22 Jan 2021 04:02:19 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sWrdcTSn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727214AbhAVKzP (ORCPT + 6 others); Fri, 22 Jan 2021 05:55:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727534AbhAVKvw (ORCPT ); Fri, 22 Jan 2021 05:51:52 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37D2CC061353 for ; Fri, 22 Jan 2021 02:51:12 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id q131so3428668pfq.10 for ; Fri, 22 Jan 2021 02:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iEpV/4+pPDDR7a+hsqu9AsNuEUO5TQBQt3UbF56LflA=; b=sWrdcTSnHVrF0YS3uSKW5LnuC2iM1fGJiNkwUttGPC/iUUJAzwXFSK30L021dMW0Ln rqMIezwKbS6JOB/M9tubz10ho2rkxROjRNE389vJj7O2PCiOuSUA1DfkFlVdxDUnuDDP G8tsiGJbg5juhzroZNh6fpkWwhfd/lOG4ehUPP7aAJM0ufxw5Ky0X2xbB/HX/RTff2eU JUoBv9vWOSLFymqxrikuOCC9GmXh2z3znGreXaq1vNF7vhr+/VsLZuyKd3IF1/Oa2vyD iLWST9xr/2ayhnAOwpBih07yAuZNz+q3/fGEJDHKYL4MXNUvRS0MLaPXx2//t9HEexvl lzcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iEpV/4+pPDDR7a+hsqu9AsNuEUO5TQBQt3UbF56LflA=; b=hqt9hNqhZQs0ISd4JDlY7TtPm9qQWCK+Pb6of0r8OxPj/n9h3qW0eOmn+TPXc9GJOP cR1Pza/ouvivvbvJ6G8rbmOQl0jepWN7ph0bcQ2OeCPNGsQLNSakvb782pTdKjEpW0r3 IhUbhUav59nrOOEL7i/TXi29D5arGsv3CAU6clkvJI0ZQB51Xjhm2q1tl+oHiltFV8lT EoNh0A/tP3nLrDefsyyc7xKNesWI0m+PpU1W473P2Q72FS9EEYGFlroNSDQRd7Hth1YT +3Js2lLBQjvUCPe4BZajj28tLBOhhsacmcDpYIuE1klv8rbO1nk9tl4WPLXlblhs+lzI ebfw== X-Gm-Message-State: AOAM531yPf1R5g7RNqt0iP4Vj9t7fQvElacfaHDB+E2BcqO3go4RHiE8 qxAvZFb0PfTj6eTU/JMQFtDh7g== X-Received: by 2002:a63:405:: with SMTP id 5mr4182014pge.44.1611312671691; Fri, 22 Jan 2021 02:51:11 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id m27sm8210751pgn.62.2021.01.22.02.51.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 02:51:11 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou , Masahiro Yamada , Michal Marek Cc: Viresh Kumar , Vincent Guittot , linux-kernel@vger.kernel.org, anmar.oueja@linaro.org, Bill Mills , David Gibson , devicetree@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH V6 4/6] kbuild: Add support to build overlays (%.dtbo) Date: Fri, 22 Jan 2021 16:20:34 +0530 Message-Id: <43d693de2034dd30bb7d4576ffb52207ca220079.1611312122.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support for building DT overlays (%.dtbo). The overlay's source file will have the usual extension, i.e. .dts, though the blob will have .dtbo extension to distinguish it from normal blobs. Signed-off-by: Viresh Kumar --- .gitignore | 1 + Makefile | 5 ++++- scripts/Makefile.dtbinst | 3 +++ scripts/Makefile.lib | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) -- 2.25.0.rc1.19.g042ed3e048af Acked-by: Masahiro Yamada diff --git a/.gitignore b/.gitignore index d01cda8e1177..bb65fa253e58 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ *.c.[012]*.* *.dt.yaml *.dtb +*.dtbo *.dtb.S *.dwo *.elf diff --git a/Makefile b/Makefile index 9e73f82e0d86..18fd02f55d9b 100644 --- a/Makefile +++ b/Makefile @@ -1337,6 +1337,9 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ +%.dtbo: include/config/kernel.release scripts_dtc + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + PHONY += dtbs dtbs_install dtbs_check dtbs: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) @@ -1816,7 +1819,7 @@ clean: $(clean-dirs) @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ \( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '*.ko.*' \ - -o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \ + -o -name '*.dtb' -o -name '*.dtbo' -o -name '*.dtb.S' -o -name '*.dt.yaml' \ -o -name '*.dwo' -o -name '*.lst' \ -o -name '*.su' -o -name '*.mod' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst index 50d580d77ae9..ba01f5ba2517 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst @@ -29,6 +29,9 @@ quiet_cmd_dtb_install = INSTALL $@ $(dst)/%.dtb: $(obj)/%.dtb $(call cmd,dtb_install) +$(dst)/%.dtbo: $(obj)/%.dtbo + $(call cmd,dtb_install) + PHONY += $(subdirs) $(subdirs): $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 213677a5ed33..b00855b247e0 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -86,7 +86,9 @@ extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-) ifneq ($(CHECK_DTBS),) extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y)) +extra-y += $(patsubst %.dtbo,%.dt.yaml, $(dtb-y)) extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-)) +extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtb-)) endif # Add subdir path @@ -327,6 +329,9 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; $(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE $(call if_changed_dep,dtc) +$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE + $(call if_changed_dep,dtc) + DT_CHECKER ?= dt-validate DT_BINDING_DIR := Documentation/devicetree/bindings # DT_TMP_SCHEMA may be overridden from Documentation/devicetree/bindings/Makefile