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

Lukasz Majewski l.majewski at samsung.com
Thu Mar 14 09:22:11 CET 2013


Hi Tom,

> 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.
> 

Ok, lets first fix the download (with yours patch series).

The DFU read can be fixed later, for example after Marek sends pull
request for u-boot-usb branch.

Anyway thanks for looking into the problem.

-- 
Best regards,

Lukasz Majewski

Samsung R&D Poland (SRPOL) | Linux Platform Group


More information about the U-Boot mailing list