Hallo zusammen,
ich möchte meinen beiden DVB-Karten eine feste Device-Nummer vorgeben. Dazu habe ich die nachfolgenden udev-Regeln erstellt und in der Datei [/etc/udev/rules.d/ z30-dvb.rules] abgelegt.
#Hauppauge NEXUS-s rev. 2.1
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7146", ATTRS{subsystem_vendor}=="0x13c2", ATTRS{subsystem_device}=="0x0003", NAME:="dvb/adapter0/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video"
#Hauppauge NOVA-S Plus
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7146", ATTRS{subsystem_vendor}=="0x1894", ATTRS{subsystem_device}=="0x0014", NAME:="dvb/adapter1/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video"
Das Script showdvb.sh von helau liefert bei mir folgenden Output:
01:09.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
Subsystem: KNC One Unknown device 0014
Flags: bus master, fast Back2Back, medium devsel, latency 123, IRQ 177
Memory at f4121000 (32-bit, non-prefetchable)
Class: 0x048000
Vendor: 0x1131
Device: 0x7146
SubVendor: 0x1894
SubDevice: 0x0014
01:0b.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.1
Flags: bus master, fast Back2Back, medium devsel, latency 123, IRQ 169
Memory at f4121400 (32-bit, non-prefetchable)
Class: 0x048000
Vendor: 0x1131
Device: 0x7146
SubVendor: 0x13c2
SubDevice: 0x0003
Display More
Keine_Ahnung: habe mal die udev-Kommandos ausgeführt.
udevinfo --query=all --attribute-walk --name=/dev/dvb/adapter1/frontend0 liefert:
looking at device '/class/dvb/dvb1.frontend0':
KERNEL=="dvb1.frontend0"
SUBSYSTEM=="dvb"
DRIVER==""
ATTR{dev}=="212:67"
looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:01:0b.0':
KERNELS=="0000:01:0b.0"
SUBSYSTEMS=="pci"
DRIVERS=="dvb"
ATTRS{broken_parity_status}=="0"
ATTRS{enable}=="1"
ATTRS{modalias}=="pci:v00001131d00007146sv000013C2sd00000003bc04sc80i00"
ATTRS{local_cpus}=="1"
ATTRS{irq}=="169"
ATTRS{class}=="0x048000"
ATTRS{subsystem_device}=="0x0003"
ATTRS{subsystem_vendor}=="0x13c2"
ATTRS{device}=="0x7146"
ATTRS{vendor}=="0x1131"
looking at parent device '/devices/pci0000:00/0000:00:1e.0':
KERNELS=="0000:00:1e.0"
SUBSYSTEMS=="pci"
DRIVERS==""
ATTRS{broken_parity_status}=="0"
ATTRS{enable}=="1"
ATTRS{modalias}=="pci:v00008086d00002418sv00000000sd00000000bc06sc04i00"
ATTRS{local_cpus}=="1"
ATTRS{irq}=="0"
ATTRS{class}=="0x060400"
ATTRS{subsystem_device}=="0x0000"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{device}=="0x2418"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Display More
udevtest /sys/bus/pci/devices/0000\:01\:0b.0/dvb\:dvb1.frontend0/ liefert:
parse_file: reading '/etc/udev/rules.d/020_permissions.rules' as rules file
parse_file: reading '/etc/udev/rules.d/udev.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z20_persistent-input.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z20_persistent.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z25_persistent-cd.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z25_persistent-net.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z30-dvb.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z45_persistent-net-generator.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z50_run.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z55_hotplug.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z60_hdparm.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z60_usbmount.rules' as rules file
parse_file: reading '/etc/udev/rules.d/z75_cd-aliases-generator.rules' as rules file
This program is for debugging only, it does not create any node,
or run any program specified by a RUN key. It may show incorrect results,
if rules match against subsystem specfic kernel event variables.
main: looking at device '/class/dvb/dvb1.frontend0' from subsystem 'dvb'
run_program: '/bin/sh -c 'K=dvb1.frontend0; K=${K#dvb}; printf dvb/adapter%i/%s ${K%%.*} ${K#*.}'
run_program: '/bin/sh' (stdout) 'dvb/adapter1/frontend0'
run_program: '/bin/sh' returned with status 0
udev_rules_get_name: rule applied, 'dvb1.frontend0' becomes 'dvb/adapter1/frontend0'
udev_db_get_device: found a symlink as db file
udev_device_event: device '/class/dvb/dvb1.frontend0' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/dvb/adapter1/frontend0', major = '212', minor = '67', mode = '0660', uid = '0', gid = '44'
main: run: 'socket:/org/kernel/udev/monitor'
Display More
Ich habe meine Rules-Datei geändert und dann udevtest neu ausgeführt (ohne Rechnerneustart, wie's aussieht lädt udevtest die Regeln jedesmal neu), die Ausgabe
[udev_rules_get_name rule applied, 'dvb1.frontend0' becomes 'dvb/adapter1/frontend0']
bleibt gleich.
Hat jemand 'ne Idee, wie die udev-Regel ausshen muss?
Grüße,
Klaus