From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Wed, 04 Mar 2009 07:41:44 -0500 Subject: [U-Boot] How to Remove the padding bits from u-boot.bin In-Reply-To: <5ae31d3b0903032122t7e689978j2d6ba0a14314efa0@mail.gmail.com> References: <5ae31d3b0903032122t7e689978j2d6ba0a14314efa0@mail.gmail.com> Message-ID: <49AE7708.9040205@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. Best regards, gvb