[U-Boot] [PATCH] NAND: Allow nand_ids and nand_bbt to be compiled in SPL
Scott Wood
scottwood at freescale.com
Thu Jan 5 00:56:23 CET 2012
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.vasut at gmail.com>
> Cc: Scott Wood <scottwood at 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.
-Scott
More information about the U-Boot
mailing list