From patchwork Tue Aug 22 17:40:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 715777 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp393239wrp; Tue, 22 Aug 2023 10:42:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSFhvnGmI6WikcNVobZ/twyuRTygUoFdrJePe97ZYNQsMGi3CMBBhSRpr30F1nowbYE+2y X-Received: by 2002:a05:600c:b42:b0:3fe:1871:1826 with SMTP id k2-20020a05600c0b4200b003fe18711826mr7876694wmr.27.1692726150427; Tue, 22 Aug 2023 10:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692726150; cv=none; d=google.com; s=arc-20160816; b=IW+W8hAFjY+qe2batWUSB1RQQm2iGqriUGWZnQZ9EWgYuA8QtniKXPqd4oClNL14Fn vPSzm+yPYpNUaCKTY7NaNJxVtbB6i1+YIAwqai08KyKCpX/PwNsqKHLOHXMeGTECNnhq q5RYPoz1162kO44Qkmnj4mSTt9B7E/+nb+hcxPdxSmeIMK0pmmoO9nYJQIvVgWBQz8Tp Uv2Mw7ZuuWSS4LPvSWX67hWB2MOQUr0Ko+aw8E0Tag3HXpZdB97PCpkg6TZsaWsoWdtL zOuQM0qBzPVuDzWlQd4r+Vv/+a5FEvSlU4aj4d49f3QU/ABsTysLzpbIiLIl8rI1FLad idjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=JwpLcZlA3lGUAQCkrgp2jPHOKikdarVhnAIEvgxOmD8=; fh=ikJSK2WVWLZPtKfyjzYjMbDKcRMYT5CY2x/iGdlGnWY=; b=Duc02nzakSY9fS20U+AlHJZbz8OQeCsJP27sbZ+/ufzrRDHrart2Pj029ZbxXdtiqU Who169egq1JKHfkdZpYOEmoKHRWQ1fMghAoEtwRZyTgR2nLE1NlmML7oAReUYD2xRIJn G6FVRatkLqb574QfR1qQTqy5GXumDkA29bMKKgicR+k71MB6DGYMeEM7cSf0H7DxMG2U KqOwbpsjegInpFQFNphoVJmtoyssSymK0/nh9+w3UtdpIeZYGUP169jqWrG2H/6r0x0v VeOpiTczQaEeR/BBS/RQPA0xJ0uWlZAJyLDuq1dr07UoybggpMlIZJ2H1PyjmcN6g6Aw p8Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id p12-20020a05600c204c00b003fe15f43d02si7175499wmg.159.2023.08.22.10.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 10:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 44B7B864E7; Tue, 22 Aug 2023 19:41:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 8C3C6864FB; Tue, 22 Aug 2023 19:41:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id E60FF864EE for ; Tue, 22 Aug 2023 19:41:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1E1BF11FB; Tue, 22 Aug 2023 10:41:43 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.46.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 083B83F762; Tue, 22 Aug 2023 10:40:59 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Tom Rini , Sughosh Ganu Subject: [PATCH v11 10/15] scripts/Makefile.lib: Collate all dtsi files for inclusion Date: Tue, 22 Aug 2023 23:10:03 +0530 Message-Id: <20230822174008.626239-11-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822174008.626239-1-sughosh.ganu@linaro.org> References: <20230822174008.626239-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean At the time of building a device-tree file, all the *u-boot.dtsi files are looked for, in a particular order, and the first file found is included. Then, the list of files specified in the CONFIG_DEVICE_TREE_INCLUDES symbol are included. Combine these files that are to be included into a variable, and then include all these files in one go. Signed-off-by: Sughosh Ganu Reviewed-by: Tom Rini Acked-by: Ilias Apalodimas --- Changes since V10: None scripts/Makefile.lib | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f5ab7af0f4..368b5a3e28 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -179,10 +179,13 @@ ifdef DEVICE_TREE_DEBUG u_boot_dtsi_options_debug = $(warning $(u_boot_dtsi_options_raw)) endif -# We use the first match -u_boot_dtsi = $(strip $(u_boot_dtsi_options_debug) \ +# We use the first match to be included +dtsi_include_list = $(strip $(u_boot_dtsi_options_debug) \ $(notdir $(firstword $(u_boot_dtsi_options)))) +# The CONFIG_DEVICE_TREE_INCLUDES also need to be included +dtsi_include_list += $(CONFIG_DEVICE_TREE_INCLUDES) + # Modified for U-Boot dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ $(UBOOTINCLUDE) \ @@ -320,8 +323,8 @@ quiet_cmd_dtc = DTC $@ # Bring in any U-Boot-specific include at the end of the file # And finally any custom .dtsi fragments specified with CONFIG_DEVICE_TREE_INCLUDES cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - (cat $<; $(if $(u_boot_dtsi),echo '$(pound)include "$(u_boot_dtsi)"')) > $(pre-tmp); \ - $(foreach f,$(subst $(quote),,$(CONFIG_DEVICE_TREE_INCLUDES)), \ + (cat $< > $(pre-tmp)); \ + $(foreach f,$(subst $(quote),,$(dtsi_include_list)), \ echo '$(pound)include "$(f)"' >> $(pre-tmp);) \ $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ $(DTC) -O dtb -o $@ -b 0 \