public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] How to Remove the padding bits from u-boot.bin
@ 2009-03-04  5:22 kuldeep nigam
  2009-03-04 12:40 ` Anatolij Gustschin
  2009-03-04 12:41 ` Jerry Van Baren
  0 siblings, 2 replies; 3+ messages in thread
From: kuldeep nigam @ 2009-03-04  5:22 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] How to Remove the padding bits from u-boot.bin
  2009-03-04  5:22 [U-Boot] How to Remove the padding bits from u-boot.bin kuldeep nigam
@ 2009-03-04 12:40 ` Anatolij Gustschin
  2009-03-04 12:41 ` Jerry Van Baren
  1 sibling, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2009-03-04 12:40 UTC (permalink / raw)
  To: u-boot

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.

try to change CONFIG_SYS_FLASH_BASE and CONFIG_SYS_MONITOR_LEN in
the board config file:

#define CONFIG_SYS_FLASH_BASE	0xFFFC0000
#define CONFIG_SYS_MONITOR_LEN	(256 * 1024)

Best regards,
Anatolij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] How to Remove the padding bits from u-boot.bin
  2009-03-04  5:22 [U-Boot] How to Remove the padding bits from u-boot.bin kuldeep nigam
  2009-03-04 12:40 ` Anatolij Gustschin
@ 2009-03-04 12:41 ` Jerry Van Baren
  1 sibling, 0 replies; 3+ messages in thread
From: Jerry Van Baren @ 2009-03-04 12:41 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-04 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04  5:22 [U-Boot] How to Remove the padding bits from u-boot.bin kuldeep nigam
2009-03-04 12:40 ` Anatolij Gustschin
2009-03-04 12:41 ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox