[U-Boot] [PATCH v5 2/9] dfu: Support larger than memory transfers.

Tom Rini trini at ti.com
Wed Mar 13 20:57:03 CET 2013


On Wed, Mar 13, 2013 at 11:25:42AM -0400, Tom Rini wrote:

> On Mon, Mar 11, 2013 at 11:03:41AM +0100, Lukasz Majewski wrote:
> 
> [snip]
> > > > -	if (blk_seq_num == 0) {
> > > > -		i_buf = dfu_buf;
> > > > -		ret = dfu->read_medium(dfu, i_buf, &r_size);
> > > > -		debug("%s: %s %ld [B]\n", __func__, dfu->name,
> > > > r_size);
> > > > -		i_blk_seq_num = 0;
> > > > -		/* Integrity check (if needed) */
> > > > -		crc = crc32(0, dfu_buf, r_size);
> > > > +	       __func__, dfu->name, buf, size, blk_seq_num,
> > > > dfu->i_buf); +
> > > > +	if (!dfu->inited) {
> > > > +		ret = dfu->read_medium(dfu, 0, NULL, &dfu->r_left);
> > 			   ^^^^^^^^^^^^ this call causes read error. I
> > 			   suppose, that it is an initial "read". Does
> > 			   it read the whole file at once?
> > 
> > 		The problem is that the command is fromatted in a
> > 		wrong way. 
> 
> And we're also passing NULL as the buffer to read into?  That also can't
> be good.  I'll spend a little time here and see what's going on.

OK, I see and have fixed some minor issues here, but without any of
these patches, I'm not seeing DFU read work at all for raw.  I keep
getting "Wrong sequence number!" errors on the U-Boot side.  Using
dfu-util 0.5 from Ubuntu 12.04 still.  I'm inclined to push back and
say, after fixing a few calls now that I re-read my code, DFU read is
broken and set that aside as another problem to get fixed.

-- 
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/20130313/f9ddaa89/attachment.pgp>


More information about the U-Boot mailing list