From patchwork Thu Dec 14 13:50:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 753924 Delivered-To: patch@linaro.org Received: by 2002:adf:ff85:0:b0:336:3f68:820c with SMTP id j5csp758087wrr; Thu, 14 Dec 2023 05:52:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdb9mcO5EVKX4BmzorrL4mvwLPxqll7tImU+hYwTTF84bcNG7LDtrdhkJqdamwZuwayjZj X-Received: by 2002:a05:6512:313a:b0:50c:a3a:45bd with SMTP id p26-20020a056512313a00b0050c0a3a45bdmr2355523lfd.160.1702561936307; Thu, 14 Dec 2023 05:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702561936; cv=none; d=google.com; s=arc-20160816; b=y6NNzxuhcfV0NP2RaSSh+BaxxS/7bUGT8zCPOv1OUVDLhi96yI3C3EoYuDb+1+AvvB XEctjKV6pRtuPDdMI0MY/eGzSzvbnVfda4q9BeZ8AkpISZO1VraNNhp79clyq5XLsTvE QKS1DyH3+SDAMZP2W9808UvePXikQjCs3jpIj0/dQqLNBeJa0A1zRbkMYXhPh8hFPNIV WvTMQGGWaa+nTKTVB+DBmUfPxIFpfwtdFLZFKObC8xMl4CwU+oMfdqGTCJiCNkMYvD4H XfcXPgNtScXzfemE2EYUxOK9/jD9TJcrZsguD99FR245nO5ejihEUftPtNg4JCkzGfHi CQaw== 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=LJhXFrv8uHuP5uiECV7lR9faylLwkNArQN5KLLNNmik=; fh=VZWdizSVWfhngo19Gt5nLjhnxzdtHBYWvcywp4ujR58=; b=mOTG+swUc/hY3O1ssTQF7ohQzNYj5t1dSnQ/op3OV7vZgTXen+heUJ7bKgQah0ugaO A9qN6lngbiS1a4tiKfCu6Qjz9ut7w78iwdX/Xe8q4rEnXWLlEB2HDbmADB67R7ZTOz6I joDFFS1zRwx7TPqv7x2SNXqXcmuNv2u5sxxNtgGrRW0rQbR7wRoxTCeAFT7+Gfcdjk/p Xq4tj2PkMkeGBD+wccsbb3dHA09IBRjuEibj/ydsTFjPuHtr4baqkj/fZnJseEI52ZcR 518Z73UPBVhq2Thc+JWLBnsGeHLfhAfIiNHgGH45La2TJPF7/0xO8kfKnAXVGbp17qx8 6WRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TBySlIwo; 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 u3-20020a05651206c300b0050aa79ab308si4349719lff.297.2023.12.14.05.52.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:52:16 -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=TBySlIwo; 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 466EE87A7C; Thu, 14 Dec 2023 14:52:05 +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="TBySlIwo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 735F987A7F; Thu, 14 Dec 2023 14:52:04 +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-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (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 ABF4B87A8D for ; Thu, 14 Dec 2023 14:52:01 +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-pf1-x433.google.com with SMTP id d2e1a72fcca58-6d089e8b1b2so3031225b3a.3 for ; Thu, 14 Dec 2023 05:52:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702561920; x=1703166720; 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=LJhXFrv8uHuP5uiECV7lR9faylLwkNArQN5KLLNNmik=; b=TBySlIwoCrsDETK9i0GYV1dZ8HoVmD/xOpXN/Q0GjRCQNjxZASH6TecIiqeb9FleJ2 ovpzDvxjB0gXwioWJnalY4gccq1Dfm2A1AQ78v9VvqUC24gKcZ+pzQxmNTsKZJ2P7pTN zU9WDobRrCos8WKUmnaypZNjDbzr4FCEHmTFWq3zypsNhR3M0XpEKl17W2AgJvOJx+lY P1cq9eFELG1rjmVPJ17F9s/7RZbbWR0+XQQbiwRPaYM9zPSHBkN5guztygCpSSOD9bui TfpjXYkngWjCWpHoM1k7b4Wf9Z8LA7Tf3nCh0FaicbRvxdcrCYo+SHv7GnyyerhgBde0 HvIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702561920; x=1703166720; 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=LJhXFrv8uHuP5uiECV7lR9faylLwkNArQN5KLLNNmik=; b=sWg1wMwbQeKcIH/g5cpACNX5wZWClf1FwXL4eQ24igJOWHnwVT/tdNmpBXVw0lzU2B AdIk9DJE10DgbtBpB1rXo7b7Ccaub5qsXBJ/XxpDP+ZpwAme1nJaq15hBx7OdERExDPq Oez2NA3hU0zy4TIgAyggWcHkTIhWyXRmY4LUPw5snjs/cxjYytxkbcacP0ejKM0UUdMY A/b0ohOfaYBKKF6QkYGZ2Jp4nxAcc7YFr1iGnDImCIDwJw0Qx9kqsUcECuRiUQLGl+cO nc4sKkrKvry79fj4/krFDZ/AHQrXTSUMlNZ9yFy3EKwaRPSCdBQklHpsGmyhfFIon6Jb UOvQ== X-Gm-Message-State: AOJu0YzWNZHMmMoN8VvQE0r0zH1LiL/Rm3oCJ+0R50/hHWsWy6bMnTJj eAWOLAo6lI2Kasog1BRyyvZSj/p8HKqcZ6F9cp9giA== X-Received: by 2002:a05:6a20:daa0:b0:18b:6f9:dc22 with SMTP id iy32-20020a056a20daa000b0018b06f9dc22mr5676623pzb.41.1702561919810; Thu, 14 Dec 2023 05:51:59 -0800 (PST) Received: from sumit-X1.. ([223.178.213.6]) by smtp.gmail.com with ESMTPSA id j3-20020a170902c08300b001cfc68125desm12474956pld.203.2023.12.14.05.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:51:59 -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 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location Date: Thu, 14 Dec 2023 19:20:58 +0530 Message-Id: <20231214135103.1606605-4-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214135103.1606605-1-sumit.garg@linaro.org> References: <20231214135103.1606605-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 --- scripts/Makefile.lib | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 27b9437027c..4a002b0e0ca 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)) +UBOOT_DTSI_LOC = $(srctree)/arch/$(ARCH)/dts/ + +u_boot_dtsi_options = $(strip $(wildcard $(UBOOT_DTSI_LOC)$(basename $(notdir $<))-u-boot.dtsi) \ + $(wildcard $(UBOOT_DTSI_LOC)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \ + $(wildcard $(UBOOT_DTSI_LOC)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \ + $(wildcard $(UBOOT_DTSI_LOC)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \ + $(wildcard $(UBOOT_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 ... \ + $(UBOOT_DTSI_LOC)$(basename $(notdir $<))-u-boot.dtsi \ + $(UBOOT_DTSI_LOC)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi \ + $(UBOOT_DTSI_LOC)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi \ + $(UBOOT_DTSI_LOC)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi \ + $(UBOOT_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$(UBOOT_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 $(UBOOT_DTSI_LOC) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) || \ (echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \ ; \