LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-09-2004, 05:41 AM   #1
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 888

Rep: Reputation: 30
how to tell udev to make a dev


Where could I put this line in udev to make it make my dvb dev?
Quote:
REGISTER ^dvb/adapter[0-9]+/[^/]+$ PERMISSIONS root.video 0660
 
Old 08-09-2004, 06:04 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
That looks like it belongs in /etc/udev/udev.permissions file.

dvb/*:root:video:0660
 
Old 08-09-2004, 07:59 AM   #3
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Writing udev rules
 
Old 08-09-2004, 01:25 PM   #4
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 888

Original Poster
Rep: Reputation: 30
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.
 
Old 08-10-2004, 04:47 AM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
You have to get infos from the /sys directory for your device.

From the link that /bin/bash provided :
Quote:
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

/block/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.
 
Old 08-10-2004, 06:15 AM   #6
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 888

Original Poster
Rep: Reputation: 30
Hey Cedrick I can find no reference to my device there

I did however manage to find in the linuxtv.org/ install guide this:

Quote:
- 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!
 
Old 08-10-2004, 06:18 AM   #7
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
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)
 
Old 08-10-2004, 08:20 AM   #8
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 888

Original Poster
Rep: Reputation: 30
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!
 
Old 08-10-2004, 10:04 AM   #9
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
You can always start a script from /etc/rc.d/rc.local which make the device files
 
Old 08-11-2004, 01:14 AM   #10
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 46
Code:
REGISTER ^dvb/adapter[0-9]+/[^/]+$ PERMISSIONS root.video 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:
/etc/udev/permissions.d/udev.permissions
The rules go in:
/etc/udev/rules.d/udev.rules

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:
Code:
212 char	LinuxTV.org 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.
 
Old 08-13-2004, 08:12 AM   #11
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 888

Original Poster
Rep: Reputation: 30
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!

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
does udev make /dev/ttyS0 ? dansawyer Linux - Software 2 10-24-2005 12:16 AM
udev is about to beat me (/dev/null, etc) CowboyJ Linux - Hardware 5 07-06-2005 09:12 AM
udev doesn't create /dev/pktcdvd/0 logout_login Linux - Software 1 04-04-2005 12:29 AM
Kernel Upgrading, dev, udev, etc... Makaelin Slackware 2 02-11-2005 06:58 PM
udev, /dev & alsa tobyl Slackware 7 07-09-2004 09:13 AM


All times are GMT -5. The time now is 12:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration