Hi Jerry: 2009/2/24 Jerry Van Baren <gerald.vanba...@ge.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. Thanks for your kind suggestion. If I only need uboot to do cpu basic setting with USB ehci and file system support, does it still need 128k at least? As you suggest, I can do the 2 levels bootstrap. But uboot has great features support. I am not sure it will be easier to make another wheel.
> 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). Would you please tell me how to add a new cpu and platform in uBoot? I know the first step I have to do is adding my cpu and platform folder. But I have no idea how to add setting in Makefile. why sometimes we use "@$(MKCONFIG) $(@:_config=)" ,sometimes we use "@$(MKCONFIG) -a" and sometimes we have to " @mkdir -p $(obj)include" before calling mkconfig? I try to modify platform.h located at include/configs to remove unnecessary driver. But I have no idea which one I can remove such that the unnecessary driver will no compile my uboot. for example, I remove "CONFIG_DRIVER_CS8900" in smdk2410.h, and the error message while linking is "net/libnet.a(net.o): In function `NetSendPacket': /media/u-boot_20090224_snapshot/net/net.c:654: undefined reference to `eth_send'" Appreciate your kind help, miloody I I want to add my cpu and platform and find out where the bottle net is. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot