[PATCH v9 1/2] spl: remove usage of CMD_BOOTx from image parsing

Anshul Dalal anshuld at ti.com
Mon Oct 27 09:08:30 CET 2025


On Sat Oct 25, 2025 at 7:22 PM IST, Tom Rini wrote:
> On Sat, Oct 25, 2025 at 02:38:37PM +0530, Anshul Dalal wrote:
>> Using CMD_* configs from spl doesn't make logical sense. Therefore
>> this patch replaces the checks for CMD_BOOTx with newly added library
>> symbols LIB_BOOT[IMZ] and SPL_LIB_BOOT[IMZ] which are enabled by their
>> respective CMD_* or SPL_* counterparts.
>> 
>> SPL_BOOTZ is enabled by default for 32-bit ARM systems and SPL_BOOTI is
>> enabled by default for 64-bit ARM and RISCV.
>> 
>> The respective C files (image.c/zimage.c) are compiled based on library
>> symbols BOOTx instead which are in turn selected by both CMD_BOOTx and
>> SPL_BOOTx as required.
>> 
>> Signed-off-by: Anshul Dalal <anshuld at ti.com>
>> ---
>>  arch/arm/lib/Makefile   | 13 +++++++------
>>  arch/riscv/lib/Makefile |  4 ++--
>>  boot/Kconfig            | 18 ++++++++++++++++++
>>  cmd/Kconfig             |  5 +++++
>>  common/spl/Kconfig      | 16 ++++++++++++++++
>>  common/spl/spl.c        |  5 +++--
>>  6 files changed, 51 insertions(+), 10 deletions(-)
>> 
>> diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
>> index ade42d0ca4370b7df3aec59615f12e28a96874cd..3ea94709dfcdc2c9fd057ad5e129e041c59d6716 100644
>> --- a/arch/arm/lib/Makefile
>> +++ b/arch/arm/lib/Makefile
>> @@ -7,6 +7,13 @@ lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o \
>>  				    lib1funcs.o uldivmod.o div0.o \
>>  				    div64.o muldi3.o
>>  
>> +obj-$(CONFIG_$(PHASE_)LIB_BOOTI) += image.o
>> +obj-$(CONFIG_$(PHASE_)LIB_BOOTZ) += zimage.o
>> +
>> +ifndef CONFIG_XPL_BUILD
>> +obj-$(CONFIG_$(PHASE_)LIB_BOOTM) += bootm.o
>> +endif
>
> I wasn't clear enough, sorry. When you use $(PHASE_) you don't need
> CONFIG_XPL_BUILD. And if we select SPL_LIB_BOOTM we want bootm.o in SPL,
> yes?

Yeah, you're right. I missed the CONFIG_XPL_BUILD too, will re-run the
CI and post a v10.



More information about the U-Boot mailing list