All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Some question about uboot
Date: Tue, 24 Feb 2009 07:41:54 -0500	[thread overview]
Message-ID: <49A3EB12.7000208@ge.com> (raw)
In-Reply-To: <3a665c760902232249k4c0010f1jdc4a5001c2a10694@mail.gmail.com>

loody wrote:
> Dear all:
> While porting uboot, I find there are too many things I don't need at
> all, like net, i2c etc.
> How could I remove them from my uboot binary to minimize the size of
> uboot, my flash limitation is 6k?

If 6K is truly what you have, you aren't going to get there with u-boot. 
  I don't know what the current minimum config results in (and it will 
vary depending on processor and the definition of "minimum"), but rule 
of thumb is that 128K is a fairly tight u-boot; under 128K and you will 
be cutting deeply.  It may be possible to get it under 64K with a lot of 
work, but it may be easier to start with a different code base or start 
from scratch.

Can you do a two level bootstrap where you have a 6K minimal bootstrap 
program that loads u-boot from somewhere else that has 128K-256K 
available?  Note that this is what NAND-booting systems (e.g. ARM) do - 
the NAND first stage boot fits in 4K, the rest gets copied from NAND to 
RAM and then run in RAM.

> I try to edit Makefile to remove them by marking some library setting,
> but it compile error after I doing so.

Libraries are crack cocaine to programmers.  Once you use them, it is 
really hard to give them up.  :-)

> Is there any easier way to meet my requirement?

Sorry, unless there is a really significant typo in your original email, 
u-boot has way too much functionality for your constraints.  I don't 
know what the alternatives are (there are some), but you are looking at 
a very tight boot ROM probably written mostly/entirely in assembly or 
very constrained C (no libraries, very tightly written, max optimization).

> Appreciate your help,
> miloody

Good luck,
gvb

  parent reply	other threads:[~2009-02-24 12:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  6:49 [U-Boot] Some question about uboot loody
2009-02-24  6:56 ` Aggrwal Poonam-B10812
2009-02-24 12:41 ` Jerry Van Baren [this message]
2009-02-24 13:21   ` loody
2009-02-24 15:40     ` Wolfgang Denk

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=49A3EB12.7000208@ge.com \
    --to=gerald.vanbaren@ge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.