u-boot-amlogic.groups.io archive mirror
 help / color / mirror / Atom feed
From: Bryan Brattlof <bb@ti.com>
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>,
	<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>
Subject: Re: [PATCH v3 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location
Date: Tue, 9 Jan 2024 08:26:12 -0600	[thread overview]
Message-ID: <20240109142612.ymzucfcjtmz5jix7@bryanbrattlof.com> (raw)
In-Reply-To: <CAFA6WYM5P_8OaFuOMGwqCFFBwGwAui_uyVPX+gPFDsKFT_eePA@mail.gmail.com>

On January  9, 2024 thus sayeth Sumit Garg:
> On Tue, 9 Jan 2024 at 07:24, Bryan Brattlof <bb@ti.com> wrote:
> >
> > On January  8, 2024 thus sayeth Sumit Garg:
> > > Hi Bryan,
> > >
> > > On Sat, 6 Jan 2024 at 02:12, Bryan Brattlof <bb@ti.com> wrote:
> > > >
> > > > Hi Sumit!
> > > >
> > > > On December 28, 2023 thus sayeth Sumit Garg:
> > > > > 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 <trini@konsulko.com>
> > > > > Reviewed-by: Simon Glass <sjg@chromium.org>
> > > > > Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > > > ---
> > > > >
> > > >
> > > > ...
> > > >
> > > > >
> > > > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > > > > index 27b9437027c..09330421856 100644
> > > > > --- a/scripts/Makefile.lib
> > > > > +++ b/scripts/Makefile.lib
> > > >
> > > > ...
> > > >
> > > > >  # 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) \
> > > > >               ; \
> > > >
> > > > One of the issues I see with having a separate OF_UPSTREAM and U-Boot dt
> > > > directory is when we have U-Boot board files that use dtsi files in the
> > > > OF_UPSTREAM folder.
> > > >
> > > > For example our reference boards uses the primary bootloader's dtb (eg:
> > > > k3-am62a7-r5-sk.dts) which #includes the k3-am62a7-sk.dts that will be
> > > > found in the OF_UPSTREAM directory and modifies it to give it the
> > > > perspective of the micro-controller it will be running on during boot.
> > >
> > > Thanks for bringing this up. I have been playing with the idea to
> > > reuse DT includes from upstream.
> > >
> > > >
> > > > What do you think if we have both paths included regardless if
> > > > OF_UPSTREAM is selected or not? IDK if this will break anyone else
> > >
> > > Sure, we should be able to do that if we maintain the correct order of
> > > include paths as per following patch [1]. If this works for you let me
> > > know and I will include it for v4.
> > >
> >
> > This works beautifully.
> >
> > I did have to hack around to get Makefile.spl working but this is headed
> > in the right direction for me :)
> 
> Thanks for testing. I hope I can take that as a tested-by tag for this patch.
> 

Absolutely 

Tested-by: Bryan Brattlof <bb@ti.com>

