summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/udev/udev')
-rw-r--r--meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch35
-rw-r--r--meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch29
-rw-r--r--meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch52
-rw-r--r--meta/recipes-core/udev/udev/add-install-ptest.patch86
-rw-r--r--meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch25
-rw-r--r--meta/recipes-core/udev/udev/devfs-udev.rules108
-rw-r--r--meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch58
-rw-r--r--meta/recipes-core/udev/udev/init142
-rw-r--r--meta/recipes-core/udev/udev/links.conf21
-rw-r--r--meta/recipes-core/udev/udev/local.rules19
-rw-r--r--meta/recipes-core/udev/udev/permissions.rules131
-rw-r--r--meta/recipes-core/udev/udev/run-ptest5
-rw-r--r--meta/recipes-core/udev/udev/run.rules14
-rw-r--r--meta/recipes-core/udev/udev/udev-cache75
-rw-r--r--meta/recipes-core/udev/udev/udev-cache.default5
-rw-r--r--meta/recipes-core/udev/udev/udev.rules116
16 files changed, 0 insertions, 921 deletions
diff --git a/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch b/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch
deleted file mode 100644
index 41deafa918..0000000000
--- a/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 0f8290c943da298abd269ca60fd8375dfb219971 Mon Sep 17 00:00:00 2001
2From: Alexandru DAMIAN <alexandru.damian@intel.com>
3Date: Thu, 12 Jul 2012 12:54:48 +0300
4Subject: [PATCH] Fixing keyboard_force_release.sh shell script path
5
6With the introduction of rootprefix, the keyboard-force-release.sh.in
7was modified to be executed with @rootprefix@/bin/sh, which is wrong
8because @rootprefix@ defaults to /usr (which is correct), but the
9shell is always at /bin/sh (IEEE Std 1003.2-1992).
10
11Therefore the interpreter for shell scripts needs to be /bin/sh at all times.
12
13The upstream moved to configurable root prefix, this patch taclkes a
14transition bug, and will not be applied upstream.
15
16Upstream-Status: Inappropriate [legacy version]
17
18Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
19---
20 src/keymap/keyboard-force-release.sh.in | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/src/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in
24index dd040ce..597a3a6 100755
25--- a/src/keymap/keyboard-force-release.sh.in
26+++ b/src/keymap/keyboard-force-release.sh.in
27@@ -1,4 +1,4 @@
28-#!@rootprefix@/bin/sh -e
29+#!/bin/sh -e
30 # read list of scancodes, convert hex to decimal and
31 # append to the atkbd force_release sysfs attribute
32 # $1 sysfs devpath for serioX
33--
341.7.9.5
35
diff --git a/meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch b/meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch
deleted file mode 100644
index 8d2df1a390..0000000000
--- a/meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 2935f9b2dfb92c3ce4376a988cd01b624430905b Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Tue, 19 Jan 2016 09:49:56 -0800
4Subject: [PATCH 1/2] mtd_probe.h: Add stdint.h as it was removed from
5 mtd-user.h in the kernel
6
7
8Upstream-Status: Inappropriate [Upstream unsupported]
9
10Signed-off-by: Saul Wold <sgw@linux.intel.com>
11---
12 src/mtd_probe/mtd_probe.h | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/src/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h
16index 2a37ede..49c1918 100644
17--- a/src/mtd_probe/mtd_probe.h
18+++ b/src/mtd_probe/mtd_probe.h
19@@ -18,6 +18,7 @@
20 */
21
22 #include <mtd/mtd-user.h>
23+#include <stdint.h>
24
25 /* Full oob structure as written on the flash */
26 struct sm_oob {
27--
282.5.0
29
diff --git a/meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch b/meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch
deleted file mode 100644
index a9dc627459..0000000000
--- a/meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 63ae7ebb0c6177efed46734061fb59c458a47a26 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Tue, 19 Jan 2016 09:49:19 -0800
4Subject: [PATCH 2/2] configure.ac/Makefile.am: Check for input.h and
5 input-event-codes.h
6
7Add INPUT_HEADER to know which header file to use because it changed
8in the 4.4 kernel code.
9
10Set INPUT_HEADER with default linux/input.h if it exists and if the
11newer input-events-codes.h exists from 4.4 use it instead.
12
13Upstream-Status: Inappropriate [Upstream unsupported]
14
15Signed-off-by: Saul Wold <sgw@linux.intel.com>
16---
17 Makefile.am | 2 +-
18 configure.ac | 4 +++-
19 2 files changed, 4 insertions(+), 2 deletions(-)
20
21diff --git a/Makefile.am b/Makefile.am
22index 2e32e69..04eb194 100644
23--- a/Makefile.am
24+++ b/Makefile.am
25@@ -591,7 +591,7 @@ dist_udevkeymapforcerel_DATA = \
26 src/keymap/force-release-maps/samsung-other \
27 src/keymap/force-release-maps/common-volume-keys
28
29-src/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
30+src/keymap/keys.txt: $(INCLUDE_PREFIX)/$(INPUT_HEADER)
31 $(AM_V_at)mkdir -p src/keymap
32 $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
33
34diff --git a/configure.ac b/configure.ac
35index 0500313..9674620 100644
36--- a/configure.ac
37+++ b/configure.ac
38@@ -154,8 +154,10 @@ AS_IF([test "x$enable_keymap" = "xyes"], [
39 if test -z "$GPERF"; then
40 AC_MSG_ERROR([gperf is needed])
41 fi
42+
43+ AC_CHECK_HEADER([linux/input.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input.h')])], AC_MSG_ERROR([kernel headers not found]))
44+ AC_CHECK_HEADER([linux/input-event-codes.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input-event-codes.h')])], [:])
45
46- AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
47 AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
48 ])
49 AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
50--
512.5.0
52
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch
deleted file mode 100644
index bfc2e9409d..0000000000
--- a/meta/recipes-core/udev/udev/add-install-ptest.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1Adjustements for ptest:
2
3- Add 'install-ptest' rule.
4- Print a standard result line for each test.
5- Replace the use of "tree" with "find".
6
7Signed-off-by: Björn Stenberg <bjst@enea.com>
8Signed-off-by: Alexandra Safta <alst@enea.com>
9Upstream-Status: Pending
10
11Add missing files for rule-syntax-check
12- Add rule-syntax-check.py
13- Add the deployed udev rules to the testdata
14
15Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
16Upstream-Status: Pending
17--- a/Makefile.am 2012-03-18 16:28:14.000000000 +0100
18+++ b/Makefile.am 2013-02-18 10:03:36.531101244 +0100
19@@ -708,3 +708,18 @@
20 for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
21 for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
22 for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
23+
24+RULES = rules/* src/accelerometer/61-accelerometer.rules \
25+ src/cdrom_id/60-cdrom_id.rules \
26+ src/keymap/95-keyboard-force-release.rules src/keymap/95-keymap.rules \
27+ src/mtd_probe/75-probe_mtd.rules src/v4l_id/60-persistent-v4l.rules
28+
29+install-ptest:
30+ install test-udev $(DESTDIR)
31+ cp Makefile $(DESTDIR)
32+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
33+ install -d $(DESTDIR)/test $(DESTDIR)/rules
34+ (cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test)
35+ (cd $(top_srcdir) && install test/rule-syntax-check.py $(DESTDIR)/test)
36+ (cd $(top_srcdir) && install $(RULES) $(DESTDIR)/rules)
37+ cp $(top_srcdir)/test/sys.tar.xz $(DESTDIR)/test/
38--- a/test/udev-test.pl 2012-03-18 16:43:36.000000000 +0100
39+++ b/test/udev-test.pl 2013-02-18 10:31:29.706357321 +0100
40@@ -1459,11 +1459,13 @@
41 print "add: error";
42 if ($rules->{exp_add_error}) {
43 print " as expected\n";
44+ print "XFAIL: TEST $number: $rules->{desc}: add\n";
45 } else {
46 print "\n";
47- system("tree $udev_root");
48+ system("find $udev_root");
49 print "\n";
50 $error++;
51+ print "FAIL: TEST $number: $rules->{desc}: add\n";
52 sleep(1);
53 }
54 }
55@@ -1479,15 +1481,18 @@
56 print "remove: error";
57 if ($rules->{exp_rem_error}) {
58 print " as expected\n";
59+ print "XFAIL: TEST $number: $rules->{desc}: remove\n";
60 } else {
61 print "\n";
62- system("tree $udev_root");
63+ system("find $udev_root");
64 print "\n";
65 $error++;
66+ print "FAIL: TEST $number: $rules->{desc}: remove\n";
67 sleep(1);
68 }
69 } else {
70 print "remove: ok\n";
71+ print "PASS: TEST $number: $rules->{desc}: remove\n";
72 }
73
74 print "\n";
75--- a/configure.ac 2013-11-28 09:14:02.814248826 +0100
76+++ b/configure.ac 2013-11-28 09:14:34.260874296 +0100
77@@ -6,7 +6,7 @@
78 [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html])
79 AC_CONFIG_SRCDIR([src/udevd.c])
80 AC_CONFIG_AUX_DIR([build-aux])
81-AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
82+AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
83 AC_USE_SYSTEM_EXTENSIONS
84 AC_SYS_LARGEFILE
85 AC_CONFIG_MACRO_DIR([m4])
86
diff --git a/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch b/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch
deleted file mode 100644
index 2c31b33b02..0000000000
--- a/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1Source: http://cgit.freedesktop.org/systemd/systemd/commit/rules/42-usb-hid-pm.rules?id=e0386cf2809219bbdd30895f46f1f567b56902b6
2
3Some USB ports on external hubs may be reported as "fixed". We only want
4to auto-enable this on ports that are internal to the machine, so check
5the parent state as well.
6
7Upstream-Status: backport
8
9Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
102013/09/13
11
12Index: udev-182/rules/42-usb-hid-pm.rules
13===================================================================
14--- udev-182.orig/rules/42-usb-hid-pm.rules
15+++ udev-182/rules/42-usb-hid-pm.rules
16@@ -46,4 +46,9 @@ ACTION=="add", SUBSYSTEM=="usb", ATTRS{i
17 ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="14dd", ATTR{idProduct}="0002", TEST=="power/control", ATTR{power/control}="auto"
18
19 # USB HID devices that are internal to the machine should also be safe to autosuspend
20+# And skip it for devices which are external but say "fixed"
21+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="removable", GOTO="usb_hid_pm_end"
22+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="unknown", GOTO="usb_hid_pm_end"
23 ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", ATTRS{removable}=="fixed", TEST=="../power/control", ATTR{../power/control}="auto"
24+LABEL="usb_hid_pm_end"
25+
diff --git a/meta/recipes-core/udev/udev/devfs-udev.rules b/meta/recipes-core/udev/udev/devfs-udev.rules
deleted file mode 100644
index 0ba1ad4e7f..0000000000
--- a/meta/recipes-core/udev/udev/devfs-udev.rules
+++ /dev/null
@@ -1,108 +0,0 @@
1# The use of these rules is not recommended or supported.
2# In a world where devices can come and go at any time, the devfs scheme
3# of simple device enumeration does not help _anything_. Just forget about
4# it. Use custom rules to name your device or look at the persistent device
5# naming scheme, which is implemented for disks and add your subsystem.
6
7# ide block devices
8BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
9
10# md block devices
11KERNEL="md[0-9]*", NAME="md/%n"
12
13# floppy devices
14KERNEL="fd[0-9]*", NAME="floppy/%n"
15
16# tty devices
17KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k"
18KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k"
19KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
20
21# vc devices
22KERNEL="vcs", NAME="vcc/0"
23KERNEL="vcs[0-9]*", NAME="vcc/%n"
24KERNEL="vcsa", NAME="vcc/a0"
25KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
26
27# v4l devices
28KERNEL="video[0-9]*", NAME="v4l/video%n"
29KERNEL="radio[0-9]*", NAME="v4l/radio%n"
30KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
31KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"
32
33# dm devices (ignore them)
34KERNEL="dm-[0-9]*", NAME=""
35
36# i2c devices
37KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
38
39# loop devices
40KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
41
42# ramdisks
43KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
44
45# framebuffer devices
46KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
47
48# misc
49KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
50KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
51KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
52KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
53KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
54KERNEL="uinput", NAME="misc/%k", SYMLINK="%k"
55
56# alsa devices
57KERNEL="controlC[0-9]*", NAME="snd/%k"
58KERNEL="hw[CD0-9]*", NAME="snd/%k"
59KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
60KERNEL="midi[CD0-9]*", NAME="snd/%k"
61KERNEL="timer", NAME="snd/%k"
62KERNEL="seq", NAME="snd/%k"
63
64# oss devices
65KERNEL="audio*", NAME="sound/%k", SYMLINK="%k"
66KERNEL="dmmidi", NAME="sound/%k", SYMLINK="%k"
67KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k"
68KERNEL="midi*", NAME="sound/%k", SYMLINK="%k"
69KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k"
70KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k"
71
72# input devices
73KERNEL="mice", NAME="input/%k"
74KERNEL="mouse*", NAME="input/%k"
75KERNEL="event*", NAME="input/%k"
76KERNEL="js*", NAME="input/%k"
77KERNEL="ts*", NAME="input/%k"
78
79# USB devices
80KERNEL="hiddev*", NAME="usb/%k"
81KERNEL="auer*", NAME="usb/%k"
82KERNEL="legousbtower*", NAME="usb/%k"
83KERNEL="dabusb*", NAME="usb/%k"
84BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k"
85
86# netlink devices
87KERNEL="route", NAME="netlink/%k"
88KERNEL="skip", NAME="netlink/%k"
89KERNEL="usersock", NAME="netlink/%k"
90KERNEL="fwmonitor", NAME="netlink/%k"
91KERNEL="tcpdiag", NAME="netlink/%k"
92KERNEL="nflog", NAME="netlink/%k"
93KERNEL="xfrm", NAME="netlink/%k"
94KERNEL="arpd", NAME="netlink/%k"
95KERNEL="route6", NAME="netlink/%k"
96KERNEL="ip6_fw", NAME="netlink/%k"
97KERNEL="dnrtmsg", NAME="netlink/%k"
98KERNEL="tap*", NAME="netlink/%k"
99
100# CAPI devices
101KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20"
102KERNEL="capi*", NAME="capi/%n"
103
104# Network devices
105KERNEL="tun", NAME="net/%k"
106
107# raw devices
108KERNEL="raw[0-9]*", NAME="raw/%k"
diff --git a/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
deleted file mode 100644
index 593c46ce03..0000000000
--- a/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1The rule-syntax-check script fails with errors like this:
2
3Invalid line /lib/udev/rules.d/95-keymap.rules:49: ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j"
4(' clause:', 'ATTR{[dmi/id]product_name}=="W3J"')
5()
6
7
8Move line comment from end of rules file to its own line, the regex used to
9test correct syntax choke on it.
10
11The rule-syntax-check.py uses regex which errournessly complains on ATTR rules
12of the form ATTR{[dmi/id]board_name}=="30B7"
13Use the regex from systemd's script which allow [] characters and additional
14compare operators
15
16The Makefile passes rules-test.sh script a build host path to the testdata.
17Ignore the argument and use a relative path instead.
18
19
20Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
21Upstream-Status: Inappropriate (cross environment path)
22
23diff -Naur udev-182.orig/src/keymap/95-keymap.rules udev-182/src/keymap/95-keymap.rules
24--- udev-182.orig/src/keymap/95-keymap.rules 2012-02-07 00:01:55.154640792 +0100
25+++ udev-182/src/keymap/95-keymap.rules 2015-01-24 20:58:40.156930520 +0100
26@@ -94,7 +94,8 @@
27 ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
28 ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill"
29 # HP Pavillion dv6315ea has empty DMI_VENDOR
30-ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
31+# "quick play"
32+ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media"
33
34 # Gateway clone of Acer Aspire One AOA110/AOA150
35 ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer"
36diff -Naur udev-182.orig/test/rule-syntax-check.py udev-182/test/rule-syntax-check.py
37--- udev-182.orig/test/rule-syntax-check.py 2012-02-15 20:10:12.872333342 +0100
38+++ udev-182/test/rule-syntax-check.py 2015-01-24 21:08:00.496049600 +0100
39@@ -28,7 +28,7 @@
40 no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
41 args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
42 no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
43-args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$')
44+args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$')
45
46 result = 0
47 buffer = ''
48--- udev-182.orig/test/rules-test.sh 2012-01-29 01:15:46.000000000 +0100
49+++ udev-182/test/rules-test.sh 2015-01-24 17:53:51.201858658 +0100
50@@ -4,7 +4,7 @@
51 # (C) 2010 Canonical Ltd.
52 # Author: Martin Pitt <martin.pitt@ubuntu.com>
53
54-[ -n "$srcdir" ] || srcdir=`dirname $0`/..
55+srcdir=`dirname $0`/..
56
57 # skip if we don't have python
58 type python >/dev/null 2>&1 || {
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
deleted file mode 100644
index 0ab028b391..0000000000
--- a/meta/recipes-core/udev/udev/init
+++ /dev/null
@@ -1,142 +0,0 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: udev
5# Required-Start: mountvirtfs
6# Required-Stop:
7# Default-Start: S
8# Default-Stop:
9# Short-Description: Start udevd, populate /dev and load drivers.
10### END INIT INFO
11
12export TZ=/etc/localtime
13
14[ -d /sys/class ] || exit 1
15[ -r /proc/mounts ] || exit 1
16[ -x @UDEVD@ ] || exit 1
17SYSCONF_CACHED="/etc/udev/cache.data"
18SYSCONF_TMP="/dev/shm/udev.cache"
19DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
20
21# A list of files which are used as a criteria to judge whether the udev cache could be reused.
22CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
23[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
24
25# List of files whose metadata (size/mtime/name) will be included in cached
26# system state.
27META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
28
29# Command to compute system configuration.
30sysconf_cmd () {
31 cat -- $CMP_FILE_LIST
32 stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
33}
34
35[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
36[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
37[ -f /etc/default/rcS ] && . /etc/default/rcS
38
39kill_udevd () {
40 pid=`pidof -x udevd`
41 [ -n "$pid" ] && kill $pid
42}
43
44case "$1" in
45 start)
46 export ACTION=add
47 # propagate /dev from /sys
48 echo "Starting udev"
49
50 # Check for requireed devtmpfs before trying to start udev and
51 # mount a no-existant fs.
52 if ! grep -q devtmpfs /proc/filesystems
53 then
54 echo "Missing devtmpfs, which is required for udev to run";
55 echo "Halting..."
56 halt
57 fi
58 # mount the devtmpfs on /dev, if not already done
59 LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && {
60 mount -n -o mode=0755 -t devtmpfs none "/dev"
61 }
62 [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
63 [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
64 # the automount rule for udev needs /tmp directory available, as /tmp is a symlink
65 # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
66 # /var/volatile/tmp directory to be available.
67 mkdir -m 1777 -p /var/volatile/tmp
68
69 # Cache handling.
70 if [ "$DEVCACHE" != "" ]; then
71 if [ -e $DEVCACHE ]; then
72 sysconf_cmd > "$SYSCONF_TMP"
73 if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then
74 tar xmf $DEVCACHE -C / -m
75 not_first_boot=1
76 [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
77 [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP"
78 [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN"
79 else
80 # Output detailed reason why the cached /dev is not used
81 cat <<EOF
82udev: Not using udev cache because of changes detected in the following files:
83udev: $CMP_FILE_LIST
84udev: $META_FILE_LIST
85udev: The udev cache will be regenerated. To identify the detected changes,
86udev: compare the cached sysconf at $SYSCONF_CACHED
87udev: against the current sysconf at $SYSCONF_TMP
88EOF
89 touch "$DEVCACHE_REGEN"
90 fi
91 else
92 if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
93 # If rootfs is not read-only, it's possible that a new udev cache would be generated;
94 # otherwise, we do not bother to read files.
95 touch "$DEVCACHE_REGEN"
96 fi
97 fi
98 fi
99
100 # make_extra_nodes
101 kill_udevd > "/dev/null" 2>&1
102
103 # trigger the sorted events
104 [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
105 @UDEVD@ -d
106
107 udevadm control --env=STARTUP=1
108 if [ "$not_first_boot" != "" ];then
109 if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then
110 PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform"
111 else
112 PLATFORM_BUS_NOMATCH=""
113 fi
114 udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux $PLATFORM_BUS_NOMATCH
115 (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
116 else
117 udevadm trigger --action=add
118 udevadm settle
119 fi
120 ;;
121 stop)
122 echo "Stopping udevd"
123 start-stop-daemon --stop --name udevd --quiet
124 ;;
125 restart)
126 $0 stop
127 sleep 1
128 $0 start
129 ;;
130 status)
131 pid=`pidof -x udevd`
132 if [ -n "$pid" ]; then
133 echo "udevd (pid $pid) is running ..."
134 else
135 echo "udevd is stopped"
136 fi
137 ;;
138 *)
139 echo "Usage: $0 {start|stop|status|restart}"
140 exit 1
141esac
142exit 0
diff --git a/meta/recipes-core/udev/udev/links.conf b/meta/recipes-core/udev/udev/links.conf
deleted file mode 100644
index 8fff922db6..0000000000
--- a/meta/recipes-core/udev/udev/links.conf
+++ /dev/null
@@ -1,21 +0,0 @@
1# This file does not exist. Please do not ask the debian maintainer about it.
2# You may use it to do strange and wonderful things, at your risk.
3
4L fd /proc/self/fd
5L stdin /proc/self/fd/0
6L stdout /proc/self/fd/1
7L stderr /proc/self/fd/2
8L core /proc/kcore
9L sndstat /proc/asound/oss/sndstat
10L MAKEDEV /sbin/MAKEDEV
11
12D pts
13D shm
14
15# Hic sunt leones.
16M ppp c 108 0
17D loop
18M loop/0 b 7 0
19D net
20M net/tun c 10 200
21
diff --git a/meta/recipes-core/udev/udev/local.rules b/meta/recipes-core/udev/udev/local.rules
deleted file mode 100644
index d502cdd6ba..0000000000
--- a/meta/recipes-core/udev/udev/local.rules
+++ /dev/null
@@ -1,19 +0,0 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Create a symlink to any touchscreen input device
17# Trigger based on input type, that the evbit (-e) has EV_SYN and EV_ABS,
18# has an EV_ABS value (-a) which is used for touchscreen type devices.
19SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0"
diff --git a/meta/recipes-core/udev/udev/permissions.rules b/meta/recipes-core/udev/udev/permissions.rules
deleted file mode 100644
index 205b733292..0000000000
--- a/meta/recipes-core/udev/udev/permissions.rules
+++ /dev/null
@@ -1,131 +0,0 @@
1ACTION!="add", GOTO="permissions_end"
2
3# workarounds needed to synchronize with sysfs
4# only needed for kernels < v2.6.18-rc1
5ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
6SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt"
7# only needed for kernels < 2.6.16
8SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
9# only needed for kernels < 2.6.17
10SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
11
12# devices needed to load the drivers providing them
13KERNEL=="tun", OPTIONS+="ignore_remove"
14KERNEL=="ppp", OPTIONS+="ignore_remove"
15KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove"
16
17# default permissions for block devices
18SUBSYSTEM=="block", GROUP="disk"
19# the aacraid driver is broken and reports that disks removable (see #404927)
20SUBSYSTEM=="block", ATTRS{removable}=="1", \
21 DRIVERS!="aacraid", GROUP="floppy"
22# all block devices on these buses are "removable"
23SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
24
25# IDE devices
26KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
27 IMPORT{program}="cdrom_id --export $tempnode"
28ENV{ID_CDROM}=="?*", GROUP="cdrom"
29KERNEL=="ht[0-9]*", GROUP="tape"
30KERNEL=="nht[0-9]*", GROUP="tape"
31
32# SCSI devices
33KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
34SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
35SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner"
36SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
37SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
38SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom"
39SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
40SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
41SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
42
43# USB devices
44KERNEL=="legousbtower*", MODE="0666"
45KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
46
47# usbfs-like devices
48SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
49 MODE="0664"
50
51# iRiver music players
52SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \
53 ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
54
55# serial devices
56SUBSYSTEM=="tty", GROUP="dialout"
57SUBSYSTEM=="capi", GROUP="dialout"
58SUBSYSTEM=="slamr", GROUP="dialout"
59SUBSYSTEM=="zaptel", GROUP="dialout"
60
61# vc devices (all members of the tty subsystem)
62KERNEL=="ptmx", MODE="0666", GROUP="root"
63KERNEL=="console", MODE="0600", GROUP="root"
64KERNEL=="tty", MODE="0666", GROUP="root"
65KERNEL=="tty[0-9]*", GROUP="root"
66KERNEL=="pty*", MODE="0666", GROUP="tty"
67
68# video devices
69SUBSYSTEM=="video4linux", GROUP="video"
70SUBSYSTEM=="drm", GROUP="video"
71SUBSYSTEM=="dvb", GROUP="video"
72SUBSYSTEM=="em8300", GROUP="video"
73SUBSYSTEM=="graphics", GROUP="video"
74SUBSYSTEM=="nvidia", GROUP="video"
75
76# misc devices
77KERNEL=="random", MODE="0666"
78KERNEL=="urandom", MODE="0666"
79KERNEL=="mem", MODE="0640", GROUP="kmem"
80KERNEL=="kmem", MODE="0640", GROUP="kmem"
81KERNEL=="port", MODE="0640", GROUP="kmem"
82KERNEL=="full", MODE="0666"
83KERNEL=="null", MODE="0666"
84KERNEL=="zero", MODE="0666"
85KERNEL=="inotify", MODE="0666"
86KERNEL=="sgi_fetchop", MODE="0666"
87KERNEL=="sonypi", MODE="0666"
88KERNEL=="agpgart", GROUP="video"
89KERNEL=="nvram", GROUP="nvram"
90KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
91KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
92KERNEL=="fuse", GROUP="fuse"
93KERNEL=="kqemu", MODE="0666"
94KERNEL=="kvm", GROUP="kvm"
95KERNEL=="tun", MODE="0666",
96
97KERNEL=="cdemu[0-9]*", GROUP="cdrom"
98KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
99KERNEL=="pktcdvd", MODE="0644"
100
101KERNEL=="uverbs*", GROUP="rdma"
102KERNEL=="ucm*", GROUP="rdma"
103KERNEL=="rdma_ucm", GROUP="rdma"
104
105# printers and parallel devices
106SUBSYSTEM=="printer", GROUP="lp"
107SUBSYSTEM=="ppdev", GROUP="lp"
108KERNEL=="irlpt*", GROUP="lp"
109KERNEL=="pt[0-9]*", GROUP="tape"
110KERNEL=="pht[0-9]*", GROUP="tape"
111
112# sound devices
113SUBSYSTEM=="sound", GROUP="audio"
114
115# ieee1394 devices
116KERNEL=="raw1394", GROUP="disk"
117KERNEL=="dv1394*", GROUP="video"
118KERNEL=="video1394*", GROUP="video"
119
120# input devices
121KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
122 MODE="0664", GROUP="video"
123KERNEL=="js[0-9]*", MODE="0664"
124KERNEL=="lirc[0-9]*", GROUP="video"
125
126# AOE character devices
127SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
128SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
129
130LABEL="permissions_end"
131
diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest
deleted file mode 100644
index 0e39806b01..0000000000
--- a/meta/recipes-core/udev/udev/run-ptest
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2
3tar -C test/ -xJf test/sys.tar.xz
4make -k check-TESTS
5make test-sys-distclean
diff --git a/meta/recipes-core/udev/udev/run.rules b/meta/recipes-core/udev/udev/run.rules
deleted file mode 100644
index 75d71375bb..0000000000
--- a/meta/recipes-core/udev/udev/run.rules
+++ /dev/null
@@ -1,14 +0,0 @@
1# debugging monitor
2RUN+="socket:/org/kernel/udev/monitor"
3
4# run a command on remove events
5ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
6
7# ignore the events generated by virtual consoles
8KERNEL=="ptmx", OPTIONS+="last_rule"
9KERNEL=="console", OPTIONS+="last_rule"
10KERNEL=="tty" , OPTIONS+="last_rule"
11KERNEL=="tty[0-9]*", OPTIONS+="last_rule"
12KERNEL=="pty*", OPTIONS+="last_rule"
13SUBSYSTEM=="vc", OPTIONS+="last_rule"
14
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
deleted file mode 100644
index dcfff1cb45..0000000000
--- a/meta/recipes-core/udev/udev/udev-cache
+++ /dev/null
@@ -1,75 +0,0 @@
1#!/bin/sh -e
2
3### BEGIN INIT INFO
4# Provides: udev-cache
5# Required-Start: mountall
6# Required-Stop:
7# Default-Start: S
8# Default-Stop:
9# Short-Description: cache /dev to speedup the udev next boot
10### END INIT INFO
11
12export TZ=/etc/localtime
13
14[ -r /proc/mounts ] || exit 1
15[ -x @UDEVD@ ] || exit 1
16[ -d /sys/class ] || exit 1
17
18[ -f /etc/default/rcS ] && . /etc/default/rcS
19DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar"
20SYSCONF_CACHED="/etc/udev/cache.data"
21SYSCONF_TMP="/dev/shm/udev.cache"
22DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
23
24# A list of files which are used as a criteria to judge whether the udev cache could be reused.
25CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
26[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
27
28# List of files whose metadata (size/mtime/name) will be included in cached
29# system state.
30META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
31
32# Command to compute system configuration.
33sysconf_cmd () {
34 cat -- $CMP_FILE_LIST
35 stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
36}
37
38[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
39
40if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
41 [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache"
42 exit 0
43fi
44
45[ "$DEVCACHE" != "" ] || exit 0
46[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... "
47if ! [ -e "$DEVCACHE_REGEN" ]; then
48 [ "${VERBOSE}" == "no" ] || echo "not found."
49 exit 0
50fi
51[ "${VERBOSE}" == "no" ] || echo "found."
52echo "Populating dev cache"
53
54err_cleanup () {
55 echo "udev-cache: update failed!"
56 udevadm control --start-exec-queue
57 rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED"
58}
59
60(
61 set -e
62 trap 'err_cleanup' EXIT
63 udevadm control --stop-exec-queue
64 sysconf_cmd > "$SYSCONF_TMP"
65 find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \
66 | xargs tar cf "${DEVCACHE_TMP}"
67 gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
68 rm -f "${DEVCACHE_TMP}"
69 mv "$SYSCONF_TMP" "$SYSCONF_CACHED"
70 udevadm control --start-exec-queue
71 rm -f "$DEVCACHE_REGEN"
72 trap - EXIT
73) &
74
75exit 0
diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
deleted file mode 100644
index a3b732698d..0000000000
--- a/meta/recipes-core/udev/udev/udev-cache.default
+++ /dev/null
@@ -1,5 +0,0 @@
1# Default for /etc/init.d/udev
2
3# Comment this out to disable device cache
4DEVCACHE="/etc/udev-cache.tar.gz"
5PROBE_PLATFORM_BUS="yes"
diff --git a/meta/recipes-core/udev/udev/udev.rules b/meta/recipes-core/udev/udev/udev.rules
deleted file mode 100644
index a19d4a0bf6..0000000000
--- a/meta/recipes-core/udev/udev/udev.rules
+++ /dev/null
@@ -1,116 +0,0 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# workaround for devices which do not report media changes
17SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
18 ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
19SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
20 OPTIONS+="all_partitions"
21
22# SCSI devices
23SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
24
25# USB devices
26SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
27SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
28SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
29SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
30SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
31SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
32SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
33 ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
34 SYMLINK+="pilot"
35
36# usbfs-like devices
37SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
38 NAME="%c"
39SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
40
41# serial devices
42KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
43KERNEL=="capi[0-9]*", NAME="capi/%n"
44
45# video devices
46KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
47 NAME="%c"
48KERNEL=="card[0-9]*", NAME="dri/%k"
49
50# misc devices
51KERNEL=="hw_random", NAME="hwrng"
52KERNEL=="tun", NAME="net/%k"
53KERNEL=="evtchn", NAME="xen/%k"
54
55KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
56KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
57KERNEL=="pktcdvd", NAME="pktcdvd/control"
58
59KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
60KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
61KERNEL=="microcode", NAME="cpu/microcode"
62
63KERNEL=="umad*", NAME="infiniband/%k"
64KERNEL=="issm*", NAME="infiniband/%k"
65KERNEL=="uverbs*", NAME="infiniband/%k"
66KERNEL=="ucm*", NAME="infiniband/%k"
67KERNEL=="rdma_ucm", NAME="infiniband/%k"
68
69# ALSA devices
70KERNEL=="controlC[0-9]*", NAME="snd/%k"
71KERNEL=="hwC[D0-9]*", NAME="snd/%k"
72KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
73KERNEL=="midiC[D0-9]*", NAME="snd/%k"
74KERNEL=="timer", NAME="snd/%k"
75KERNEL=="seq", NAME="snd/%k"
76
77# ieee1394 devices
78KERNEL=="dv1394*", NAME="dv1394/%n"
79KERNEL=="video1394*", NAME="video1394/%n"
80
81# input devices
82KERNEL=="mice", NAME="input/%k"
83KERNEL=="mouse[0-9]*", NAME="input/%k"
84KERNEL=="event[0-9]*", NAME="input/%k"
85KERNEL=="js[0-9]*", NAME="input/%k"
86KERNEL=="ts[0-9]*", NAME="input/%k"
87KERNEL=="uinput", NAME="input/%k"
88
89# Zaptel
90KERNEL=="zapctl", NAME="zap/ctl"
91KERNEL=="zaptimer", NAME="zap/timer"
92KERNEL=="zapchannel", NAME="zap/channel"
93KERNEL=="zappseudo", NAME="zap/pseudo"
94KERNEL=="zap[0-9]*", NAME="zap/%n"
95
96# AOE character devices
97SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
98SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
99SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
100SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
101
102# device mapper creates its own device nodes, so ignore these
103KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
104KERNEL=="device-mapper", NAME="mapper/control"
105
106KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660"
107
108# Firmware Helper
109ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware.sh"
110
111# Samsung UARTS
112KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n"
113
114# MXC UARTs
115KERNEL=="ttymxc[0-4]", NAME="ttymxc%n"
116