[U-Boot] [PULL] u-boot-usb/master

Stefan Schmidt stefan at datenfreihafen.org
Fri Dec 21 19:55:19 CET 2012


Hello.

On Tue, 2012-12-18 at 12:25, Lukasz Majewski wrote:
> 
> > Can you paste the log of your dfu-util session? Are you supplying a
> > transfer size for example?
> > 
> > Regards
> 
> u-boot-denx/master (denx.de) repository
> 
> SHA1: fd4d564b3c80b111f18c93adb14233a6a7ddb0e9
> 
> (without Pantelis patches)
> 
> dfu-util version 0.7 (not working):
> 
> lukma at amdc308:~/work/u-boot-denx(master)$ ../dfu-util/src/dfu-util -V
> -v -t 0x1000 -a0 -D u-boot.bin dfu-util 0.7
> 
> Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
> Copyright 2010-2012 Tormod Volden and Stefan Schmidt
> This program is Free Software and has ABSOLUTELY NO WARRANTY
> Please report bugs to dfu-util at lists.gnumonks.org
> 
> Opening DFU capable USB device... ID 04e8:6601
> Did not find cached descriptor
> WARNING: Can not find cached DFU functional descriptor
> Warning: Assuming DFU version 1.0
> Run-time device DFU version 0100
> Found DFU: [04e8:6601] devnum=0, cfg=2, intf=0, alt=0, name="u-boot"
> Claiming USB DFU Interface...
> Setting Alternate Setting #0 ...
> Determining device status: state = dfuIDLE, status = 0
> dfuIDLE, continuing
> Did not find cached descriptor
> Error obtaining cached DFU functional descriptor
> Error obtaining DFU functional descriptor
> Please report this as a bug!
> Warning: Assuming DFU version 1.0
> Warning: Transfer size can not be detected
> DFU mode device DFU version 0100
> Error: Transfer size must be specified
> 
> Broken.
> 
> dfu-util version.  0.1+svnexported (available at debian repository
> (0.0+r4067-3.1))
> 
> lukma at amdc308:~/work/u-boot-denx(master)$ dfu-util -v -t 0x1000 -a0 -D
> u-boot.bin dfu-util - (C) 2007 by OpenMoko Inc.
> This program is Free Software and has ABSOLUTELY NO WARRANTY
> 
> Opening USB Device 0x0000:0x0000...
> Found Runtime: [0x04e8:0x6601] devnum=77, cfg=0, intf=0, alt=0,
> name="u-boot" Claiming USB DFU Interface...
> Setting Alternate Setting ...
> Determining device status: state = dfuIDLE, status = 0
> dfuIDLE, continuing
> Error obtaining DFU functional descriptor: error sending control
> message: Broken pipe Transfer Size = 0x1000
> bytes_per_hash=5591
> Starting download: [##################################################]
> finished! state(2) = dfuIDLE, status(0) = No error condition is present
> Done!
> 
> WORKS.
> 
> Ok, so world has went forward..... And I've left behind :-/. 
> 
> 
> With Pantelis Patches: 
> 
> lukma at amdc308:~/work/u-boot-denx(NEW_DFU)$ ../dfu-util/src/dfu-util -V
> -v -t 0x1000 -a0 -D u-boot.bin dfu-util 0.7
> 
> Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
> Copyright 2010-2012 Tormod Volden and Stefan Schmidt
> This program is Free Software and has ABSOLUTELY NO WARRANTY
> Please report bugs to dfu-util at lists.gnumonks.org
> 
> Opening DFU capable USB device... ID 04e8:6601
> Did not find cached descriptor
> WARNING: Can not find cached DFU functional descriptor
> Warning: Assuming DFU version 1.0
> Run-time device DFU version 0100
> Claiming USB DFU Runtime Interface...
> Determining device status: state = appIDLE, status = 0
> Device really in Runtime Mode, send DFU detach request...
> Resetting USB...
> Opening DFU USB Device...
> Found DFU: [04e8:6601] devnum=0, cfg=2, intf=0, alt=0, name="u-boot"
> Claiming USB DFU Interface...
> Setting Alternate Setting #0 ...
> Determining device status: state = dfuIDLE, status = 0
> dfuIDLE, continuing
> Did not find cached descriptor
> Error obtaining cached DFU functional descriptor
> DFU mode device DFU version 0110
> Device returned transfer size 4096
> No valid DFU suffix signature
> Warning: File has no DFU suffix
> bytes_per_hash=6280
> Copying data from PC to DFU device
> Starting download: [##################################################]
> finished! Sent a total of 314004 bytes
> state(2) = dfuIDLE, status(0) = No error condition is present
> Done!
> 
> 
> Ok, so it seems to work (CRC is correct, system boots). The reason
> of the turmoil from my side was the VERY OLD version of dfu-utils,
> which I've used for testing. 


Indeed that was the problem. We changed quite a bit in dfu-util to get
the actual informations from the USB functional descriptor. And it
seems that was not provided correctly from the u-boot DFU
implementation before. Good to have that fixed.

We are really careful not to introduce regressions when going forward
with dfu-util but some stuff is just way to problematic to keep when
moving on.

I wonder where you actually got such an old version of dfu-util. We
work together with packagers to get new versions in all recent
distros. Might be worth to fill a bug about updting it for yours.

regards
Stefan Schmidt


More information about the U-Boot mailing list