DVB device nodes (was: Re: Bug#265799: udev: /dev/input/* mode 0600 breaks remote control input)
Darren Salt
pkg-vdr-dvb-devel@lists.alioth.debian.org
Mon, 13 Sep 2004 23:05:19 +0100
This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility. Alternatively, ask the sender of this
message to resend it in a different format.
--367955902--1824442844--1662106532
Content-Type: text/plain; charset=us-ascii
I demand that Thomas Schmidt may or may not have written...
> * Darren Salt schrieb am 13.09.04, um 20:27 Uhr:
>> [snip]
>>> @Darren: I now tried udev out, it is very nice, but unfortunately the
>>> dvb-drivers do not support sysfs at the moment.
>>> What is the best practise to get them working? (with static devices for
>>> example) How do you manage this?
>> My device node creation script (/etc/init.d/dvb, symlinked from
>> /etc/rcS.d/S37dvb.local) is attached.
> Ah yes, this is a way, but i thought that there might be an option in udev
> to create certain devices as static devices
I'm not aware of one. BTW, that script should really be using
cd /dev && MAKEDEV dvb
instead of that list of mknod commands.
> (or just to not delete certain devices),
Considering that /dev is (probably) a tmpfs mount...
> well when it is this way, i will probably uninstall udev again. :(
sysfs support is in dvb-kernel CVS. I've not (yet) tested it for myself.
<URL:http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/linux/Documentation/dvb/udev.txt>
I think that it's worth creating the necessary files and symlinks to allow
udev to create the device nodes - and, ideally, making sure that this gets
into sarge. This appears to be trivial, so I've done this more or less
straight from upstream documentation. The attached patch replaces my previous
patch - there are bug fixes.
> (There is also at least lirc_serial (needed for my remote), which does not
> support sysfs.)
MAKEDEV again?
>> Also, in /etc/modprobe.d/dvb:
>> alias dvb budget_ci
>> install budget_ci modprobe -i budget_ci && modprobe tda1004x
>> remove budget_ci modprobe -r -i budget_ci && modprobe -r tda1004x
> Ah yes, i have something similiar for my dvb-card:
> alias dvb dvb-ttpci
> install dvb-ttpci /sbin/modprobe stv0299; /sbin/modprobe --ignore-install dvb-ttpci
> :)
This begins to fall apart a little for those with multiple cards. ;-)
--
| Darren Salt | linux (or ds) at | nr. Ashington,
| woody, sarge, | youmustbejoking | Northumberland
| RISC OS | demon co uk | Toon Army
| <URL:http://www.youmustbejoking.demon.co.uk/> (PGP 2.6, GPG keys)
Congratulations! You have now used up another 250 hours of CPU time.
--367955902--1824442844--1662106532
Content-Type: text/plain; charset=iso-8859-1; name="perms.diff"
Content-Disposition: attachment; filename="perms.diff"
Content-Transfer-Encoding: quoted-printable
diff -urN linuxtv-dvb-apps-1.1.0.orig/debian/dvb-utils.dirs linuxtv-dvb-a=
pps-1.1.0/debian/dvb-utils.dirs
--- linuxtv-dvb-apps-1.1.0.orig/debian/dvb-utils.dirs 2004-09-14 00:36:13=
.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/debian/dvb-utils.dirs 2004-09-13 18:41:47.0000=
00000 +0100
@@ -1,2 +1,3 @@
usr/bin
usr/share/doc/dvb-utils/examples/scan
+etc/udev/rules.d
diff -urN linuxtv-dvb-apps-1.1.0.orig/debian/rules linuxtv-dvb-apps-1.1.0=
/debian/rules
--- linuxtv-dvb-apps-1.1.0.orig/debian/rules 2004-09-14 00:36:13.00000000=
0 +0100
+++ linuxtv-dvb-apps-1.1.0/debian/rules 2004-09-14 00:07:03.000000000 +01=
00
@@ -48,6 +48,9 @@
cp -a util/av7110_loadkeys/README debian/dvb-utils/usr/share/doc/dvb-ut=
ils/README.av7110_loadkeys
cp -a util/scan/README debian/dvb-utils/usr/share/doc/dvb-utils/README.=
scan
cp -a util/szap/README debian/dvb-utils/usr/share/doc/dvb-utils/README.=
szap
+ cp -a debian/udev debian/dvb-utils/etc/
+ chmod 755 debian/dvb-utils/etc/udev/dvb-utils.sh
+ ln -s ../dvb-utils.rules debian/dvb-utils/etc/udev/rules.d/
=20
dh_install
=20
diff -urN linuxtv-dvb-apps-1.1.0.orig/debian/udev/dvb-utils.rules linuxtv=
-dvb-apps-1.1.0/debian/udev/dvb-utils.rules
--- linuxtv-dvb-apps-1.1.0.orig/debian/udev/dvb-utils.rules 1970-01-01 01=
:00:00.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/debian/udev/dvb-utils.rules 2004-09-14 00:30:3=
3.000000000 +0100
@@ -0,0 +1,5 @@
+# Create DVB device nodes (for dvb-kernel > 1.1.1)
+KERNEL=3D"dvb*", PROGRAM=3D"/etc/udev/dvb-utils.sh %k", NAME=3D"%c", MOD=
E=3D"0660", GROUP=3D"video"
+
+# Loosen permissions on IR input devices supplied by TV card drivers
+KERNEL=3D"event[0-9]*", PROGRAM=3D"/etc/udev/inputdev.sh %n 'dvb|av7134'=
", RESULT=3D"inputdev", NAME=3D"input/%k", MODE=3D"0640", GROUP=3D"video"=
diff -urN linuxtv-dvb-apps-1.1.0.orig/debian/udev/dvb-utils.sh linuxtv-dv=
b-apps-1.1.0/debian/udev/dvb-utils.sh
--- linuxtv-dvb-apps-1.1.0.orig/debian/udev/dvb-utils.sh 1970-01-01 01:00=
:00.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/debian/udev/dvb-utils.sh 2004-09-13 23:53:13.0=
00000000 +0100
@@ -0,0 +1,2 @@
+#! /bin/sh
+echo "$1" | sed -re 's,dvb([0-9]).([^0-9]*)([0-9]),dvb/adapter\1/\2\3,'
--367955902--1824442844--1662106532--