From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 28 May 2013 11:35:45 -0400 Subject: [U-Boot] dfu: dfu and UBI Volumes In-Reply-To: <20130528055503.B4BFB38116A@gemini.denx.de> References: <20130527090254.5071e4fd@amdc308.digital.local> <51A30B24.8080405@denx.de> <806D7741-02D5-4D95-9A66-E492ED30A4B1@antoniou-consulting.com> <51A30F34.7030603@denx.de> <20130527162551.65FFD380E6A@gemini.denx.de> <7E1B5EF8-454B-4AD4-A49F-D5752EA7036C@antoniou-consulting.com> <20130527204127.GY17119@bill-the-cat> <20130527212552.C08F2380E6A@gemini.denx.de> <51A427A8.8090709@denx.de> <20130528055503.B4BFB38116A@gemini.denx.de> Message-ID: <20130528153545.GD5829@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, May 28, 2013 at 07:55:03AM +0200, Wolfgang Denk wrote: > Dear Heiko, > > In message <51A427A8.8090709@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: