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: 11998665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EB0EC433E0 for ; Tue, 5 Jan 2021 11:25:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2B4A22262 for ; Tue, 5 Jan 2021 11:25:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729501AbhAELZT (ORCPT ); Tue, 5 Jan 2021 06:25:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729161AbhAELZO (ORCPT ); Tue, 5 Jan 2021 06:25:14 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 685BBC061795 for ; Tue, 5 Jan 2021 03:24:34 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id a188so5527068pfa.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=Kdj2A+a23ohmZXUlmGrH3P2355ahQe0NjxHf2m9NcLby61iwRccSLLfHEbyM1nIV4a k28cmBE9XUB8GJLFfUmMUaElmX1Yr4umks6HpjMa40bCfqQns8+t5kc2SXflrX+C/Lx4 2Ngz8WlkRs0wmzjnL8/nLhF+rq3CAjOrFUjoYoEXprklyg6e8azwmV1wRnJ/ds0mO5FJ 7nr3j7mTjmXKrsPPP5WHPMR9gkCYtN4+1gh3sxtbQ6hzIIJFqdCNdYr8Bhzg/1c7jE2r WBF6cgciHgOGPDeMU9b+RdleQAVUOum2Y5sdGMEhe6NHLj6a0HVbJoC53GpyitxF2bem qerA== X-Gm-Message-State: AOAM531fwgaD8FmoTu//vSynAvPJrgRBgkmc2taIg9+Y2nIWQL3iG9cB /aJ4TADbwpZQKwBuGR8RegvVRFZIVhev2w== X-Google-Smtp-Source: ABdhPJyP0+fnCNVWjX9rMocIDdoOBf7iok8wHhTh8Pg2QQWh21tcUx8v3uh7bvzMRMswZs8tdUIXJg== 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: linux-kbuild@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(-) 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: 11998667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4DFAC433DB for ; Tue, 5 Jan 2021 11:25:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D50422262 for ; Tue, 5 Jan 2021 11:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727146AbhAELZx (ORCPT ); Tue, 5 Jan 2021 06:25:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbhAELZx (ORCPT ); Tue, 5 Jan 2021 06:25:53 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98722C06179A for ; Tue, 5 Jan 2021 03:24:37 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id be12so16215316plb.4 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=GHqhatK1aXa0QkEKE/SYMnOMJSa9XvDzBkvffLPIjwTMz1tJS3aQII8YTb980FZEOv q9Y1CBsUei0d1capUM3Q7N7TIAOYl7inOUKpOZlLCLJnoBJGnBAxf+8MeKY4T6hpxTcN oJeY/u9es3NISuXt54ahyIg5QG/dG/wa5cTrxR/G4GuIBYb/zPK2eMw3dZE3xx5J2Ug0 KnKne8aeoDR6L2YtCaQlJH5gaRhT0kNT8qw+EWPwRRLmYmWdjKtPa+pcjVXCeTzC9sVG AvedTfVZQITItfKb76MvBZMyMJuq/qwe7WuZNx1fUHrwJZLvkYE6qVT2iSt7L4kIEVY3 ilsA== X-Gm-Message-State: AOAM530k3ocJfULMx3vCjnqKliY3Lq0Bh9skqTPhsv3TIUUPS+vTq0qe OoAb7RFSHyR+pxk+X3uh2PPdPw== X-Google-Smtp-Source: ABdhPJw02OCUGTpHRRYI2C9tQQQ1oADxysvci8SMJAXynHIlon/KDN7jgwDeIiAm+9EiUJJd9FHzQA== 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: linux-kbuild@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(+) 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")) {