On Thu, Jan 5, 2012 at 2:09 AM, Marek Vasut <marek.va...@gmail.com> wrote: >> On Wed, Jan 4, 2012 at 4:56 PM, Scott Wood <scottw...@freescale.com> wrote: >> > On 12/05/2011 05:17 PM, Marek Vasut wrote: >> >> This will be beneficial for the PXA3XX NAND driver, which uses the NAND >> >> IDs to identify the chip and configure the controller accordingly. >> >> >> >> Signed-off-by: Marek Vasut <marek.va...@gmail.com> >> >> Cc: Scott Wood <scottw...@freescale.com> >> >> --- >> >> drivers/mtd/nand/Makefile | 4 ++-- >> >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile >> >> index a63c0e4..46e79e3 100644 >> >> --- a/drivers/mtd/nand/Makefile >> >> +++ b/drivers/mtd/nand/Makefile >> >> @@ -35,10 +35,10 @@ COBJS-y += nand_spl_load.o >> >> endif >> >> else >> >> COBJS-y += nand.o >> >> -COBJS-y += nand_bbt.o >> >> -COBJS-y += nand_ids.o >> >> COBJS-y += nand_util.o >> >> endif >> >> +COBJS-y += nand_bbt.o >> >> +COBJS-y += nand_ids.o >> >> COBJS-y += nand_ecc.o >> >> COBJS-y += nand_base.o >> > >> > So, in theory with gc-sections this shouldn't increase the size of any >> > SPL that currently successfully links (at least in the absence of things >> > like weak symbols). However, I observed a devkit8000 build go from this: >> > >> > text data bss dec hex filename >> > 40709 1792 197764 240265 3aa89 /tmp/u-boot-arm/spl/u-boot-spl >> > >> > to this: >> > >> > text data bss dec hex filename >> > 42277 1792 197764 241833 3b0a9 /tmp/u-boot-arm/spl/u-boot-spl >> > >> > I verified that --function-sections/-fdata-sections/--gc-sections are >> > being used on the SPL. It looks like strings are not getting dropped. >> > >> > If there's no way to fix this, this is going to be a big problem for the >> > existing users of nand_spl to migrate to the new SPL model, unless the >> > notion of "include a bunch of stuff and let gc-sections take care of it" >> > is dropped. >> >> I'll confirm gc-sections/etc are not as awesome as we think. You can >> drop the size of current SPL builds (for say devkit8000) by taking >> things that should be dropped for us and forcing them out with #ifndef >> CONFIG_SPL_BUILD. > > Maybe if we had those LTO tables at the gc-sections time, it'd drop. But we > can't rely on those. > > So instead of compiling in the nand-ids, it'd be better to allow SPL to pull > in > the whole NAND/MTD stack.
Possible, but without doing #Ifndef hacks, the size grows a good bit (don't have the #s handy right now), and with #ifndef hacks it's just a kb or so in growth. -- Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot