RE: Loading firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Does something like this help:
> 
> <some test to determine your device>, ACTION="add", RUN+="/sbin/fxload
>  -D /dev/$name"
> 
> Where $name points to the device name and will be set earlier by the
> default rules.

It didn't work. The $name that I get is in the form of usbdev1.8_ep00 still. However, I tried the following

BUS=="usb", ACTION=="add", <...etc...> , ENV{devpath}="$attr{busnum}/$attr{devnum}"
RUN+="/sbin/fxload -I /lib/firmware/foo.hex -D /dev/bus/usb/$env{devpath}"

Only that $devpath evaluates to 1/8 or 10/7, but the number must always be 3 digits with zeros filling the leading digits, e.g.

/dev/bus/usb/001/008 or /dev/bus/usb/010/007

I have no idea how to do this in the rules files without calling an external script.

Regards,
Jasem



--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux