From: Tom Rini Date: Fri, 22 Dec 2017 09:10:50 -0500 Subject: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists In-Reply-To: <2b76062c-c5ee-8231-28b3-f6763fa082ce@gmail.com> References: <1513912403-26775-1-git-send-email-trini@konsulko.com> <1513912403-26775-3-git-send-email-trini@konsulko.com> <2b76062c-c5ee-8231-28b3-f6763fa082ce@gmail.com> Message-ID: <20171222141050.GL7592@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: