[U-Boot] dfu: bConfigurationValue=2 makes download from windows fail
Egli, Samuel
samuel.egli at siemens.com
Thu Jul 25 14:29:01 CEST 2013
Hi Lukasz
We found out that there is an issue with dfu implementation on the latest
U-Boot (v2013.07) when downloading from windows. From linux everything
works fine. I discussed this with Tormod on the dfu-util mailing list.
In short, I found out that when downloading with dfu-util in libusbx
in windows_usb.c at some point we have the comparison
"config_index >= dev->num_configurations" and which becomes
"1 >= 1"
and finally leads to return LIBUSB_ERROR_INVALID_PARAM.
This is because in U-Boot drivers/usb/gadget/g_dnl.c we have
LN 119: .bConfigurationValue = CONFIG_USBDOWNLOADER,
and CONFIG_USBDOWNLOADER = 2
So my question is why do we have CONFIG_USBDOWNLOADER = 2? In a previous
dfu implementation in U-Boot (v2011.09) bConfigurationValue was set
to 1. When setting CONFIG_USBDOWNLOADER to 1, dfu download works on windows
again.
Is there any reasons against setting CONFIG_USBDOWNLOADER = 1?
Of course this could be solved on linbusbx side. But I have the
impression that this should be fixed in U-Boot. I posted my
observations on the libusbx mailing list as well.
Here the logs that I posted there:
Log for dfu-util -a 1 -D MLO -v -v -v
Linux: http://pastebin.com/iq80kg0p -> ok
Win: http://pastebin.com/Ax7RDFHk -> fails
Log for lsusb on linux for the different u-boot versions
U-Boot v2011-09: http://pastebin.com/jeC01WxQ
U-Boot v2013-07: http://pastebin.com/mvNLkUAs
Best
Sam
More information about the U-Boot
mailing list