~Bryan


  reply	other threads:[~2024-01-10  8:47 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 11:57 [PATCH v3 0/8] An effort to bring DT bindings compliance within U-Boot Sumit Garg
2023-12-28 11:57 ` [PATCH v3 1/8] CI: Exclude devicetree-rebasing subtree for CONFIG checks Sumit Garg
2023-12-28 12:02   ` Ilias Apalodimas
2023-12-28 13:37     ` Simon Glass
2023-12-28 11:57 ` [PATCH v3 2/8] Makefile: Add support for DT bindings schema checks Sumit Garg
2023-12-28 13:37   ` Simon Glass
2023-12-28 11:57 ` [PATCH v3 3/8] scripts/Makefile.lib: Statically define *-u-boot.dtsi files location Sumit Garg
2024-01-05 20:41   ` Bryan Brattlof
2024-01-08  7:18     ` Sumit Garg
2024-01-09  1:54       ` Bryan Brattlof
2024-01-09  5:08         ` Sumit Garg
2024-01-09 14:26           ` Bryan Brattlof [this message]
2023-12-28 11:58 ` [PATCH v3 4/8] dts: Add alternative location for upstream DTB builds Sumit Garg
2023-12-28 13:37   ` Simon Glass
2023-12-28 14:03     ` Tom Rini
2023-12-28 15:09       ` Simon Glass
2023-12-28 15:54         ` Tom Rini
2023-12-28 19:48           ` Simon Glass
2023-12-28 20:31             ` Tom Rini
2023-12-29 15:30             ` Sumit Garg
2023-12-31 14:28               ` Simon Glass
2023-12-31 20:39                 ` Tom Rini
2024-01-01  0:33                   ` Mark Kettenis
2024-01-01 22:32                     ` Simon Glass
2024-01-01 23:35                       ` Tom Rini
2024-01-02 14:06                         ` Simon Glass
2024-01-02 15:10                           ` Tom Rini
2024-01-02 23:54                             ` Simon Glass
2024-01-03  0:41                               ` Tom Rini
2024-01-04  1:42                                 ` Simon Glass
2024-01-02 15:37                           ` Sumit Garg
2024-01-02 18:06                             ` Tom Rini
2024-01-03  6:57                               ` Sumit Garg
2024-01-03 13:23                                 ` Tom Rini
2024-01-03  7:06                             ` Sumit Garg
2024-01-02 12:50                       ` Caleb Connolly
2024-01-02 14:06                         ` Simon Glass
2024-01-04 12:23         ` Sumit Garg
2023-12-28 11:58 ` [PATCH v3 5/8] doc: devicetree: Updates for devicetree-rebasing subtree Sumit Garg
2023-12-28 12:58   ` Tom Rini
2023-12-28 13:37   ` Simon Glass
2023-12-28 14:10     ` Tom Rini
2024-01-03 16:19   ` Rob Herring
2024-01-03 16:32     ` Tom Rini
2024-01-04  9:46       ` Sumit Garg
2024-01-04 10:08       ` Michal Simek
2024-01-04 13:22         ` Sumit Garg
2024-01-04 13:50           ` Tom Rini
2024-01-04 14:45             ` Michal Simek
2024-01-04 15:30               ` Tom Rini
2024-01-04 15:50                 ` Michal Simek
2024-01-04 18:03                   ` Tom Rini
2024-01-05  8:16                     ` Michal Simek
2024-01-05 11:18                       ` Sumit Garg
2023-12-28 11:58 ` [PATCH v3 6/8] MAINTAINERS: Add myself as devicetree-rebasing maintainer Sumit Garg
2023-12-28 13:37   ` Simon Glass
2023-12-28 11:58 ` [PATCH v3 7/8] dts: meson-gxbb: Switch to using upstream DT Sumit Garg
2023-12-28 13:37   ` Simon Glass
2023-12-28 13:56     ` Tom Rini
2023-12-28 15:09       ` Simon Glass
2023-12-28 15:25         ` Tom Rini
2023-12-28 19:48           ` Simon Glass
2023-12-28 20:32             ` Tom Rini
2023-12-31 12:47               ` Simon Glass
2023-12-28 11:58 ` [PATCH v3 8/8] dts: meson-gxbb: Drop redundant devicetree files Sumit Garg
2024-01-03 12:53 ` [PATCH v3 0/8] An effort to bring DT bindings compliance within U-Boot Michal Simek
2024-01-04  8:18   ` Sumit Garg
2024-01-04 11:25     ` Michal Simek

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=20240109142612.ymzucfcjtmz5jix7@bryanbrattlof.com \
    --to=bb@ti.com \
    --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=ilias.apalodimas@linaro.org \
    --cc=jh80.chung@samsung.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=marex@denx.de \
    --cc=maxim.uvarov@linaro.org \
    --cc=mibodhi@gmail.com \
    --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).