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] Size of external u-boot commands
Date: Thu, 26 Mar 2009 09:52:39 -0400	[thread overview]
Message-ID: <49CB88A7.7040407@ge.com> (raw)
In-Reply-To: <9e4733910903260647w549a97acv7101ea9347a767bb@mail.gmail.com>

Jon Smirl wrote:
> My networking hardware needs microcode loaded into it before it will
> function. What's the best method to load this code? It's 70KB.
> 
> My current u-boot image is 170KB. I started working with the code in
> examples and api_examples. But the "hello world" programs built using
> those APIs are 65-72KB in size.  That's almost half the size of my
> u-boot image and these programs just print "hello world". Why are
> these programs so big? My goal was to put the loader program and my
> microcode into a single 128KB erase block.
> 
> My code for loading the microcode into the hardware is 7KB. Now it
> looks like I will need to incorporate it into the main u-boot image
> instead of making it an external command.

Hi Jon,

I suspect the example code is 98% C libraries and 2% nugget.  In your 
example, "hello world" probably uses the whole printf support tree 
(strings, formatted printing, possibly floating point...).

I would suggest you make a stand-alone application that simply returns 
and see how big it ends up.  Depending on whether that is small or not, 
check what libraries get linked with it and see how to create your 
simple test app such that it doesn't use any extraneous libraries.

HTH,
gvb

  reply	other threads:[~2009-03-26 13:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 13:47 [U-Boot] Size of external u-boot commands Jon Smirl
2009-03-26 13:52 ` Jerry Van Baren [this message]
2009-03-26 14:21   ` Jon Smirl
2009-03-26 14:37     ` Jerry Van Baren
2009-03-26 14:43     ` Rafal Jaworowski
2009-03-26 15:06       ` Jon Smirl
2009-03-26 15:10         ` Jon Smirl
2009-03-26 16:40           ` Jon Smirl
2009-03-26 15:21 ` Mike Frysinger
2009-03-26 20:27 ` Wolfgang Denk
2009-03-26 20:50   ` Jon Smirl
2009-03-26 21:15     ` Wolfgang Denk
2009-03-26 21:35       ` Jon Smirl
2009-03-26 23:26         ` Wolfgang Denk
2009-03-27  1:34           ` Jon Smirl
2009-03-27 10:37             ` Detlev Zundel
2009-03-27 10:57               ` Wolfgang Denk
2009-03-27 11:17                 ` Detlev Zundel
2009-03-27 12:47                   ` Jon Smirl
2009-03-27 15:54                     ` Mike Frysinger

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=49CB88A7.7040407@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.