Re: [Fx2lib-devel] Using FXLOAD with udev on SUSE
Status: Beta
Brought to you by:
mulicheng
From: Eric W. <er...@wi...> - 2009-03-02 22:16:16
|
Dennis Muhlestein wrote: > Eric Winsor wrote: > >> Hi, >> >> I'm trying to write a udev rule but I get the following error when I >> test it: >> linux-b1xe:~ # udevadm test /sys/bus/usb/2-1 >> >> parse_file: reading '/etc/udev/rules.d/10-evw.rules' as rules file >> add_to_rules: invalid rule '/etc/udev/rules.d/10-evw.rules:4' >> >> The fist three lines of 10-evw.rules are comments, the fourth line is my >> rule and is (in one line): >> >> RUN+="/sbin/fxload/ -t fx2 -D /proc/bus/usb/002/033 -I >> /usr/share/RCU_02.hex" >> DRIVER==”usb”, RUN+="/sbin/fxload/ -t fx2 -D /proc/bus/usb/002/033 -I >> /usr/share/RCU_02.hex" >> >> > I don't use the RUN command in my udev rule. I just use ATTRS and MODE > to allow all users to use the device. > SUBSYSTEM=="usb", ATTRS{idVendor}=="<my vendor id>", MODE="0666" > So Assuming your RUN command is not the problem, perhaps you need > SUBSYSTEM instead of DRIVER. > > As for the RUN command, is it /sbin/fxload/ with a trailing slash? > > I'm working in Fedora though, I don't know if the UDEV rules have > differences from platform to platform. > > -Dennis > I hadn't noticed the trailing slash, thanks, that would have been a problem later, but not the source of my problem currently. Here is my rule at the moment: SUBSYSTEM==”usb”, ATTRS{idVendor}==”04b4”, ATTRS{idProduct}==”0082", RUN+="/sbin/fxload -t fx2 -D /proc/bus/usb/002/004 -I /usr/share/RCU_02.hex" Changing to SUBSYSTEM did not have an effect. I also tried the ATTRS as ATTR to match the udevinfo query. I'm trying to get fxload to load my firmware to my development board. Hence I want udev to catch the VID and PID then run fxload. I have read a few complaints through google searches that the SUSE udev act different, but no one explains how it is different. The SUSE documentation points to the kernel.org udev documentation, so things should not be different. For grins I also tried: SUBSYSTEM==”usb”, ATTRS{idVendor}==”04b4”, ATTRS{idProduct}==”0082", MODE="0666" Which lends be to believe the RUN command is not the issue. Eric >> Querying the device to get my attributes gives me: >> >> linux-b1xe:~ # udevinfo -a -p /sys/bus/usb/devices/2-1 >> >> Udevinfo starts with the device specified by the devpath and then >> walks up the chain of parent devices. It prints for every device >> found, all possible attributes in the udev rules key format. >> A rule to match, can be composed by the attributes of the device >> and the attributes from one single parent device. >> >> looking at device '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/usb2/2-1': >> KERNEL=="2-1" >> SUBSYSTEM=="usb" >> DRIVER=="usb" >> ATTR{dev}=="189:129" >> ATTR{configuration}=="" >> ATTR{bNumInterfaces}==" 1" >> ATTR{bConfigurationValue}=="1" >> ATTR{bmAttributes}=="80" >> ATTR{bMaxPower}=="100mA" >> ATTR{urbnum}=="6" >> ATTR{idVendor}=="04b4" >> ATTR{idProduct}=="0082" >> ATTR{bcdDevice}=="0000" >> ATTR{bDeviceClass}=="ff" >> ATTR{bDeviceSubClass}=="ff" >> ATTR{bDeviceProtocol}=="ff" >> ATTR{bNumConfigurations}=="1" >> ATTR{bMaxPacketSize0}=="64" >> ATTR{speed}=="480" >> ATTR{busnum}=="2" >> ATTR{devnum}=="2" >> ATTR{version}==" 2.00" >> ATTR{maxchild}=="0" >> ATTR{quirks}=="0x0" >> ATTR{authorized}=="1" >> >> looking at parent device >> '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/usb2': >> KERNELS=="usb2" >> SUBSYSTEMS=="usb" >> DRIVERS=="usb" >> ATTRS{dev}=="189:128" >> ATTRS{configuration}=="" >> ATTRS{bNumInterfaces}==" 1" >> ATTRS{bConfigurationValue}=="1" >> ATTRS{bmAttributes}=="e0" >> ATTRS{bMaxPower}==" 0mA" >> ATTRS{urbnum}=="49" >> ATTRS{idVendor}=="1d6b" >> ATTRS{idProduct}=="0002" >> ATTRS{bcdDevice}=="0206" >> ATTRS{bDeviceClass}=="09" >> ATTRS{bDeviceSubClass}=="00" >> ATTRS{bDeviceProtocol}=="01" >> ATTRS{bNumConfigurations}=="1" >> ATTRS{bMaxPacketSize0}=="64" >> ATTRS{speed}=="480" >> ATTRS{busnum}=="2" >> ATTRS{devnum}=="1" >> ATTRS{version}==" 2.00" >> ATTRS{maxchild}=="6" >> ATTRS{quirks}=="0x0" >> ATTRS{authorized}=="1" >> ATTRS{manufacturer}=="Linux 2.6.25.18-0.2-pae ehci_hcd" >> ATTRS{product}=="EHCI Host Controller" >> ATTRS{serial}=="0000:02:02.0" >> ATTRS{authorized_default}=="1" >> >> looking at parent device '/devices/pci0000:00/0000:00:11.0/0000:02:02.0': >> KERNELS=="0000:02:02.0" >> SUBSYSTEMS=="pci" >> DRIVERS=="ehci_hcd" >> ATTRS{vendor}=="0x15ad" >> ATTRS{device}=="0x0770" >> ATTRS{subsystem_vendor}=="0x15ad" >> ATTRS{subsystem_device}=="0x0770" >> ATTRS{class}=="0x0c0320" >> ATTRS{irq}=="16" >> ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff" >> ATTRS{modalias}=="pci:v000015ADd00000770sv000015ADsd00000770bc0Csc03i20" >> ATTRS{enable}=="1" >> ATTRS{broken_parity_status}=="0" >> ATTRS{msi_bus}=="" >> >> looking at parent device '/devices/pci0000:00/0000:00:11.0': >> KERNELS=="0000:00:11.0" >> SUBSYSTEMS=="pci" >> DRIVERS=="" >> ATTRS{vendor}=="0x15ad" >> ATTRS{device}=="0x0790" >> ATTRS{subsystem_vendor}=="0x0000" >> ATTRS{subsystem_device}=="0x0000" >> ATTRS{class}=="0x060401" >> ATTRS{irq}=="0" >> ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff" >> ATTRS{modalias}=="pci:v000015ADd00000790sv00000000sd00000000bc06sc04i01" >> ATTRS{enable}=="1" >> ATTRS{broken_parity_status}=="0" >> ATTRS{msi_bus}=="1" >> >> looking at parent device '/devices/pci0000:00': >> KERNELS=="pci0000:00" >> SUBSYSTEMS=="" >> DRIVERS=="" >> >> >> Can anyone see what I'm doing wrong in my rule or missing that I may >> need to do elsewhere? >> >> Thanks, >> >> Eric Winsor >> >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >> -Strategies to boost innovation and cut costs with open source participation >> -Receive a $600 discount off the registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Fx2lib-devel mailing list >> Fx2...@li... >> https://lists.sourceforge.net/lists/listinfo/fx2lib-devel >> >> > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Fx2lib-devel mailing list > Fx2...@li... > https://lists.sourceforge.net/lists/listinfo/fx2lib-devel > |