-   Slackware (
-   -   how to tell udev to make a dev (

jimdaworm 08-09-2004 05:41 AM

how to tell udev to make a dev
Where could I put this line in udev to make it make my dvb dev?

REGISTER ^dvb/adapter[0-9]+/[^/]+$ PERMISSIONS 0660

/bin/bash 08-09-2004 06:04 AM

That looks like it belongs in /etc/udev/udev.permissions file.


/bin/bash 08-09-2004 07:59 AM

Writing udev rules

jimdaworm 08-09-2004 01:25 PM

Hey /bin/bash thanks for your reply. I had a look there but I couldnīt find anything with that REGISTER at the start of it??. Where that line came from was the linuxtv-dvb-1.1.1 drivers. I tried installing them but had no luck but in the readme there it said that maby you needed to copy over a file that contained that exact text to the udev folder.

Cedrik 08-10-2004 04:47 AM

You have to get infos from the /sys directory for your device.

From the link that /bin/bash provided :

The first thing you need to do is find a directory somewhere in /sys that corresponds to your hardware, and includes a file named "dev", as udevinfo can only work on directories of this type. These directories are all found under either /sys/block or /sys/class - there is no point looking anywhere else! However, udevinfo will follow links through this directory and read info found from other sections of sysfs.

Once you have found a directory of this type, you can use the following command to assist you in the creation of writing keys for udev rules:

# udevinfo -a -p /sys/path/to/hardware/info

You may find that finding the correct place in /sys to run udevinfo on is not obvious. Chances are the device you just plugged in has already careted a device node (e.g. /dev/sda), in which case, udevinfo can be helpful! Taking the example of my /dev/sda node, running the following command will point you to the appropriate area of sysfs:

# udevinfo -q path -n /dev/sda


The output of the command (shown above) is telling me that the sysfs path to start at is /sys/block/sda. I would now run "udevinfo -a -p /sys/block/sda". These two commands can be stringed together, like so:

# udevinfo -a -p `udevinfo -q path -n /dev/sda`
Then you write an udev rule based on these infos. If you don't find any reference for your hardware in /sys, udev will not work with your device.

jimdaworm 08-10-2004 06:15 AM

Hey Cedrick I can find no reference to my device there :(

I did however manage to find in the install guide this:


- If you don't use devfs, execute DVB/driver/makedev.napi to create
the device nodes; if you use devfsd, copy drivers/devfsd.conf to
/etc/devfs/conf.d/dvb (exeact location might depend on you distribution).

The thing is that devfs is now outdated and slack 10 has udev installed... I guess thats why I donīt have the place to put that file!

Cedrik 08-10-2004 06:18 AM

I would think that unfortunally you have to wait that dvb driver is updated with udev compatibility or find a patch that do it (maybe it exists somewhere on the net)

jimdaworm 08-10-2004 08:20 AM

Hey thanks for your help anyway Cedrik. I will keep an eye out for a patch... oh just hope some update fixes it in the near future!:study:

Cedrik 08-10-2004 10:04 AM

You can always start a script from /etc/rc.d/rc.local which make the device files

/bin/bash 08-11-2004 01:14 AM


REGISTER ^dvb/adapter[0-9]+/[^/]+$ PERMISSIONS 0660
As you have already figured out, the above would go in a devfsd.conf file. What you need is the equivalent for udev. Like I said in my first post you set the permissions using the the udev permissions file. However I gave you the wrong locati0n for the file, it should be:
The rules go in:

Now all you need is to create the dvb devices. Looking in the file /usr/src/linux/Documentation/devices.txt you can determine the major/minor numbers of the dvb devices:

212 char DVB driver subsystem

                  0 = /dev/dvb/adapter0/video0    first video decoder of first card
                  1 = /dev/dvb/adapter0/audio0    first audio decoder of first card
                  2 = /dev/dvb/adapter0/sec0      (obsolete/unused)
                  3 = /dev/dvb/adapter0/frontend0 first frontend device of first card
                  4 = /dev/dvb/adapter0/demux0    first demux device of first card
                  5 = /dev/dvb/adapter0/dvr0      first digital video recoder device of first card
                  6 = /dev/dvb/adapter0/ca0      first common access port of first card
                  7 = /dev/dvb/adapter0/net0      first network device of first card
                  8 = /dev/dvb/adapter0/osd0      first on-screen-display device of first card
                  9 = /dev/dvb/adapter0/video1    second video decoder of first card
                64 = /dev/dvb/adapter1/video0    first video decoder of second card
                128 = /dev/dvb/adapter2/video0    first video decoder of third card
                196 = /dev/dvb/adapter3/video0    first video decoder of fourth card

So the major number is 212 and the minor is listed next to each device. Like Cedrik said you can create a script that makes the devices.
mknod -m 0660 /dev/dvb/adapter0/video0 c 212 0
That would make the first one, you should be able to figure out the rest.

jimdaworm 08-13-2004 08:12 AM

Hey /bin/bash and Cedrik thanks a lot for all your help. I have figured out that the new (cvs) drivers from linuxtv have support for my card and udev.

The devices it made in /dev/ were a bit out but I just made soft links to where all the programs seem to look for them. I have since been able to scan for channels and tune them. I just installed the latest version of xine and it seems to even sort of work!


All times are GMT -5. The time now is 08:15 PM.