From patchwork Tue Jan 5 11:24:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 356823 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp15724727jai; Tue, 5 Jan 2021 03:26:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsR0Nr3rLOekxWSKK4Eh7coA4bX6WeGz+CcUL51SGTLzuAe3ejCshJhjnAJR8hyiIT3Q7i X-Received: by 2002:a17:906:94d4:: with SMTP id d20mr69798466ejy.475.1609845993007; Tue, 05 Jan 2021 03:26:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609845993; cv=none; d=google.com; s=arc-20160816; b=fVanTyjXpTdlhvpEddiZaqv35U8I9FEOPb9jZAG3zZbRQKCoT81eIskGc+eU2o0bm3 zTx9GQsvPG75eSvtoy75ZJIpgjw1l4ttmRPWBlMl4k/KwqhR5v4WluZlsIO0DXmumllU rQRJIziHyQLAewo7fTM0oaRvBrcLXZQpqql+zmVyIAaV9TBZNMCe/fg15XhB4B7xOV36 wqDM3vD8uNq1E1FQT09KifvkXY4K0vxa0jUBcVkGaGZHIs5cNQgIPP25tVFYt9aLGCA9 ryWxPOHmdNDokjTIHBx583LIamvirdNyt9WEjjph8PLIV9JMYDbdMX01qiLS+sSTEReT LlkQ== 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=7+ltXAUjJoz14b04u4WjYIwfhaMvBRudeWXKWbcBneE=; b=yPVP2t6tWL6phjQhp6ISCz9kL3Y4m/vNiCCm3diPEdvbRPYbkjkxTMp0hqlDsHjVvm xZqrc26rlBo+xHL5gTuodWhlpuo3x/oVN0R3JI24YV6CKBlpKFyTErL7gofLX7evMp4O JaOs/jElK4Igc3EGbVcPkV83sQic4CktvrHKt9wQ1Dal8S0gS+VQqhq1eKIwIh15vZiZ My6wOxdy5WQPdeQNC9rkVFSkVyRO8sGsrsqYgRPI5Bj4dOwFDD6xNV+hLAH9EfbZ45o5 h14srGFvdAT7Vk4CVrYrHa8QopKTbzado4iDaGZNPyio4yPvTOXeZUfoJuZgVMdEXtcz fGfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p6O4ofi1; 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 l26si33373679edv.316.2021.01.05.03.26.32; Tue, 05 Jan 2021 03:26:33 -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=p6O4ofi1; 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 S1729163AbhAELZy (ORCPT + 6 others); Tue, 5 Jan 2021 06:25:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbhAELZx (ORCPT ); Tue, 5 Jan 2021 06:25:53 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69229C061798 for ; Tue, 5 Jan 2021 03:24:34 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id p18so21071629pgm.11 for ; Tue, 05 Jan 2021 03:24:34 -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=7+ltXAUjJoz14b04u4WjYIwfhaMvBRudeWXKWbcBneE=; b=p6O4ofi1uYIO+ua5FiO+ty++Q3FvaqIC+dYof2D5w1bew03YrS1JPn/3lhZl8TmJm5 B6uEWgVf18P1VhBvXtgQyWi/2yjfGq4Ag8gFvTLTuB5ooCyPd4hb23E6NhvrHvRzx5Xn meiXcEYeZqa9cbYkS07A4RsOlLWe1iEu6ohae6jTj9B38DEoM/OqgnZJEVGBwxjxgZni ApeKb8Kf1r8ytldxm/ieId3qyOCeikTnhJwtNZfmQ13VmhpjwBP4tTOEiQAturMDUzJG ZbJp8J4wsdmMBW/iqVAdOOK1ZoFp7q4Rse59Psnr981L7DakvNK6ozhMRHd1DW8W2fRP NfCA== 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=7+ltXAUjJoz14b04u4WjYIwfhaMvBRudeWXKWbcBneE=; b=T2sOp6W9miYNt61EhaucAU/xMlvU4bOPZRjnAGDrSkUw3B3xoi4PGha8gwpV6z6X2c vAPKWxYJUpHeYPhSFeuS4sh8auXtzhChM1mR53bga1rKASvM4DzdJ4vMUMN+gG6an/ut 8OWPM6cX6JAhPvzkPgJ/L4Icp1kDTTbqPEOqSD+6HxpBZ6ZHZhgabBCG7TrXBqwJ2VSW 4RCRX2nDidIL/7s6TkpTXCSpaMCNJfrxlItzJnoJ/WD5KI0lNDhneJ50XBwbN8BExC34 u4A+KdKRHB1JOtwpjuyIvS8r5/0SFXeBGlWgVJI0yxQSV9zM7+q8eFkk+01rtRG1pSTP 0yiA== X-Gm-Message-State: AOAM531y2FW5qWZkBMVcwt0LI7J76a06RRcjT2rYGr5r+z6YXgvOPeO8 Py40sIrGhIRhIS88x3IzCFvrpQ== X-Received: by 2002:aa7:8647:0:b029:1ad:c67c:3796 with SMTP id a7-20020aa786470000b02901adc67c3796mr58844824pfo.43.1609845873987; Tue, 05 Jan 2021 03:24:33 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id q35sm2545089pjh.38.2021.01.05.03.24.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2021 03:24:33 -0800 (PST) From: Viresh Kumar To: Pantelis Antoniou , Frank Rowand , Rob Herring , Masahiro Yamada , Michal Marek Cc: Viresh Kumar , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Vincent Guittot , Bill Mills , tero.kristo@gmail.com Subject: [RFC 1/2] kbuild: Add support to build overlays (%.dtbo) Date: Tue, 5 Jan 2021 16:54:16 +0530 Message-Id: <317735e32a8ec3db935a375584aa420fe89124cc.1609844956.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 --- Makefile | 4 ++-- scripts/Makefile.lib | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/Makefile b/Makefile index 3d328b7ab200..54cdcdfea67b 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.lib b/scripts/Makefile.lib index 213677a5ed33..f70d7bd3262a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -82,11 +82,15 @@ always-y += $(userprogs-always-y) $(userprogs-always-m) # DTB # If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built extra-y += $(dtb-y) +extra-y += $(dtbo-y) extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-) +extra-$(CONFIG_OF_ALL_DTBS) += $(dtbo-) ifneq ($(CHECK_DTBS),) extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y)) +extra-y += $(patsubst %.dtbo,%.dt.yaml, $(dtbo-y)) extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-)) +extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtbo-)) endif # Add subdir path @@ -299,6 +303,11 @@ endif DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) +# enable creation of __symbols__ node +ifneq ($(dtbo-y),) +DTC_FLAGS += -@ +endif + # Generate an assembly file to wrap the output of the device tree compiler quiet_cmd_dt_S_dtb= DTB $@ cmd_dt_S_dtb= \ @@ -327,6 +336,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