[U-Boot] Size of external u-boot commands

Wolfgang Denk wd at denx.de
Thu Mar 26 21:27:54 CET 2009


Dear Jon Smirl,

In message <9e4733910903260647w549a97acv7101ea9347a767bb at mail.gmail.com> you 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.

I'm  not  sure  how  you  calcualte  sizes,  or  how  you  link  your
applications.  Note that classical standalone application do not link
against any libraries, so they are really small:

-> size examples/{hello_world,timer}
   text    data     bss     dec     hex filename
    796      40       0     836     344 examples/hello_world
   1556      56       0    1612     64c examples/timer

As you can see, the "hello world" demo program just needs a few
hundret bytes.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The computer can't tell you the emotional story. It can give you  the
exact mathematical design, but what's missing is the eyebrows.
- Frank Zappa


More information about the U-Boot mailing list