[U-Boot-Users] How to reduce the size of u-boot image file

Frank Young young726 at hotmail.com
Sat Jun 12 00:45:58 CEST 2004


Hi Wolfgang,

>in message <BAY2-F84Hoouifm0Sx700057af6 at hotmail.com> you wrote:
> >
> > 1. Because of the size of the flash memory constraint, I need to strip 
>the
> > u-boot to its minimum size. Right now by executing "make all" in the 
>u-boot
> > directory, I got a image file u-boot at around 700K-800K. It's too big 
>for
>
>You must be joking. I haven't seen any configuration yet which exceeds 256 
>kB.
>
>Did you by any chance look at the ELF file  which  includes  all  the
>hewaders, symbol tables, debug informnation etc.?
>
>Forget about this one. How big is your u-boot.bin file?
>
No kidding at all. I am extremely serious about this.

If I don't change anything, then I got a u-boot as big as 716,334 bytes. The 
u-boot.bin is about 500K if I don't change the TEXT_BASE in 
board/walnut/config.mk. If I change the CONFIG_COMMANDS to default value, it 
is reduced to 576,931. But how would you get it less than 256KB?

The command I used to build u-boot is very simple:
make distclean
make WALNUT405_config
make all

But before that I have to change a line in examples/Makefile
$(OBJCOPY) -O binary $< $@ 2>/dev/null

to:
$(OBJCOPY) -O binary $<:.srec=) $@ 2>/dev/null

I don't think this change will affact the size of the image. Am I right?





> > my target. So I am thinking about getting rid of some functionalities 
>which
> > u-boot provides. I do need u-boot to initialize my hardware. But after 
>that,
> > I only need to use tftp to get the linux image, decompress the image, 
>put
> > the decompressed image in RAM and jump to the linux entry point to let 
>the
> > linux take over the control. Is there any FAQ or manual explaining how 
>to
> > strip down the u-boot size?
>
>Yes. The README explains how to enable or disable commands or command 
>groups.
>
Got it. Thanks!


> > 2. Since my flash memory address starts from 0xFFC00020 instead of
>
>Please check again. I think it is IMPOSSIBLE to have  a  flash  start
>address of 0xFFC00020. I guess you mean 0xFFC00000 ?

Yes, you are right, the flash begins from 0xFFC00000. But I need to reserve 
the first 0x20 for my special purpose, so the available flash is from 
0xFFC00020. Can u-boot be aligned from this address?


Thanks!

Frank

_________________________________________________________________
Watch the online reality show Mixed Messages with a friend and enter to win 
a trip to NY 
http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/





More information about the U-Boot mailing list