[U-Boot] Size of external u-boot commands
Jerry Van Baren
gerald.vanbaren at ge.com
Thu Mar 26 14:52:39 CET 2009
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
More information about the U-Boot
mailing list