
On 1/15/25 11:22 AM, Quentin Schulz wrote:
Hi Marek,
On 1/12/25 11:34 PM, Marek Vasut wrote:
Introduce board/renesas/common/Makefile and remove the multiple duplicate copies of obj := ../common/*.o from board Makefiles. Let the build system include the common Makefile using the HAVE_VENDOR_COMMON_LIB and build the common objects that are shared by all the boards that way. No functional change intended.
Thanks for highlighting this HAVE_VENDOR_COMMON_LIB mechanism, I'm now planning on migrating the Theobroma boards to that :) (I would need https://lore.kernel.org/u-boot/20250112223252.179123-1- marek.vasut+renesas@mailbox.org/ though :) ).
Some of the remaining board files which include board specific settings have been updated to use obj-y += to avoid rewriting the board obj-y target and avoid dropping object files from the build.
Board Makefiles cannot be empty, else they do not generate built-in.o, move the CONFIG_XPL_BUILD ifdeffery from Makefiles into .c files to make sure there is always a built-in.o generated from the remaining minimal Makefiles. This will be further cleaned up in follow up patches.
Unrelated, but I misread the commit log and was wondering whether this patch series would work without the additional patch from https:// lore.kernel.org/u-boot/20250112223252.179123-1- marek.vasut+renesas@mailbox.org/ so wanted to build an Rcar defconfig to verify but I'm unable to build r8a779f0_spider_defconfig from master:
/usr/bin/aarch64-linux-gnu-ld: /usr/lib/gcc/aarch64-linux-gnu/14/ libgcc.a(lse-init.o): in function `init_have_lse_atomics': /builddir/build/BUILD/cross-gcc-14.2.1-build/gcc-14.2.1-20240912/ aarch64-linux-gnu/aarch64-linux-gnu/libgcc/../../../gcc-14.2.1-20240912/ libgcc/config/aarch64/lse-init.c:46:(.text.startup+0xc): undefined reference to `__getauxval'
[...]
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. make: *** [Makefile:1812: u-boot] Error 1 make: *** Deleting file 'u-boot'
so cannot check myself.
I'm running Fedora 41.
$ aarch64-linux-gnu-gcc --version aarch64-linux-gnu-gcc (GCC) 14.2.1 20240912 (Red Hat Cross 14.2.1-1)
Debian testing/unstable is at 14.2.0 and spider builds just fine. Do you observe this failure with or without these patches applied ?
[...]
+++ b/board/renesas/common/Makefile @@ -0,0 +1,45 @@ +# +# board/renesas/whitehawk/Makefile +# +# Copyright (C) 2024 Marek Vasut marek.vasut+renesas@mailbox.org +# +# SPDX-License-Identifier: GPL-2.0+ +#
+# R-Car SoCs +ifndef CONFIG_RZG2L
This is a bit out of context, can you explain why this suddenly is here?
Fixed in V2
+# 32 bit SoCs +ifdef CONFIG_RCAR_GEN2 +endif
Not sure we need this noop?
This is preparation for R-Car Gen2 deduplication which might happen sometimes.
Also this probably should rather be CONFIG_RCAR_32 instead?
R-Car Gen2 is the only supported 32bit R-Car . I will have to add both
ifdef RCAR_32 ifdef RCAR_GEN2
[...]
--- a/board/renesas/whitehawk/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# board/renesas/whitehawk/Makefile -# -# Copyright (C) 2021 Renesas Electronics Corp. -# -# SPDX-License-Identifier: GPL-2.0+ -#
-ifdef CONFIG_SPL_BUILD -obj-y := ../common/gen4-spl.o -else -obj-y := ../common/gen4-common.o ../common/common.o -endif
This honestly was a bit difficult to review and felt like more than one change was made at once.
The #if !IS_ENABLED(CONFIG_XPL_BUILD) changes could have been made in a separate commit I believe.
This is actually bogus, so I dropped the whole thing.
The rest is fixed, thanks .