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 From patchwork Tue Jan 5 11:24:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 356824 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp15724737jai; Tue, 5 Jan 2021 03:26:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyi3b/tT9H8yhPCwvZOhFUHuBeGd03nooesgejRl6y7t1BDa2XzL9S7TH7Wd/htVQbHHDnE X-Received: by 2002:a17:906:229a:: with SMTP id p26mr70305814eja.291.1609845994261; Tue, 05 Jan 2021 03:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609845994; cv=none; d=google.com; s=arc-20160816; b=e1s1KFlI7NDQ+/QGc3mFZtbBRiJw71ub8l0aIh3ZqpBaOgvg/Wugae8CbX2jQQrAjN GE46baSYOOwHt1MeMqvGOuOFDaUFu7A2XNX5l5cEbsjyC7FW1vORSTVvOhBzHzg5LdR+ MfLaWPc/7viLvfErxIEs5fAKMzTtuuGnwweYeaelqoLkXY9ke2Agc36vI91/W5UIHfV+ kkxg/wCuY9oTpTOdmqxQfE7G9QKnNYXy6C9tz6L5JxomAfEZR6xRzHZ/MbUrKZA4pS69 3QZLfkjt6S7p/VSBd5nCRxv3N1qQxxXX5FTu8mEnk7/wHlXWL0utSUzaBNwlEbB7cBlS bnVQ== 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=RLWf2fFx1cy5EK+fZBXuAuxCvBkN0R7iJP0DH7tZe9g=; b=SsZGlVQgHM27Z/JMOzqrFWlbiCH3+zS9q2dbGGyOG6fRWzIZT6b7lKISpwwiVZx9e/ 0KeryTGxKrnnz3kKkN2WpZom6U9LVEjvFWnAKoqGSzxSMQXBEzq++IBgDSAWZiFzAHwy zGPCSs5Qt2Lv3oEpvy0BnzzAr0k7F4OARnY9uj2TZm2zb1edcTTNbn4SvCc9DFBD5Pz8 qPMkfbTZvaOUUx4w1mYWdzhxAeG+arKSDzXY8q6O/6aVEHBaPVO775W4/TWkW4uKEJuA FRjPM+cvc2Uwg9oJW1yMlgTYRfD2/DbjL7vhj3F9vkreXasWhY72KyP7GdwvCcRw5ID5 M5VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zetW+zTj; 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.34; Tue, 05 Jan 2021 03:26:34 -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=zetW+zTj; 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 S1729514AbhAELZy (ORCPT + 6 others); Tue, 5 Jan 2021 06:25:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbhAELZx (ORCPT ); Tue, 5 Jan 2021 06:25:53 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F99DC06179F for ; Tue, 5 Jan 2021 03:24:37 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id v3so16182946plz.13 for ; Tue, 05 Jan 2021 03:24:37 -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=RLWf2fFx1cy5EK+fZBXuAuxCvBkN0R7iJP0DH7tZe9g=; b=zetW+zTjdJu12fd74lr5e4RRjfbmu8PI4SolhsR42pguy3d5gX/TVL0c8ZQ/idamFj PFgv8cHzrOElJ/nz92E/bV4qYnvaBbHhi9aEky1qJTfxnjTVYtU0qJai53aiF4AsGVuB f91DJvfGVaOfRgey9kMWdVOPU7uPocSLIUShslcHpfCu42LGi5HBQFi55nDPEV3atZE4 lCACEuFpsC24iNgT2E5rPJPCnnMVeslzwpaklNKYLz8/wBi7/Ftb+X26WLP5EgMoqclt YH23CreRWMe/6ZA0EkZyLYYDo1I+5n49xDWw4/7JdyndjJDJ5kpNbtwJhzbROcnTgU2l Ix8w== 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=RLWf2fFx1cy5EK+fZBXuAuxCvBkN0R7iJP0DH7tZe9g=; b=GCtgCVw/VbqHlkQzoO9MPTsLDTcC4thS0LybmkI3OkEeZj0k3x3z7xXHackwIiN2Lw 3R39+yV8aSEYC5Oe27N+6CxTeQC0fqk1zvWNSst9Q0jT2xaxkLn7LCffrhuih0M1gpdX mRNFXFjlhNit4GEIYVBY7PTgGHoF0YnhZwhBmkShyZhrOxOhMbCr0macfWcri/gLXREP fJdni1cVk+cG5hmRZMPEZ/Fe4fSBkqGtHwOWrDv0Mb3oIY73dijbpqQEViHWkSjYu4E5 2YZ30lOYx3SqgZ55ldhdyD1yO3L6VhCgHFCk9lpn1TcksxtXLQKHhtr3a0MCMbX31hzo O5Tg== X-Gm-Message-State: AOAM5318ASWdXN4E7+fLQSAkkHTIVB4T64boFqJojDtDBGoLPbNQ3O8l AjQCNalWXVQyNzXc0uU8IBYX6w== X-Received: by 2002:a17:902:a983:b029:dc:2564:91f2 with SMTP id bh3-20020a170902a983b02900dc256491f2mr48248465plb.46.1609845877204; Tue, 05 Jan 2021 03:24:37 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id o123sm56762264pfd.197.2021.01.05.03.24.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2021 03:24:36 -0800 (PST) From: Viresh Kumar To: Pantelis Antoniou , Frank Rowand , Rob Herring 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 2/2] scripts: dtc: Handle outform dtbo Date: Tue, 5 Jan 2021 16:54:17 +0530 Message-Id: <7aa70809eff3f32d821761d2a763e4fb72ecc8fb.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 Update dtc compiler to accept dtbo as an outform. Signed-off-by: Viresh Kumar --- I feel that this needs to go directly to https://git.kernel.org/pub/scm/utils/dtc/dtc.git Right ? I will send it separately if the idea is accepted here. --- scripts/dtc/dtc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c index bdb3f5945699..40fa7128b3d6 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -357,6 +357,8 @@ int main(int argc, char *argv[]) #endif } else if (streq(outform, "dtb")) { dt_to_blob(outf, dti, outversion); + } else if (streq(outform, "dtbo")) { + dt_to_blob(outf, dti, outversion); } else if (streq(outform, "asm")) { dt_to_asm(outf, dti, outversion); } else if (streq(outform, "null")) {