Hi Quentin, Il giorno mer 14 ott 2026 alle ore 11:31 Quentin Schulz ha scritto: > > Hi Massimo, > > On 10/2/26 6:35 PM, Massimo Pegorer wrote: > > There is no need to define TPL linker script file through TPL_LDSCRIPT > > configuration option value when CONFIG_TPL is not selected. Avoid this > > useless row in the configuration with no side effect on binary outputs. > > > > What is this helping with?
If you make generic-rk3328_defconfig which has ROCKCHIP_EXTERNAL_TPL=y (and therefore CONFIG_TPL is not selected), you will see in the .config the line: CONFIG_TPL_LDSCRIPT="arch/arm/mach-rockchip/u-boot-tpl-v8.lds" which is useless and misleading. As an example, if you use the qconfig tool, it will report that generic-rk3328 is using TPL_LDSCRIPT. Indeed, the generic-rk3328 configuration profile does not need any definition of TPL_LDSCRIPT because it does not build TPL, being CONFIG_TPL not selected. This is what I meant by "Avoid this useless row in the configuration". And by "with no side effect on binary outputs" I meant that the build artifacts are the same as before. > > TPL_LDSCRIPT should only be reachable if TPL is enabled, so adding an > > if TPL > > is not supposed to do anything. menuconfig incorrectly reports a > dependency on ROCKCHIP_PX30 (or ROCKCHIP_RK3328 if I entirely remove > TPL_LDSCRIPT from arch/arm/mach-rockchip/px30/Kconfig), but this patch > doesn't help with it. > > > Involved boards being built without TPL are a subset of those based on > > RK3328 or RK3399. Anyway, keep aligned PX30 Kconfig with this fix, too. > > > > Yes, but PX30 force-enables TPL while the other two don't. Correct, ROCKCHIP_PX30 selects TPL while the others do not, therefore the change I made in px30/Kconfig has no effect on the resulting .config file. Anyway, it is correct to bind any TPL_LDSCRIPT secondary definition (those in the SoC Kconfig files) to TPL, because this config option is created in the context of and to be used within TPL, as stated in common/spl/Kconfig.tpl. In general, this approach helps to keep configurations cleaner and simpler. Thanks for your review! Massimo > > Cheers, > Quentin
