Eu tenho um dispositivo PCI que possui drivers próprios (não integrados ao kernel do Linux). Eu coletei informações do dispositivo usando udevadm
.
udevadm info -a -p /sys/devices/pci0000:00/0000:00:1e.0/0000:0d:02.0
A informação do Udevadm começa com o dispositivo especificado pelo devpath e depois
percorre a cadeia de dispositivos pais. Imprime para todos os dispositivos
encontrado, todos os atributos possíveis no formato de chave de regras do udev.
Uma regra a combinar, pode ser composta pelos atributos do dispositivo
e os atributos de um único dispositivo pai.
looking at device '/devices/pci0000:00/0000:00:1e.0/0000:0d:02.0':
KERNEL=="0000:0d:02.0"
SUBSYSTEM=="pci"
DRIVER==""
ATTR{irq}=="10"
ATTR{subsystem_vendor}=="0xe1c5"
ATTR{broken_parity_status}=="0"
ATTR{class}=="0x078000"
ATTR{driver_override}=="(null)"
ATTR{consistent_dma_mask_bits}=="32"
ATTR{dma_mask_bits}=="32"
ATTR{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000ff"
ATTR{device}=="0x9030"
ATTR{enable}=="0"
ATTR{msi_bus}==""
ATTR{local_cpulist}=="0-7"
ATTR{vendor}=="0x10b5"
ATTR{subsystem_device}=="0x0005"
ATTR{numa_node}=="-1"
ATTR{d3cold_allowed}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1e.0':
KERNELS=="0000:00:1e.0"
SUBSYSTEMS=="pci"
DRIVERS==""
ATTRS{irq}=="0"
ATTRS{subsystem_vendor}=="0x103c"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x060401"
ATTRS{driver_override}=="(null)"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000ff"
ATTRS{device}=="0x244e"
ATTRS{enable}=="1"
ATTRS{msi_bus}=="1"
ATTRS{local_cpulist}=="0-7"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x304b"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="0"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Então eu criei 99-elcus1553.rules
em /etc/udev/rules.d/
:
ACTION=="add",SUBSYSTEM=="pci",ATTR{vendor}=="0x10b5",ATTR{device}=="0x9030",RUN+="/home/qmor/elcus-1553driver-linux/trunk/loaddrv"
Que contém:
/sbin/rmmod tmk1553b
rm /dev/tmk1553b
/sbin/insmod tmk1553b.ko d0=1 t0="TAI" misc=1
chmod o+rwx /dev/tmk1553b
Após a reinicialização, não tenho /dev/tmk1553b
device, o que significa que a regra de arquivo não está funcionando. O que eu fiz de errado?