Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists
On Thu, Dec 21, 2017 at 10:13:23PM -0500, Tom Rini wrote: > There are no CMDs to be run in SPL and no need for any of their lists. > > CC: Stefano Babic> Cc: Fabio Estevam > Cc: Jagan Teki > Cc: Maxime Ripard > Cc: "Andreas Bießmann" > Cc: Michal Simek > Cc: Daniel Schwierzeck > Cc: Mario Six > Cc: Wolfgang Denk > Cc: York Sun > Cc: Simon Glass > Cc: Bin Meng > Cc:Wenyou Yang > Cc: Lokesh Vutla > Signed-off-by: Tom Rini So, discarding doesn't cause everything that could be garbage collected to be garbage collected in this case (and I don't think that's really a bug). So I'm withdrawing this patch as well, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists
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. > > CC: Stefano Babic> Cc: Fabio Estevam > Cc: Jagan Teki > Cc: Maxime Ripard > Cc: "Andreas Bießmann" > Cc: Michal Simek > Cc: Daniel Schwierzeck > Cc: Mario Six > Cc: Wolfgang Denk > Cc: York Sun > Cc: Simon Glass > Cc: Bin Meng > Cc:Wenyou Yang > Cc: Lokesh Vutla > Signed-off-by: Tom Rini > --- > arch/arm/cpu/arm1136/u-boot-spl.lds | 3 +++ > arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds | 3 +++ > arch/arm/cpu/arm926ejs/orion5x/u-boot-spl.lds | 3 +++ > arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 3 +++ > arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 3 +++ > arch/arm/cpu/armv8/u-boot-spl.lds | 3 +++ > arch/arm/cpu/u-boot-spl.lds | 3 +++ > arch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 3 +++ > arch/arm/mach-at91/armv7/u-boot-spl.lds | 3 +++ > arch/arm/mach-omap2/u-boot-spl.lds| 3 +++ > arch/arm/mach-zynq/u-boot-spl.lds | 3 +++ > arch/microblaze/cpu/u-boot-spl.lds| 3 +++ > arch/mips/cpu/u-boot-spl.lds | 3 +++ > arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | 3 +++ > arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 3 +++ > arch/sandbox/cpu/u-boot-spl.lds | 2 ++ > arch/x86/cpu/u-boot-spl.lds | 3 +-- > 17 files changed, 48 insertions(+), 2 deletions(-) > for MIPS Acked-by: Daniel Schwierzeck -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists
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_*) } > > + > > . = 0x; > > > > . = 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 signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists
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. > > CC: Stefano Babic> Cc: Fabio Estevam > Cc: Jagan Teki > Cc: Maxime Ripard > Cc: "Andreas Bießmann" > Cc: Michal Simek > Cc: Daniel Schwierzeck > Cc: Mario Six > Cc: Wolfgang Denk > Cc: York Sun > Cc: Simon Glass > Cc: Bin Meng > Cc:Wenyou Yang > Cc: Lokesh Vutla > Signed-off-by: Tom Rini > --- > arch/arm/cpu/arm1136/u-boot-spl.lds | 3 +++ > arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds | 3 +++ > arch/arm/cpu/arm926ejs/orion5x/u-boot-spl.lds | 3 +++ > arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 3 +++ > arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 3 +++ > arch/arm/cpu/armv8/u-boot-spl.lds | 3 +++ > arch/arm/cpu/u-boot-spl.lds | 3 +++ > arch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 3 +++ > arch/arm/mach-at91/armv7/u-boot-spl.lds | 3 +++ > arch/arm/mach-omap2/u-boot-spl.lds| 3 +++ > arch/arm/mach-zynq/u-boot-spl.lds | 3 +++ > arch/microblaze/cpu/u-boot-spl.lds| 3 +++ > arch/mips/cpu/u-boot-spl.lds | 3 +++ > arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | 3 +++ > arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 3 +++ > arch/sandbox/cpu/u-boot-spl.lds | 2 ++ > arch/x86/cpu/u-boot-spl.lds | 3 +-- > 17 files changed, 48 insertions(+), 2 deletions(-) > ... > 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_*) } > + > . = 0x; > > . = 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 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. -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot