From: Wolfgang Denk Date: Tue, 28 May 2013 07:55:03 +0200 Subject: [U-Boot] dfu: dfu and UBI Volumes In-Reply-To: <51A427A8.8090709@denx.de> References: <519F97CA.4060901@denx.de> <6AD958CB-3CFC-4362-B72D-511147D041AC@antoniou-consulting.com> <20130524171213.GT17119@bill-the-cat> <51A1B522.2050405@denx.de> <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> Message-ID: <20130528055503.B4BFB38116A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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! Well, this is a design problem that needs to be fixed. > As I read in code: Raw nand partitions fill the above buffer, if > it is full -> flush to nand, and go on ... so no limit for them. So this boils down to the question whether there is some "incremental ubi write" method. Hello UBI experts? > 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? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "We don't have to protect the environment -- the Second Coming is at hand." - James Watt