[PATCH 1/2] global: Clean up arch/*/dts/Makefile

Simon Glass sjg at chromium.org
Sun Nov 19 20:09:07 CET 2023


Hi Tom,

On Fri, 17 Nov 2023 at 15:52, Tom Rini <trini at konsulko.com> wrote:
>
> With commit 3609e1dc ("dts: automatically build necessary .dtb files")
> we now have logic that will ensure that all device trees needed in the
> binary are built automatically. Any device tree that the developer needs
> while working can still be built normally via make arch/.../foo.dtb so
> we can simply drop the rest of this logic.
>
> Suggested-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>  arch/arc/dts/Makefile        |    8 -
>  arch/arm/dts/Makefile        | 1436 +---------------------------------
>  arch/m68k/dts/Makefile       |   18 -
>  arch/microblaze/dts/Makefile |    2 -
>  arch/mips/dts/Makefile       |   37 -
>  arch/nios2/dts/Makefile      |    2 -
>  arch/powerpc/dts/Makefile    |   32 -
>  arch/riscv/dts/Makefile      |    9 -
>  arch/sandbox/dts/Makefile    |    5 -
>  arch/sh/dts/Makefile         |    2 +-
>  arch/x86/dts/Makefile        |   22 -
>  arch/xtensa/dts/Makefile     |    2 -
>  configs/iot2050_defconfig    |    1 +
>  13 files changed, 6 insertions(+), 1570 deletions(-)

I can see the motivation for this, but it ends up moving us away from
driver model and devicetree, IMO. For example, rk3399 and other
rockchip boards use DT for their init so the same U-Boot can be used
for all, mostly. Ideally that is the way all boards would be, as they
are in Linux.

But here I have to manually add all the rk3399 boards to OF_LIST for
each board and enable SPL_LOAD_FIT (and SPL_FRAMEWORK but that is
fine) to make this work.

So this is teaching people to use a board.c file, to use #ifdefs for
device-specific differences, etc. It will be easier to do that than to
do the right thing.

One day I predict distros will be updating U-Boot on boards as a
matter of course, perhaps using fwupd. Having a full U-Boot build for
every single board is going to take up a lot of space and create a lot
of confusion for people trying to figure out which one to use to
update.

Could we instead reduce it down to a rule for each SoC that lists all
the DTs for that SoC? The consistent naming of these files (with the
rk3399- prefix for example) might make this easier?

With Linux right now I can build an arm64 build which supports most of
the boards...with about 990 devicetree files. Do we really want 990
U-Boot builds?

Regards,
Simon


More information about the U-Boot mailing list