[RFC PATCH] dts: automatically build necessary .dtb files
Simon Glass
sjg at chromium.org
Tue Feb 8 21:39:56 CET 2022
On Tue, 8 Feb 2022 at 08:15, Simon Glass <sjg at chromium.org> wrote:
>
> On Mon, 24 Jan 2022 at 14:15, Rasmus Villemoes
> <rasmus.villemoes at prevas.dk> wrote:
> >
> > On 24/01/2022 18.57, Simon Glass wrote:
> > > Hi,
> > >
> > > On Mon, 24 Jan 2022 at 09:02, Tom Rini <trini at konsulko.com> wrote:
> > >>
> > >> On Mon, Jan 10, 2022 at 02:34:41PM +0100, Rasmus Villemoes wrote:
> > >>
> > >>> When building for a custom board, it is quite common to maintain a
> > >>> private branch which include some defconfig and .dts files. But to
> > >>> hook up those .dts files requires modifying a file "belonging" to
> > >>> upstream U-Boot, the arch/*/dts/Makefile. Forward-porting that branch
> > >>> to a newer upstream then often results in a conflict which, while it
> > >>> is trivial to resolve by hand, makes it harder to have a CI do "try to
> > >>> build our board against latest upstream".
> > >>>
> > >>> The .config usually includes information on precisely what .dtb(s) are
> > >>> needed, so to avoid having to modify the Makefile, simply add the
> > >>> files in (SPL_)OF_LIST to dtb-y.
> > >>>
> > >>> A technicality is that (SPL_)OF_LIST is not always defined, so rework
> > >>> the Kconfig symbols so that (SPL_)OF_LIST is always defined (when
> > >>> (SPL_)OF_CONTROL), but only prompted for in the cases which used to be
> > >>> their "depends on".
> > >>>
> > >>> nios2 and microblaze already have something like this in their
> > >>> dts/Makefile, and the rationale in commit 41f59f68539 is similar to
> > >>> the above. So this simply generalizes existing practice. Followup
> > >>> patches could remove the logic in those two makefiles, just as there's
> > >>> potential for moving some common boilerplate from all the
> > >>> arch/*/dts/Makefile files to the new scripts/Makefile.dts.
> > >>>
> > >>> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> > >>> ---
> > >>> arch/arc/dts/Makefile | 2 ++
> > >>> arch/arm/dts/Makefile | 2 ++
> > >>> arch/m68k/dts/Makefile | 2 ++
> > >>> arch/microblaze/dts/Makefile | 2 ++
> > >>> arch/mips/dts/Makefile | 2 ++
> > >>> arch/nds32/dts/Makefile | 2 ++
> > >>> arch/nios2/dts/Makefile | 2 ++
> > >>> arch/powerpc/dts/Makefile | 2 ++
> > >>> arch/riscv/dts/Makefile | 2 ++
> > >>> arch/sandbox/dts/Makefile | 2 ++
> > >>> arch/sh/dts/Makefile | 2 ++
> > >>> arch/x86/dts/Makefile | 2 ++
> > >>> arch/xtensa/dts/Makefile | 2 ++
> > >>> dts/Kconfig | 8 ++++----
> > >>> scripts/Makefile.dts | 3 +++
> > >>> 15 files changed, 33 insertions(+), 4 deletions(-)
> > >>> create mode 100644 scripts/Makefile.dts
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot-dm, thanks!
More information about the U-Boot
mailing list