From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io,
u-boot-custodians@lists.denx.de, 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,
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
Subject: Re: [PATCH v2 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location
Date: Wed, 27 Dec 2023 10:38:55 +0200 [thread overview]
Message-ID: <CAC_iWjL7A857Hdd8gdAC_XqV=kap_hDwEzPf6R77_QUpcKyzdw@mail.gmail.com> (raw)
In-Reply-To: <20231222061208.3009970-4-sumit.garg@linaro.org>
Hi Sumit,
Thanks this looks great
On Fri, 22 Dec 2023 at 08:12, Sumit Garg <sumit.garg@linaro.org> wrote:
>
> 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 <sumit.garg@linaro.org>
> ---
> 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) \
> ; \
> --
> 2.34.1
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
prev parent reply other threads:[~2024-01-08 8:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231222061208.3009970-1-sumit.garg@linaro.org>
[not found] ` <20231222061208.3009970-9-sumit.garg@linaro.org>
2023-12-22 8:25 ` [PATCH v2 8/8] dts: meson-gxbb: Drop redundant devicetree files neil.armstrong
[not found] ` <02fdfc4b-113b-409f-8aaf-8f4a04822706@linaro.org>
[not found] ` <CAFA6WYM8EVY-D_Kptggsvxq0ZrFdP0gQ3y4UEbM+vLu0F8tLjw@mail.gmail.com>
[not found] ` <c6d65491-c407-4518-aee9-f53f6d4a84ed@linaro.org>
[not found] ` <20231222-whole-canola-81240881c2e7@spud>
[not found] ` <4a809aa2-0cc5-4ffa-a19f-06d69ae9e460@linaro.org>
2023-12-26 7:53 ` [PATCH v2 0/8] An effort to bring DT bindings compliance within U-Boot Sumit Garg
2023-12-26 9:16 ` Krzysztof Kozlowski
2023-12-26 9:36 ` Sumit Garg
[not found] ` <20231222061208.3009970-4-sumit.garg@linaro.org>
2023-12-26 9:46 ` [PATCH v2 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location Simon Glass
2023-12-26 10:09 ` Sumit Garg
2023-12-27 7:55 ` Simon Glass
2023-12-27 8:38 ` Ilias Apalodimas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC_iWjL7A857Hdd8gdAC_XqV=kap_hDwEzPf6R77_QUpcKyzdw@mail.gmail.com' \
--to=ilias.apalodimas@linaro.org \
--cc=b.galvani@gmail.com \
--cc=caleb.connolly@linaro.org \
--cc=conor@kernel.org \
--cc=daniel.thompson@linaro.org \
--cc=dgilmore@fedoraproject.org \
--cc=ff@shokubai.tech \
--cc=jh80.chung@samsung.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=marex@denx.de \
--cc=maxim.uvarov@linaro.org \
--cc=michal.simek@amd.com \
--cc=neil.armstrong@linaro.org \
--cc=pbrobinson@gmail.com \
--cc=peng.fan@nxp.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=rfried.dev@gmail.com \
--cc=robh+dt@kernel.org \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot-amlogic@groups.io \
--cc=u-boot-custodians@lists.denx.de \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).