DFU u-boot patch with beagleboard-xM support

Hi all,

I've been working on loading images into RAM using DFU on the
BeagleBoard-xM. It seemed that there were several bitrotting patches
around. I've merged the best of each into something that works for
me for loading images into RAM on the -xM (but flash support is
broken and untested).

For posterity, attached is a patch against u-boot releases 2010.12
and 2011.03-rc1 (applies to either). It's still not in a clean
enough state for merging into u-boot, but I thought this list may
appreciate it.

I've had to revert to an older version of the musb_udc driver to get
it working, as the one in mainline u-boot seems to have a broken
state machine (which I was able to fix), and did not support High
Speed gadget mode (which I couldn't easily fix).

Thanks also go to Matthew Warton at OK Labs.


u-boot-2010.12-beagle-dfu.diff.gz (25.6 KB)

Hi Bernard,

  I tried your patch and it tries to work but just hangs at the
download stage. On the host side I get:

Hi Rick,

Rhe warning message about dfu-util should be nothing to worry about. FTR, I've used the dfu-util that comes with both Ubuntu Maverick (10.10) and Debian Lenny (5.0).

Can you try dropping the transfer size down by passing -t 0x40 to dfu-util? Try powers of two between 32 (0x20) and 4096 (0x1000). It might be that your USB host controller or driver has issues with larger frames on EP0.

Or it may be a broken build - I've uploaded the u-boot.bin I am using (on an SD card) to http://bernard.largestprime.net/tmp/beaglexm-dfu-u-boot.bin


Rick and I resolved this issue off-list. It turns out that the patch
did not correctly populate one of the fields used by newer versions
of dfu-util (specifically, bwPollTimeout). This version fixes it.

New version attached.

Tangentially related - an extra patch to dfu-util improves download
speed from ~450KB/s to ~2 MB/s:


u-boot-2010.12-beagle-dfu3.diff.gz (25.8 KB)