public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] max gunzip output buffer size in do_bootm()
@ 2006-01-24 16:28 Matthias Fuchs
  2006-01-24 17:32 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Fuchs @ 2006-01-24 16:28 UTC (permalink / raw)
  To: u-boot

Hi,

I ran into trouble when booting huge compressed images via bootm.
do_bootm uses a fixed maximum size for the uncompressed data of 0x400000 
bytes. That's not enough for our images (about uncompressed 9MB VxWorks 
image).

Is there any reason for the 4MB limiting? I'd like to post a patch that 
fixes this issue:

a) just increase the unc_len variable to e.g. 16MB
b) add a define with default to board config file 
(CONFIG_MAX_BOOTM_UNC_LEN). When not defined in config file, 0x400000 is 
used
c) set unc_len to mem size :-) So user must know what he is doing.

What do you like best?

BTW: When the uncompressed data is more than the unc_len limit no error 
is reported. The uncompressed data is just truncated leading to 
corrupted uncompressed data. Should that be fixed, too?

Regards
Matthias

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

* [U-Boot-Users] max gunzip output buffer size in do_bootm()
  2006-01-24 16:28 [U-Boot-Users] max gunzip output buffer size in do_bootm() Matthias Fuchs
@ 2006-01-24 17:32 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2006-01-24 17:32 UTC (permalink / raw)
  To: u-boot

In message <43D655B2.6070204@esd-electronics.com> you wrote:
> 
> I ran into trouble when booting huge compressed images via bootm.
> do_bootm uses a fixed maximum size for the uncompressed data of 0x400000 
> bytes. That's not enough for our images (about uncompressed 9MB VxWorks 
> image).

That's a built-in reminder that  the  time  has  come  to  port  your
applications to Linux :-)

> Is there any reason for the 4MB limiting? I'd like to post a patch that 

As usual: hysteric reasons. There was a  time  when  nobody  imagined
that  a  Linux  kernel image would exceed that size (and at this time
Linux was all what we were concerned about). Given the size explosion
with 2.6 I fear that the 4 MB might not be enough for Linux any  more
soon, too :-(

> a) just increase the unc_len variable to e.g. 16MB
> b) add a define with default to board config file 
> (CONFIG_MAX_BOOTM_UNC_LEN). When not defined in config file, 0x400000 is 
> used
> c) set unc_len to mem size :-) So user must know what he is doing.
> 
> What do you like best?

Looking at the gunzip() code I'm not sure we need this at all.

> BTW: When the uncompressed data is more than the unc_len limit no error 
> is reported. The uncompressed data is just truncated leading to 
> corrupted uncompressed data. Should that be fixed, too?

Maybe we should just get  rid  of  this  and  assume  that  there  is
sufficient space to uncompress the image.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Egotist: A person of low taste, more interested in  himself  than  in
me.                                                  - Ambrose Bierce

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

end of thread, other threads:[~2006-01-24 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-24 16:28 [U-Boot-Users] max gunzip output buffer size in do_bootm() Matthias Fuchs
2006-01-24 17:32 ` Wolfgang Denk

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