[U-Boot] dfu: dfu and UBI Volumes
Tom Rini
trini at ti.com
Tue May 28 17:35:45 CEST 2013
On Tue, May 28, 2013 at 07:55:03AM +0200, Wolfgang Denk wrote:
> Dear Heiko,
>
> In message <51A427A8.8090709 at denx.de> you wrote:
> >
> > > Where exactly is this 8 MB limit coming into play?
> >
> > You find this in drivers/dfu/dfu.c:
> >
> > static unsigned char __aligned(CONFIG_SYS_CACHELINE_SIZE)
> > dfu_buf[DFU_DATA_BUF_SIZE];
>
> Ah, so it is a DFU restriction!
[snip]
> > drivers/dfu/dfu_mmc.c use (another?, why?) buffer:
> >
> > static unsigned char __aligned(CONFIG_SYS_CACHELINE_SIZE)
> > dfu_file_buf[CONFIG_SYS_DFU_MAX_FILE_SIZE];
> ...
> > and use this buffer for not raw partitions ... and this buffer
> > gets flushed, only if the complete file is transfered, as the
> > README states:
> >
> > CONFIG_SYS_DFU_MAX_FILE_SIZE
> > When updating files rather than the raw storage device,
> > we use a static buffer to copy the file into and then write
> > the buffer once we've been given the whole file. Define
> > this to the maximum filesize (in bytes) for the buffer.
> > Default is 4 MiB if undefined.
>
> This makes very little sense to me. Why do we need another (and even
> smaller) buffer when we already have one?
Per my other email, the intention and implementation didn't quite
match-up. The intent of the README should be (but isn't) reflected) in
the code. And perhaps we can come up with something better than a big
static allocation. Perhaps.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130528/9ead52ad/attachment.pgp>
More information about the U-Boot
mailing list