From patchwork Thu Dec 28 11:57:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 758591 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp3970012wrw; Thu, 28 Dec 2023 03:59:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4J6FP3GDVlpaRfEf8M+u8PwBroyOkow8UgeI6awMAo6os0kZqne60vUSkr9+skR+kvddf X-Received: by 2002:a1c:771a:0:b0:40d:5979:1949 with SMTP id t26-20020a1c771a000000b0040d59791949mr2460245wmi.178.1703764749270; Thu, 28 Dec 2023 03:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703764749; cv=none; d=google.com; s=arc-20160816; b=wqF6P4Y3sMRgELs3xsvufUfOx7ZuV45zkh0Ai3WWGhwq7cf38+nToQHkYWsZsBYOQl biaBGVOee6NTZjifToIUuZ6BDuP0l55wwWSSAIXrKvte29RQA4TvK9dJ1US+lbDh1Muo sZpx0ZE/F2sU4Hv+PaemL5nYR3kiVMGkczjGHDejznl5ilmtrnoKlY27wpC2qOGxuaB8 t0IxzAj4oLXF5xHrmDxivTj0vJ2BToj/til9RBKRxnDTUgGMvjulSR6vQJPPkPtedXWw T/E1zFQYnORH76YW/dC3RKWKpHiX5Oa/mbtpN9QVt+1sDRhJW5U8Hmsmz9mGdlJDS640 /poA== 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:dkim-signature; bh=zTn3lEgWvkPzpoWGXtAVVa9kdn3+sVlfns5CTBdgKPs=; fh=LuHobO/PNlphnzT1n7Wd/yJxuMleLEX8L6cMH6/BHvI=; b=Ad04CIWZkmWoddIiOk5t22G+kGCJG1bZXyBiE++tX02buV5Kf9HEA9rQEsDRwfHj3S HqwOVn2jnpD3Ub/dJNDWltcC4YN/syHukXOzo2jPSqT9hAcerrmYmlbqgOgiWUd92+kf itViR0eBBPc5SlcBXLsH8zBu9n9U6ec2dn+GfYmv0+T9nAIbNSP8YMx6zwPs5a3xYBe1 QBOgqI0T8UlZtpVhz8b1/x68a4a1CVC6OFdTP6xfzwtRvb4bjzqdlIWWRVh3bfQpS5Fv V6FdlmjN3OYM2UoSX8ShA2CMn8cXjsyB9QBozrefIZzoGOhOS7ppKkPNeYwqM/cPYl8r g0mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="L/eP7SJC"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id u20-20020a05600c139400b0040859d4f3cdsi10260362wmf.204.2023.12.28.03.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 03:59:09 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="L/eP7SJC"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (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 A6E9087895; Thu, 28 Dec 2023 12:58:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="L/eP7SJC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D44687895; Thu, 28 Dec 2023 12:58:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3233C87A13 for ; Thu, 28 Dec 2023 12:58:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d4751dcb56so8760725ad.1 for ; Thu, 28 Dec 2023 03:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703764731; x=1704369531; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zTn3lEgWvkPzpoWGXtAVVa9kdn3+sVlfns5CTBdgKPs=; b=L/eP7SJC2R7mJprXnjsLpaT3mqf1yZZ8GblqteP++1ci3J3Qp7IJNROghnrLsIl3U/ rhzgONHbV08xDvyGGddFoFPJpqqyckhbXHUQB1GBkdIroeisUxv8TmDK39iOpZOP27/2 kWfv/l4Es/ncW0Icq+Ua7ZUIP7mO53qZy+vEhoAgdeZK+sMxPnxAc67ZACXItELxABjA X2Y8Qw8vnSh/FFBmiR+cXvhpBAqHNnmLXX3PSoR4eJN2YLwoxKBo5ThS6ztO/cBkMtgy eT9FXILiMMHApxK5U2LHSsfwoLyLzHPaysVZuBcwL7nnbdza1L6uSNYJdosWxFcKVyu3 Hmfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703764731; x=1704369531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zTn3lEgWvkPzpoWGXtAVVa9kdn3+sVlfns5CTBdgKPs=; b=FY64y9RCkPtE/cjLnCi8bamdvRnVH7snScOQVoDWj5XVWcmjd0f7SZUFdqxdEWOFbb NyzAPnp9xaY34ic8M4AdM1tPVsUDOoBPbfPV6AO31zSeNSchcQYNIYKXWCPFO50Huz7q 2KDTwS8FpjfpmJNPOckP5LNv74n5Z0SnmLQ08CBjCgXLEt7Vv2lynZKkb2PoH/b5mkqh aQKNkauuJs0U/3U1AJfWFnFlzFfoQUNJiys87LbW1DggCqbPGEeZNCXM4O7vYAOIVj10 25OxsExq1SErz3UCeMh9luXhreqcksbSP1R9VF0bdvjNqFjyWbxF0EEKuGvCixaIH9NF bcEQ== X-Gm-Message-State: AOJu0YwWIYtsMZ6/rbhuM6camyk+npRVbrp4vNf4yk0FV9BaGysiMjVL 3sg1Jd/0Q7bYw4UqWbaQ0Bpv/R8RRWz8ViycEcDcm67vXf8fHw== X-Received: by 2002:a17:903:184:b0:1d3:c8cb:4000 with SMTP id z4-20020a170903018400b001d3c8cb4000mr6430196plg.26.1703764731301; Thu, 28 Dec 2023 03:58:51 -0800 (PST) Received: from sumit-X1.. ([223.178.209.202]) by smtp.gmail.com with ESMTPSA id r4-20020a170902ea4400b001d3f285157dsm13700579plg.124.2023.12.28.03.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 03:58:50 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, u-boot-custodians@lists.denx.de Cc: trini@konsulko.com, sjg@chromium.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor@kernel.org, neil.armstrong@linaro.org, caleb.connolly@linaro.org, ff@shokubai.tech, daniel.thompson@linaro.org, dgilmore@fedoraproject.org, pbrobinson@gmail.com, ilias.apalodimas@linaro.org, maxim.uvarov@linaro.org, b.galvani@gmail.com, xypron.glpk@gmx.de, michal.simek@amd.com, seanga2@gmail.com, rasmus.villemoes@prevas.dk, peng.fan@nxp.com, jh80.chung@samsung.com, rfried.dev@gmail.com, marex@denx.de, mibodhi@gmail.com, Sumit Garg Subject: [PATCH v3 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location Date: Thu, 28 Dec 2023 17:27:59 +0530 Message-Id: <20231228115804.3626579-4-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231228115804.3626579-1-sumit.garg@linaro.org> References: <20231228115804.3626579-1-sumit.garg@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 Allow u-boot to build DTB from a different directory tree such that *-u-boot.dtsi files can be included from a common location. Currently that location is arch/$(ARCH)/dts/, so statically define that common location. This is needed for platform owners to start building DTB files from devicetree-rebasing directory but still being able to include *-u-boot.dtsi files. Reviewed-by: Tom Rini Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas Signed-off-by: Sumit Garg Tested-by: Bryan Brattlof --- Changes in v3: -------------- - Picked up review tags Changes in v2: -------------- - s/UBOOT_DTSI_LOC/u_boot_dtsi_loc/ scripts/Makefile.lib | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 27b9437027c..09330421856 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -159,18 +159,20 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) # Try these files in order to find the U-Boot-specific .dtsi include file -u_boot_dtsi_options = $(strip $(wildcard $(dir $<)$(basename $(notdir $<))-u-boot.dtsi) \ - $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \ - $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \ - $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \ - $(wildcard $(dir $<)u-boot.dtsi)) +u_boot_dtsi_loc = $(srctree)/arch/$(ARCH)/dts/ + +u_boot_dtsi_options = $(strip $(wildcard $(u_boot_dtsi_loc)$(basename $(notdir $<))-u-boot.dtsi) \ + $(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \ + $(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \ + $(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \ + $(wildcard $(u_boot_dtsi_loc)u-boot.dtsi)) u_boot_dtsi_options_raw = $(warning Automatic .dtsi inclusion: options: \ - $(dir $<)$(basename $(notdir $<))-u-boot.dtsi \ - $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi \ - $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi \ - $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi \ - $(dir $<)u-boot.dtsi ... \ + $(u_boot_dtsi_loc)$(basename $(notdir $<))-u-boot.dtsi \ + $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi \ + $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi \ + $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi \ + $(u_boot_dtsi_loc)u-boot.dtsi ... \ found: $(if $(u_boot_dtsi_options),"$(u_boot_dtsi_options)",nothing!)) # Uncomment for debugging @@ -190,6 +192,7 @@ dtsi_include_list += $(CONFIG_DEVICE_TREE_INCLUDES) dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ $(UBOOTINCLUDE) \ -I$(dir $<) \ + -I$(u_boot_dtsi_loc) \ -I$(srctree)/arch/$(ARCH)/dts/include \ -I$(srctree)/include \ -D__ASSEMBLY__ \ @@ -328,7 +331,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ 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 \ - -i $(dir $<) $(DTC_FLAGS) \ + -i $(dir $<) -i $(u_boot_dtsi_loc) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) || \ (echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \ ; \