[U-Boot] [PATCH 3/3] SPL: Do not include cmd lists

Tom Rini trini at konsulko.com
Fri Dec 22 14:10:50 UTC 2017


On Fri, Dec 22, 2017 at 02:29:11PM +0100, Daniel Schwierzeck wrote:
> Hi Tom,
> 
> On 22.12.2017 04:13, Tom Rini wrote:
> > There are no CMDs to be run in SPL and no need for any of their lists.
[snip]
> > diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
> > index 07004ea11155..19444e3e600e 100644
> > --- a/arch/mips/cpu/u-boot-spl.lds
> > +++ b/arch/mips/cpu/u-boot-spl.lds
> > @@ -11,6 +11,9 @@ OUTPUT_ARCH(mips)
> >  ENTRY(_start)
> >  SECTIONS
> >  {
> > +	/* There are no CMDs in SPL */
> > +	/DISCARD/ : { *(.u_boot_list_2_cmd_*) }
> > +
> >  	. = 0x00000000;
> >  
> >  	. = ALIGN(4);
> 
> does a DISCARD() work together with the KEEP() in this block?
> 
> #ifdef CONFIG_SPL_DM
> 	. = ALIGN(4);
> 	.u_boot_list : {
> 		KEEP(*(SORT(.u_boot_list*)));
> 	} > .spl_mem
> #endif

Yes, we discard th cmd list, and then keep the rest, given the ordering.

> I suggest to do something like this:
> 
> 		KEEP(*(SORT(.u_boot_list_2_uclass*)));
> 		KEEP(*(SORT(.u_boot_list_2_driver*)));
> 
> Then all u_boot_list_* would be discarded by default except the two
> lists above when a board selects CONFIG_SPL_DM. Also this would have the
> benefit of discarding all u_boot_list_2_env* entries.

Ah, but this shows why we glob in all lists today.  We do need env in
SPL at times.  Now, it shouldn't take up space in SPL if we don't ahve
SPL_ENV_SUPPORT.  But I haven't checked either...

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171222/e33a8740/attachment.sig>


More information about the U-Boot mailing list