From patchwork Fri Dec 22 06:12:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 757459 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp1253161wrw; Thu, 21 Dec 2023 22:13:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFatjbuoBOQrwz+hRA5q7NJQyG0fs708OQpjJS2TYombffm7IQe7+LG8F8DaQh9u/tJU/sX X-Received: by 2002:adf:e790:0:b0:336:7562:3376 with SMTP id n16-20020adfe790000000b0033675623376mr473057wrm.102.1703225587918; Thu, 21 Dec 2023 22:13:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703225587; cv=none; d=google.com; s=arc-20160816; b=MVe+S1UxqOppNjZQPgnxyrJRHJFDgOtzNaXtRHwWpz46N0byyWkOq0iGj2PChmTl+d Q0n6R9WYGMp1dnR4FK+9p7p/XhGAsMeXYM5ANAhMMRlSJaVY1fwYY8p/i/8gRqBYLMXX fnBwwrMoIEGia22UA03pbnHiVlgtKl2agoMbhJmdY0knE8C15wNLM0atnkPKOJRHaJmO +fKnzecMEtTeZm5e9zUS17LAR3bIYyu6iNbwBWb+FlK3wyd+H0Z1POPW7AvhFm68lN7l gFJC6XTYcJ8xJd+UkXw+jOmVruXFhmbKtLA1NnykIBr4ENVQVtM8PsaILsWCB2hks3dm 3n7A== 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=ws15i5pKMFZZe6GTWUu0HMV5WHPNRUFK+kwt3XjnQlw=; fh=VZWdizSVWfhngo19Gt5nLjhnxzdtHBYWvcywp4ujR58=; b=NH+icDiD4URr/CnRWNiHxvlMJhBsfdYp9k7qR8bTazsmo1asOBPV0bCMH8ZmZ/Vd/5 SQe3Nc8JinxIYMvx6/tt+mizi0TsG/iAvSTHbBS2xjzma1JIj+3Vgtq35gzWzwDMbxR7 A0DXSemCscLnaRHs3CKfYbgeDZl+kqgfBEPiHekwHEZKiPfK2BS9peEPY/bOPIBcwfbJ yyM8Dy6VGQBFDVLR/NQEDNaG8FBuZoXY3qVNwJgd934Hq31nKUJkHMPnvRS5oBl6hNCC gC/aDKX9dV68Q6KAUvDdLyIlRdkrxkJPqN34NmlSZ+2Nuk3FCIx9ZoMXGGqxymHKmSBh x5ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P+3ffhgo; 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 o11-20020a5d474b000000b00336608a3fa2si1734668wrs.187.2023.12.21.22.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 22:13:07 -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=P+3ffhgo; 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 D4DE2877B2; Fri, 22 Dec 2023 07:12:56 +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="P+3ffhgo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4DD3480245; Fri, 22 Dec 2023 07:12: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=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (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 EB38987807 for ; Fri, 22 Dec 2023 07:12:51 +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-oo1-xc2a.google.com with SMTP id 006d021491bc7-591a6f1385eso974006eaf.0 for ; Thu, 21 Dec 2023 22:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703225570; x=1703830370; 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=ws15i5pKMFZZe6GTWUu0HMV5WHPNRUFK+kwt3XjnQlw=; b=P+3ffhgocHCbjpL3BJkYCDiS69wpOr+KteJp14sh0a0HTxRCP9iQBgs/UObTVQ2xp0 CWi+oTgrU6+4E4BMKxXgU+jqQoxbASAQOtdc6KIC7o14s7CRy2kDrwaP7b4jL/ut32kW AbpfOLpmg25t7vsQNtCRT7miq9l9mrzv14xaTWFRcTJH88rC6gsKCRJDI+VWbw4NZAzc AQDgAtgRBj15aLXP2i5zjqj7iAobij4RIgJnRjKU5EHN5IUgQPvM3AfTFTVuZjA71X+T INdCPAt5g8+jjnlsSEYv/GjleyOLoc2OW1HB99sC2TKmMol+TbmQJuMgVSaZU1sGmU80 cpNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703225570; x=1703830370; 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=ws15i5pKMFZZe6GTWUu0HMV5WHPNRUFK+kwt3XjnQlw=; b=btUGp86hJ9PE0RHY9cgneWPOOpYlxin5o9L76CEjr+ST5XlS10G/TH3PPHisGeWyP0 qK3XTkV3MDhspRU8BIeOtQYgSN7SO2ZsQEYsLBe1k7b8+EdDJcJA8kSsYN6avaQU22eV ExSiGMd8F4rUzEIEp94eg4w6xGI912w3zdgwZIw8gUqe4FX4vRHUul21rSodEywydtx6 HIquZVrP3pyDhy+/QDKGxGbon7bUkCCNewh9NeSCZwvWgwDtXKPAQIu7Zu7YybbzatRU NhoQFej6Z3z7Y7C08RTPmbdUihHhatynC0N7wdw7zdt7657X02uhhNXUWuLyDRI/BpzW xlCg== X-Gm-Message-State: AOJu0YzwUSR3Jnd/2KwmPGv7jZ6RmSYRi/vd1KCVYneYkTD/Jx++hFe9 FJbwkOZUMlb2wUyjsE97nmfvetgT3+1bYhS4b4CUC5cHwr9CYg== X-Received: by 2002:a05:6359:6697:b0:16f:ebce:8126 with SMTP id so23-20020a056359669700b0016febce8126mr767766rwb.19.1703225570233; Thu, 21 Dec 2023 22:12:50 -0800 (PST) Received: from sumit-X1.. ([223.178.212.219]) by smtp.gmail.com with ESMTPSA id h6-20020aa79f46000000b006ce835b77d9sm2602883pfr.20.2023.12.21.22.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 22:12:49 -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, Sumit Garg Subject: [PATCH v2 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location Date: Fri, 22 Dec 2023 11:42:03 +0530 Message-Id: <20231222061208.3009970-4-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231222061208.3009970-1-sumit.garg@linaro.org> References: <20231222061208.3009970-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. Signed-off-by: Sumit Garg Reviewed-by: Tom Rini Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- 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) \ ; \