From: Wolfgang Denk Date: Sat, 12 Jun 2004 01:10:05 +0200 Subject: [U-Boot-Users] How to reduce the size of u-boot image file In-Reply-To: Your message of "Fri, 11 Jun 2004 18:45:58 EDT." Message-ID: <1Batob-0jRC3U0@fmrl00.sul.t-online.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message you wrote: > > If I don't change anything, then I got a u-boot as big as 716,334 bytes. The The ELF file, ok. This doesn't matter at all. > u-boot.bin is about 500K if I don't change the TEXT_BASE in Not "about 500K". It's EXACTLY 512 kB, as TEXT_BASE = 0xFFF80000, which is 512 kB below the top of [32 bit] address space.. > 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? Move TEXT_BASE up. Or exclude .resetvec from your linker script (but make sure to have a valid reset vector installed). > 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 Why do you have to do this? > I don't think this change will affact the size of the image. Am I right? Yes. But I think you really should try to understand the structure of such an image, and that it includes a huge "gap" between the real u-boot image (starting at TEXT_BASE) and the reset vector (at 0xFFFFFFFC). Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Remember, there's a big difference between kneeling down and bending over. - Frank Zappa