[PATCH] SPL: Do not allow enabling SPL symbols for non-SPL builds

Tom Rini trini at konsulko.com
Tue May 10 14:34:13 CEST 2022


On Tue, May 10, 2022 at 01:29:30PM +0200, Pali Rohár wrote:
> On Monday 09 May 2022 16:22:50 Tom Rini wrote:
> > On Mon, May 09, 2022 at 08:53:50PM +0200, Pali Rohár wrote:
> > 
> > > It does not make sense to enable SPL options when not building SPL binary.
> > > 
> > > So disallow selecting SPL options for non-SPL builds.
> > > 
> > > Signed-off-by: Pali Rohár <pali at kernel.org>
> > 
> > Some of this makes sense, where you add SPL as an explicit dependency.
> > But others:
> > 
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index 0afec5155b1b..e4b2b76650fe 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -985,7 +985,7 @@ config ARCH_MX6
> > >  	imply SYS_THUMB_BUILD
> > >  	imply SPL_SEPARATE_BSS
> > >  
> > > -if ARCH_MX6
> > > +if ARCH_MX6 && SPL
> > >  config SPL_LDSCRIPT
> > >  	default "arch/arm/mach-omap2/u-boot-spl.lds"
> > >  endif
> > > @@ -2343,7 +2343,11 @@ source "arch/arm/Kconfig.debug"
> > >  
> > >  endmenu
> > >  
> > > +if SPL
> > > +
> > >  config SPL_LDSCRIPT
> > >  	default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
> > >  	default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
> > >  	default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
> > > +
> > > +endif
> > 
> > Where it's like this and we're providing default values and the option
> > itself is prompt'd elsewhere don't as it's not cluttering the resulting
> > .config file.
> 
> Apparently it clutters the resulting .config file. Espressobin with
> mvebu_espressobin-88f3720_defconfig has CONFIG_SPL_LDSCRIPT in .config
> even there is no SPL for Espressobin.

Ah, OK, that is odd.  I think we need to move these to where the
question is asked then, instead.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220510/3901da30/attachment.sig>


More information about the U-Boot mailing list