From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 29 May 2013 08:09:33 -0400 Subject: [U-Boot] dfu: dfu and UBI Volumes In-Reply-To: <51A5858F.6080107@denx.de> References: <20130527212552.C08F2380E6A@gemini.denx.de> <20130527233735.GZ17119@bill-the-cat> <20130528055046.4258C38116A@gemini.denx.de> <20130528150159.GC5829@bill-the-cat> <53FA5D9D-DA5D-409C-A262-0427569C250C@antoniou-consulting.com> <1905526685.1261642.1369758701313.JavaMail.root@advansee.com> <20130528172309.GF5829@bill-the-cat> <20130528210109.1CC2B3831A2@gemini.denx.de> <20130528211641.GD11917@bill-the-cat> <51A5858F.6080107@denx.de> Message-ID: <20130529120933.GE11917@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 Wed, May 29, 2013 at 06:35:27AM +0200, Heiko Schocher wrote: > Hello Tom, > > Am 28.05.2013 23:16, schrieb Tom Rini: > > On Tue, May 28, 2013 at 11:01:09PM +0200, Wolfgang Denk wrote: > >> Dear Tom, > >> > >> In message <20130528172309.GF5829@bill-the-cat> you wrote: > >>> > >>>> Of course this can't yet apply to writing files on file systems since the > >>>> current API in U-Boot misses the append feature, but this could be applied to > >>>> program raw memory partitions, including UBI images. > >>> > >>> Correct. We can write a whole UBI image, today, of NAND size, > >>> regardless of DDR size. But modifying UBI volumes (so UBIFS or your > >> > >> I don't think so. To write a UBI volume on an existing UBI device, > >> you would use the "ubi write" command. This translates into a call of > >> ubi_volume_write(char *volume, void *buf, size_t size) which means > >> the size must be known before you start writing; as far as I can tell > >> ubi_volume_write() does not support incremental write operations of > >> individual "parts" of a volume. > > > > OK. A very quick read of ubi_volume_write leads into the guts of the > > write being in drivers/mtd/ubi/upd.c and it feels like you could > > actually do the volume write in chunks with ubi_start_update() and > > ubi_more_update_data() (and maybe some other housekeeping bits). It > > might take a bit more work since it looks like looks like both functions > > rely on knowing the size at the start, but that's just to make sure the > > size will fit in the volume. > > Yes, I think so too ... seems some work, but not unsolveable ... > > Hmm.. is it possible to get the filesize over dfu on startup? (I hope > so, as it makes no sense to transfer a file, if it does not fit in the > partition ... ) There is not, but that's OK. Even if you think you had the room for the whole image you could find a new bad block and not fit, so it's just behaving like when we do a raw NAND write, get the data chunk, make sure we think we still have room, write if we do, error if we don't. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: