From patchwork Wed Jan 20 07:06:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366963 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204467jam; Tue, 19 Jan 2021 23:09:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwznsacEdcNyWbvjWJXcQwAXEc/VH4cHeqew9vbfzHGG6ixolGohnGY9T3qZKGwoSi2zrFi X-Received: by 2002:a05:6402:1e5:: with SMTP id i5mr6491371edy.86.1611126592573; Tue, 19 Jan 2021 23:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126592; cv=none; d=google.com; s=arc-20160816; b=xsaARDybEWyB+H5lZpe1oL5d+7kChPLECCtInpvykHB/kazFIzNViOCOpfYqhEhPLz wNY4r24opc6+uV4AQ/IzxZUv7c5LbOYPLLobs+IvwfbD1tnThLPrR1/pWww0VvgqaOac DpdUCblMoROaj8BFHYFswxdDj4mYNOTSgi97ry2AcbNvmDaQ2zcr+takna/2QKa0qG1s x+e6aXg5zT+YtUp8N2tkzphQnwxdYPOFziHxGeJnaUBwGi3F8eDFejRM0Tueth81x0fx 8WihR7OozornYbf1MlOx2kLGWfRb461GF324cqj1D+GG9uELv5WavMOTfiKcPV8G3xPP AnZw== 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=iL/6d9CA7Mlv7x2jkzmEch3eouj1dsWSO4tRpX3owdI=; b=LkTjsHaUICwFa8aksdESVqpH4him9rTkEgQZ3fvu0r7pldGCe6xW1nZkSNnTGzCrzz tY19NZvE418lPBtTviBfx75viVafvcqF0t1iVi3vdK2QuIOQMnRe/2E8pLSzYdXwXoWx lSQTbhGDLoj4HXrotpwImWqkyL/lQFzgC9OeMQ2FPgUtEabKGRW9LnkV8LgPIfhsWqIh m4/RVbD3JNU5IUfrazM91KIW7PPx/5wFjbS4lihRGKnfQQTzip8cZh088rthOlpValHh F+kopIUXl5LM6LigH+53CxCHrjgqgdDI09df08eWh0jm8tC5utFiO1mZhtOhDi/m5KJY 1cpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u1UT6UUP; 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 hh2si401429ejb.627.2021.01.19.23.09.52; Tue, 19 Jan 2021 23:09:52 -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=u1UT6UUP; 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 S1728329AbhATHJU (ORCPT + 6 others); Wed, 20 Jan 2021 02:09:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbhATHJI (ORCPT ); Wed, 20 Jan 2021 02:09:08 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4233C061798 for ; Tue, 19 Jan 2021 23:07:52 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id g3so12024074plp.2 for ; Tue, 19 Jan 2021 23:07:52 -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=iL/6d9CA7Mlv7x2jkzmEch3eouj1dsWSO4tRpX3owdI=; b=u1UT6UUP4J+geMR4J7VLUSlL515tanP+PW1crkyEINjzX5/U3FJzPMKlUMsTMjThHO yWZk+i6yCayN7NPcNHMu4P0+cwmsyZFtLwDowjkd5ithO7yx+Eu6CbG2p2piMVrS5nzm 3JCzF9hhmZjRGnO06w0MtjKB4YIu2+P6Am73hcYmfAOsNkLgOPPFOMv47v09X2w+HH0X An2R6fdSe05RuPnYI1xYwUjhpKqdBfkm0zFWONQU3bnmcdKOqmPgRgHkCnaZm2p1ewoy ADIm3Io4b5TI+2Mx7eqjZlFU8AZ1PZcr1eJd6NOIGn7xMgBY+3zV4O6zSN9OV0xcIGLV NpvA== 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=iL/6d9CA7Mlv7x2jkzmEch3eouj1dsWSO4tRpX3owdI=; b=JiS2qYqgxsppF3nKckBXWlK3lX7ksniiiByzcY1IoEYMAeb/9vNVtz8xdwo1gIGHo7 B9dDiFjgbWWDiBaWdKICtOKWjC2EaWG8utIfP2A63sZgL1Os0tI+0rdjbpaYxXxsYhn+ 9maD2EMNZeATANMN+cBQFfxulA+/4I0NZykXotDmIIk/74dINl8pklhYdCbVoY5CgLJ/ 0iK750hJaD73kj88aKCj1sqlddKyLyshxzy97Ac24ZS6i0/unBzz8GEzxw8Y25CDzUGC bPjLEhfhc1n7fbf8TgTooou1wyuN0XtAJvQRIqQB9KRxOiW43mTpEi/j25cI3XWaPCQY 7/Bg== X-Gm-Message-State: AOAM530GFZ4eJjFW/u87uOQkc9/nihWw0VBrdkGKz27z7MKfn3vgobSA 4AwQigvsRaIujeP1BUDeyKnxqQ== X-Received: by 2002:a17:90a:9918:: with SMTP id b24mr4135202pjp.108.1611126472151; Tue, 19 Jan 2021 23:07:52 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id u12sm1098882pgi.91.2021.01.19.23.07.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:51 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou , Masahiro Yamada , Michal Marek Cc: Viresh Kumar , Vincent Guittot , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson , Bill Mills , anmar.oueja@linaro.org, linux-kbuild@vger.kernel.org Subject: [PATCH V5 4/5] kbuild: Add support to build overlays (%.dtbo) Date: Wed, 20 Jan 2021 12:36:46 +0530 Message-Id: <6e57e9c84429416c628f1f4235c42a5809747c4c.1611124778.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 | 3 +-- Makefile | 4 ++-- scripts/Makefile.dtbinst | 3 +++ scripts/Makefile.lib | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/.gitignore b/.gitignore index d01cda8e1177..0458c36f3cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,7 @@ *.bz2 *.c.[012]*.* *.dt.yaml -*.dtb -*.dtb.S +*.dtb* *.dwo *.elf *.gcno diff --git a/Makefile b/Makefile index 9e73f82e0d86..b84f5e0b46ab 100644 --- a/Makefile +++ b/Makefile @@ -1334,7 +1334,7 @@ endif ifneq ($(dtstree),) -%.dtb: include/config/kernel.release scripts_dtc +%.dtb %.dtbo: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_install dtbs_check @@ -1816,7 +1816,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..30bc0a8e0087 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 @@ -324,7 +326,7 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE +$(obj)/%.dtb $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE $(call if_changed_dep,dtc) DT_CHECKER ?= dt-validate