List Info

Thread: dfu-util with USB physical location support




dfu-util with USB physical location support
user name
2007-10-07 04:07:21
Hi Harald,

I've now extended u-boot to accept physical device paths as
a
selection criteron. Usage:

dfu-util -p 1+0+2

This would select bus 1, then port 0 of the root hub, and
then
port 2 of the hub placed there.

Prerequisite: libusbpath must be installed. To ease
transition,
I've made the use of libusbpath conditional for now.

To determine the path to a device, do this:

- lsusb   to find out bus and device number
- usbpath bus/devnum   to translate this to a path

E.g.,
# lsusb
...
Bus 001 Device 025: ID 1457:511a  
...
# usbpath 1/25
1+0
# dfu-util -p 1+0 ...

usbpath (which also provides libusbpath) is in
http:
//svn.openmoko.org/trunk/src/host/usbpath/

svn diff is attached. Since the search logic has now gotten
more
complex, I've merged the almost identical code of
get_first_dfu_device and count_dfu_devices into a new
function
iterate_dfu_devices that uses a callback to decide what to
do.

Okay to commit ?

- Werner

  
Re: dfu-util with USB physical location support
user name
2007-10-07 14:29:02
I wrote:
> dfu-util -p 1+0+2

With the latest libusbpath from SVN, this would now be
1-1.3
(just like in sysfs).

Updated dfu-util patch:
http://svn.openmoko.org/developers/werner/dfu-util
-r3103.patch

- Werner


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )