public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] mtd: nand: oob data structures taking up a lot of space
Date: Tue, 17 Dec 2013 22:02:39 -0600	[thread overview]
Message-ID: <1387339359.3140.46.camel@snotra.buserror.net> (raw)
In-Reply-To: <52ABE882.2010805@caviumnetworks.com>

On Fri, 2013-12-13 at 21:11 -0800, Aaron Williams wrote:
> Hi all,
> 
> I am working on trying to shrink down a bootloader for one of our chips 
> where the bootloader must fit in around 448K of memory and things are 
> fairly tight. I found that the oob data structures for 8, 16, 64 and 128 
> bytes were taking up a fair amount of space. I had to increase the 
> eccpos size to 640 to match the Linux kernel since the existing size was 
> too small for some of the NAND devices we are working with.

This increase has already been done in top-of-tree U-Boot.

Note that (again with top-of-tree) you can override with a lower limit
to exactly match what your board requires.

> This caused each oob data structure to consume around 2.5K in the binary. By 
> initializing the layout data structures at runtime I was able to 
> eliminate most of the space taken since now the linker can place these 
> in BSS.

Yes, there's a lot of bloat in the NAND code -- both code and data --
that we could know at compile time is not going to get used for a
particular target.  Patches welcome.

-Scott

      reply	other threads:[~2013-12-18  4:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14  5:11 [U-Boot] mtd: nand: oob data structures taking up a lot of space Aaron Williams
2013-12-18  4:02 ` Scott Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387339359.3140.46.camel@snotra.buserror.net \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox