[U-Boot] How to Remove the padding bits from u-boot.bin

Jerry Van Baren gerald.vanbaren at ge.com
Wed Mar 4 13:41:44 CET 2009


kuldeep nigam wrote:
> Hi All,
>         I am using MIP405T board and trying to reduce the size of u-boot.bin
> by disabling the drivers that i didn't need. But the image size is not
> changing because it is padding all 1's at the end of the image. Can anyone
> tell me how to remove these padding bits.
> 
> Image size is 512 K
> Actual image size is 207 K (approx.)
> u-boot version is 1.3.2
> 
> Hexdump of u-boot.bin is as follows:
> 
> 00337d0 0000 0200 0000 0100 f9ff a8d0 faff 78f8
> 00337e0 faff 90f8 faff acf8 0000 1000 0000 0100
> 00337f0 f9ff 68ce faff b4f8 faff d4f8 faff 04fa
> 0033800 0000 1000 0000 0100 f9ff 68ce faff 08fa
> 0033810 0000 0000 ffff ffff ffff ffff ffff ffff
> 0033820 ffff ffff ffff ffff ffff ffff ffff ffff
> *
> 007fff0 ffff ffff ffff ffff ffff ffff f84b 0421
> 0080000
> 
> 
> 
> with regards,
> kuldeep nigam

Hi kuldeep nigam,

I think you want to change CONFIG_SYS_MONITOR_LEN in your 
configs/board/*.h board config file.  Based on the numbers above, you 
should be able to reduce it to 256K.
  * You want it to be a multiple of a flash sector in size.
  * Your environment is probably stored in the next flash sector.
  * The change doesn't actually change the size of u-boot, it just
      changes the amount of padding in the .bin file.

The README file could probably stand some tuning.
<http://git.denx.de/?p=u-boot.git;a=blob;f=README;h=43fb1c0d8959b515c62e612280a0ba538d2921ce;hb=HEAD#l2144>

Best regards,
gvb


More information about the U-Boot mailing list