diff options
Diffstat (limited to 'meta/recipes-core/udev/eudev')
-rw-r--r-- | meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch | 28 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch | 364 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/devfs-udev.rules | 108 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/init | 37 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/links.conf | 21 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/netifnames.patch | 17 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/permissions.rules | 131 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/run.rules | 14 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/udev.rules | 116 |
9 files changed, 54 insertions, 782 deletions
diff --git a/meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch b/meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch deleted file mode 100644 index fe2ba5328d..0000000000 --- a/meta/recipes-core/udev/eudev/0014-Revert-rules-remove-firmware-loading-rules.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 4f0a722489154da99e7f6b3051afde984eed2f74 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonathan Liu <net147@gmail.com> | ||
3 | Date: Thu, 19 Mar 2015 15:01:29 +1100 | ||
4 | Subject: [PATCH] Revert "rules: remove firmware loading rules" | ||
5 | |||
6 | This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19. | ||
7 | Userspace firmware loading support is needed for Linux < 3.7. | ||
8 | |||
9 | Upstream-Status: Inappropriate [OE specific] | ||
10 | |||
11 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
12 | --- | ||
13 | rules/50-firmware.rules | 3 +++ | ||
14 | 1 file changed, 3 insertions(+) | ||
15 | create mode 100644 rules/50-firmware.rules | ||
16 | |||
17 | diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules | ||
18 | new file mode 100644 | ||
19 | index 0000000..f0ae684 | ||
20 | --- /dev/null | ||
21 | +++ b/rules/50-firmware.rules | ||
22 | @@ -0,0 +1,3 @@ | ||
23 | +# do not edit this file, it will be overwritten on update | ||
24 | + | ||
25 | +SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware" | ||
26 | -- | ||
27 | 2.3.3 | ||
28 | |||
diff --git a/meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch b/meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch deleted file mode 100644 index db333e9376..0000000000 --- a/meta/recipes-core/udev/eudev/Revert-udev-remove-userspace-firmware-loading-suppor.patch +++ /dev/null | |||
@@ -1,364 +0,0 @@ | |||
1 | From e415372cc7a2f52e70e1cfa8c6c1f633b411355d Mon Sep 17 00:00:00 2001 | ||
2 | From: Lauren Post <lauren.post@nxp.com> | ||
3 | Date: Wed, 8 Jun 2016 06:51:56 -0500 | ||
4 | Subject: [PATCH] Revert "udev: remove userspace firmware loading support" | ||
5 | |||
6 | This reverts commit 3b717594600fa717cdf9bcfd0c7c1b703b245482. | ||
7 | |||
8 | Conflicts: | ||
9 | configure.ac | ||
10 | src/udev/udevd.c | ||
11 | |||
12 | Upstream-Status: Inappropriate [OE specific] | ||
13 | |||
14 | Signed-off-by: Lauren Post <lauren.post@nxp.com> | ||
15 | --- | ||
16 | configure.ac | 39 +++++++++- | ||
17 | rules/Makefile.am | 5 ++ | ||
18 | src/udev/Makefile.am | 10 +++ | ||
19 | src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++ | ||
20 | src/udev/udev-builtin.c | 3 + | ||
21 | src/udev/udev.h | 6 ++ | ||
22 | src/udev/udevd.c | 13 ++++ | ||
23 | 7 files changed, 227 insertions(+), 3 deletions(-) | ||
24 | create mode 100644 src/udev/udev-builtin-firmware.c | ||
25 | |||
26 | diff --git a/configure.ac b/configure.ac | ||
27 | index 8691891..65028c2 100644 | ||
28 | --- a/configure.ac | ||
29 | +++ b/configure.ac | ||
30 | @@ -238,9 +238,42 @@ AC_CHECK_DECL([unshare], | ||
31 | [#include <sched.h>]) | ||
32 | |||
33 | # ------------------------------------------------------------------------------ | ||
34 | -AC_PATH_TOOL(GPERF, gperf) | ||
35 | -if test -z "$GPERF" ; then | ||
36 | - AC_MSG_ERROR([*** gperf not found]) | ||
37 | +AC_ARG_WITH(firmware-path, | ||
38 | + AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], | ||
39 | + [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]), | ||
40 | + [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"]) | ||
41 | +OLD_IFS=$IFS | ||
42 | +IFS=: | ||
43 | +for i in $with_firmware_path; do | ||
44 | + if test "x${FIRMWARE_PATH}" = "x"; then | ||
45 | + FIRMWARE_PATH="\\\"${i}/\\\"" | ||
46 | + else | ||
47 | + FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" | ||
48 | + fi | ||
49 | +done | ||
50 | +IFS=$OLD_IFS | ||
51 | +AC_SUBST(FIRMWARE_PATH) | ||
52 | +AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) | ||
53 | +AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) | ||
54 | + | ||
55 | +# ------------------------------------------------------------------------------ | ||
56 | +AC_ARG_ENABLE([gudev], | ||
57 | + AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]), | ||
58 | + [], [enable_gudev=yes]) | ||
59 | +AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ]) | ||
60 | +AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"]) | ||
61 | + | ||
62 | +# ------------------------------------------------------------------------------ | ||
63 | +AC_ARG_ENABLE([keymap], | ||
64 | + AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]), | ||
65 | + [], [enable_keymap=yes]) | ||
66 | + | ||
67 | +if test "x$enable_keymap" = "xyes"; then | ||
68 | + AC_PATH_TOOL(GPERF, gperf) | ||
69 | + if test -z "$GPERF" ; then | ||
70 | + AC_MSG_ERROR([*** gperf not found]) | ||
71 | + fi | ||
72 | + AC_DEFINE([ENABLE_KEYMAP], [1], [Define if we are enabling rule generator]) | ||
73 | fi | ||
74 | |||
75 | # ------------------------------------------------------------------------------ | ||
76 | diff --git a/rules/Makefile.am b/rules/Makefile.am | ||
77 | index 24c099c..d714ae3 100644 | ||
78 | --- a/rules/Makefile.am | ||
79 | +++ b/rules/Makefile.am | ||
80 | @@ -22,6 +22,11 @@ dist_udevrules_DATA += \ | ||
81 | 80-net-name-slot.rules | ||
82 | endif | ||
83 | |||
84 | +if ENABLE_FIRMWARE | ||
85 | +dist_udevrules_DATA += \ | ||
86 | + 50-firmware.rules | ||
87 | +endif | ||
88 | + | ||
89 | if HAVE_BLKID | ||
90 | dist_udevrules_DATA += \ | ||
91 | 60-persistent-storage.rules | ||
92 | diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am | ||
93 | index 401af01..742fbc8 100644 | ||
94 | --- a/src/udev/Makefile.am | ||
95 | +++ b/src/udev/Makefile.am | ||
96 | @@ -53,12 +53,18 @@ libudev_core_la_SOURCES = \ | ||
97 | udev-ctrl.c \ | ||
98 | udev-builtin.c \ | ||
99 | udev-builtin-btrfs.c \ | ||
100 | + udev-builtin-firmware.c \ | ||
101 | udev-builtin-hwdb.c \ | ||
102 | udev-builtin-input_id.c \ | ||
103 | udev-builtin-net_id.c \ | ||
104 | udev-builtin-path_id.c \ | ||
105 | udev-builtin-usb_id.c | ||
106 | |||
107 | +if ENABLE_FIRMWARE | ||
108 | +libudev_core_la_SOURCES += \ | ||
109 | + udev-builtin-firmware.c | ||
110 | +endif | ||
111 | + | ||
112 | include_HEADERS = \ | ||
113 | udev.h | ||
114 | |||
115 | @@ -86,6 +92,10 @@ libudev_core_la_LIBADD += \ | ||
116 | $(KMOD_LIBS) | ||
117 | endif | ||
118 | |||
119 | +libudev_core_la_CPPFLAGS = \ | ||
120 | + $(AM_CPPFLAGS) \ | ||
121 | + -DFIRMWARE_PATH="$(FIRMWARE_PATH)" | ||
122 | + | ||
123 | # | ||
124 | # Extras | ||
125 | # | ||
126 | diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c | ||
127 | new file mode 100644 | ||
128 | index 0000000..bd8c2fb | ||
129 | --- /dev/null | ||
130 | +++ b/src/udev/udev-builtin-firmware.c | ||
131 | @@ -0,0 +1,154 @@ | ||
132 | +/* | ||
133 | + * firmware - Kernel firmware loader | ||
134 | + * | ||
135 | + * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com> | ||
136 | + * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org> | ||
137 | + * | ||
138 | + * This program is free software; you can redistribute it and/or | ||
139 | + * modify it under the terms of the GNU General Public License as | ||
140 | + * published by the Free Software Foundation; either version 2 of the | ||
141 | + * License, or (at your option) any later version. | ||
142 | + * | ||
143 | + * This program is distributed in the hope that it will be useful, but | ||
144 | + * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
145 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
146 | + * General Public License for more details:* | ||
147 | + */ | ||
148 | + | ||
149 | +#include <unistd.h> | ||
150 | +#include <stdlib.h> | ||
151 | +#include <string.h> | ||
152 | +#include <stdio.h> | ||
153 | +#include <getopt.h> | ||
154 | +#include <errno.h> | ||
155 | +#include <stdbool.h> | ||
156 | +#include <sys/utsname.h> | ||
157 | +#include <sys/stat.h> | ||
158 | + | ||
159 | +#include "udev.h" | ||
160 | + | ||
161 | +static bool set_loading(struct udev *udev, char *loadpath, const char *state) { | ||
162 | + FILE *ldfile; | ||
163 | + | ||
164 | + ldfile = fopen(loadpath, "we"); | ||
165 | + if (ldfile == NULL) { | ||
166 | + log_error("error: can not open '%s'", loadpath); | ||
167 | + return false; | ||
168 | + }; | ||
169 | + fprintf(ldfile, "%s\n", state); | ||
170 | + fclose(ldfile); | ||
171 | + return true; | ||
172 | +} | ||
173 | + | ||
174 | +static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) { | ||
175 | + char *buf; | ||
176 | + FILE *fsource = NULL, *ftarget = NULL; | ||
177 | + bool ret = false; | ||
178 | + | ||
179 | + buf = malloc(size); | ||
180 | + if (buf == NULL) { | ||
181 | + log_error("No memory available to load firmware file"); | ||
182 | + return false; | ||
183 | + } | ||
184 | + | ||
185 | + log_debug("writing '%s' (%zi) to '%s'", source, size, target); | ||
186 | + | ||
187 | + fsource = fopen(source, "re"); | ||
188 | + if (fsource == NULL) | ||
189 | + goto exit; | ||
190 | + ftarget = fopen(target, "we"); | ||
191 | + if (ftarget == NULL) | ||
192 | + goto exit; | ||
193 | + if (fread(buf, size, 1, fsource) != 1) | ||
194 | + goto exit; | ||
195 | + if (fwrite(buf, size, 1, ftarget) == 1) | ||
196 | + ret = true; | ||
197 | +exit: | ||
198 | + if (ftarget != NULL) | ||
199 | + fclose(ftarget); | ||
200 | + if (fsource != NULL) | ||
201 | + fclose(fsource); | ||
202 | + free(buf); | ||
203 | + return ret; | ||
204 | +} | ||
205 | + | ||
206 | +static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) { | ||
207 | + struct udev *udev = udev_device_get_udev(dev); | ||
208 | + static const char *searchpath[] = { FIRMWARE_PATH }; | ||
209 | + char loadpath[UTIL_PATH_SIZE]; | ||
210 | + char datapath[UTIL_PATH_SIZE]; | ||
211 | + char fwpath[UTIL_PATH_SIZE]; | ||
212 | + const char *firmware; | ||
213 | + FILE *fwfile = NULL; | ||
214 | + struct utsname kernel; | ||
215 | + struct stat statbuf; | ||
216 | + unsigned int i; | ||
217 | + int rc = EXIT_SUCCESS; | ||
218 | + | ||
219 | + firmware = udev_device_get_property_value(dev, "FIRMWARE"); | ||
220 | + if (firmware == NULL) { | ||
221 | + log_error("firmware parameter missing"); | ||
222 | + rc = EXIT_FAILURE; | ||
223 | + goto exit; | ||
224 | + } | ||
225 | + | ||
226 | + /* lookup firmware file */ | ||
227 | + uname(&kernel); | ||
228 | + for (i = 0; i < ELEMENTSOF(searchpath); i++) { | ||
229 | + strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL); | ||
230 | + fwfile = fopen(fwpath, "re"); | ||
231 | + if (fwfile != NULL) | ||
232 | + break; | ||
233 | + | ||
234 | + strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL); | ||
235 | + fwfile = fopen(fwpath, "re"); | ||
236 | + if (fwfile != NULL) | ||
237 | + break; | ||
238 | + } | ||
239 | + | ||
240 | + strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL); | ||
241 | + | ||
242 | + if (fwfile == NULL) { | ||
243 | + log_debug("did not find firmware file '%s'", firmware); | ||
244 | + rc = EXIT_FAILURE; | ||
245 | + /* | ||
246 | + * Do not cancel the request in the initrd, the real root might have | ||
247 | + * the firmware file and the 'coldplug' run in the real root will find | ||
248 | + * this pending request and fulfill or cancel it. | ||
249 | + * */ | ||
250 | + if (!in_initrd()) | ||
251 | + set_loading(udev, loadpath, "-1"); | ||
252 | + goto exit; | ||
253 | + } | ||
254 | + | ||
255 | + if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) { | ||
256 | + if (!in_initrd()) | ||
257 | + set_loading(udev, loadpath, "-1"); | ||
258 | + rc = EXIT_FAILURE; | ||
259 | + goto exit; | ||
260 | + } | ||
261 | + | ||
262 | + if (!set_loading(udev, loadpath, "1")) | ||
263 | + goto exit; | ||
264 | + | ||
265 | + strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL); | ||
266 | + if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) { | ||
267 | + log_error("error sending firmware '%s' to device", firmware); | ||
268 | + set_loading(udev, loadpath, "-1"); | ||
269 | + rc = EXIT_FAILURE; | ||
270 | + goto exit; | ||
271 | + }; | ||
272 | + | ||
273 | + set_loading(udev, loadpath, "0"); | ||
274 | +exit: | ||
275 | + if (fwfile) | ||
276 | + fclose(fwfile); | ||
277 | + return rc; | ||
278 | +} | ||
279 | + | ||
280 | +const struct udev_builtin udev_builtin_firmware = { | ||
281 | + .name = "firmware", | ||
282 | + .cmd = builtin_firmware, | ||
283 | + .help = "kernel firmware loader", | ||
284 | + .run_once = true, | ||
285 | +}; | ||
286 | diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c | ||
287 | index 74b3bdc..3657106 100644 | ||
288 | --- a/src/udev/udev-builtin.c | ||
289 | +++ b/src/udev/udev-builtin.c | ||
290 | @@ -34,6 +34,9 @@ static const struct udev_builtin *builtins[] = { | ||
291 | [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, | ||
292 | #endif | ||
293 | [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, | ||
294 | +#ifdef HAVE_FIRMWARE | ||
295 | + [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware, | ||
296 | +#endif | ||
297 | [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, | ||
298 | [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, | ||
299 | [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard, | ||
300 | diff --git a/src/udev/udev.h b/src/udev/udev.h | ||
301 | index 198cb2c..01a1e9c 100644 | ||
302 | --- a/src/udev/udev.h | ||
303 | +++ b/src/udev/udev.h | ||
304 | @@ -149,6 +149,9 @@ enum udev_builtin_cmd { | ||
305 | UDEV_BUILTIN_BLKID, | ||
306 | #endif | ||
307 | UDEV_BUILTIN_BTRFS, | ||
308 | +#ifdef HAVE_FIRMWARE | ||
309 | + UDEV_BUILTIN_FIRMWARE, | ||
310 | +#endif | ||
311 | UDEV_BUILTIN_HWDB, | ||
312 | UDEV_BUILTIN_INPUT_ID, | ||
313 | UDEV_BUILTIN_KEYBOARD, | ||
314 | @@ -173,6 +176,9 @@ struct udev_builtin { | ||
315 | extern const struct udev_builtin udev_builtin_blkid; | ||
316 | #endif | ||
317 | extern const struct udev_builtin udev_builtin_btrfs; | ||
318 | +#ifdef HAVE_FIRMWARE | ||
319 | +extern const struct udev_builtin udev_builtin_firmware; | ||
320 | +#endif | ||
321 | extern const struct udev_builtin udev_builtin_hwdb; | ||
322 | extern const struct udev_builtin udev_builtin_input_id; | ||
323 | extern const struct udev_builtin udev_builtin_keyboard; | ||
324 | diff --git a/src/udev/udevd.c b/src/udev/udevd.c | ||
325 | index b1de97a..35655d8 100644 | ||
326 | --- a/src/udev/udevd.c | ||
327 | +++ b/src/udev/udevd.c | ||
328 | @@ -101,6 +101,9 @@ struct event { | ||
329 | bool is_block; | ||
330 | usec_t start_usec; | ||
331 | bool warned; | ||
332 | +#ifdef HAVE_FIRMWARE | ||
333 | + bool nodelay; | ||
334 | +#endif | ||
335 | }; | ||
336 | |||
337 | static inline struct event *node_to_event(struct udev_list_node *node) { | ||
338 | @@ -491,6 +494,10 @@ static int event_queue_insert(struct udev_device *dev) { | ||
339 | event->devnum = udev_device_get_devnum(dev); | ||
340 | event->is_block = streq("block", udev_device_get_subsystem(dev)); | ||
341 | event->ifindex = udev_device_get_ifindex(dev); | ||
342 | +#ifdef HAVE_FIRMWARE | ||
343 | + if (streq(udev_device_get_subsystem(dev), "firmware")) | ||
344 | + event->nodelay = true; | ||
345 | +#endif | ||
346 | |||
347 | log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), | ||
348 | udev_device_get_action(dev), udev_device_get_subsystem(dev)); | ||
349 | @@ -566,6 +573,12 @@ static bool is_devpath_busy(struct event *event) { | ||
350 | return true; | ||
351 | } | ||
352 | |||
353 | +#ifdef HAVE_FIRMWARE | ||
354 | + /* allow to bypass the dependency tracking */ | ||
355 | + if (event->nodelay) | ||
356 | + continue; | ||
357 | +#endif | ||
358 | + | ||
359 | /* parent device event found */ | ||
360 | if (event->devpath[common] == '/') { | ||
361 | event->delaying_seqnum = loop_event->seqnum; | ||
362 | -- | ||
363 | 1.9.1 | ||
364 | |||
diff --git a/meta/recipes-core/udev/eudev/devfs-udev.rules b/meta/recipes-core/udev/eudev/devfs-udev.rules deleted file mode 100644 index 0ba1ad4e7f..0000000000 --- a/meta/recipes-core/udev/eudev/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 | ||
8 | BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}" | ||
9 | |||
10 | # md block devices | ||
11 | KERNEL="md[0-9]*", NAME="md/%n" | ||
12 | |||
13 | # floppy devices | ||
14 | KERNEL="fd[0-9]*", NAME="floppy/%n" | ||
15 | |||
16 | # tty devices | ||
17 | KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k" | ||
18 | KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k" | ||
19 | KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n" | ||
20 | |||
21 | # vc devices | ||
22 | KERNEL="vcs", NAME="vcc/0" | ||
23 | KERNEL="vcs[0-9]*", NAME="vcc/%n" | ||
24 | KERNEL="vcsa", NAME="vcc/a0" | ||
25 | KERNEL="vcsa[0-9]*", NAME="vcc/a%n" | ||
26 | |||
27 | # v4l devices | ||
28 | KERNEL="video[0-9]*", NAME="v4l/video%n" | ||
29 | KERNEL="radio[0-9]*", NAME="v4l/radio%n" | ||
30 | KERNEL="vbi[0-9]*", NAME="v4l/vbi%n" | ||
31 | KERNEL="vtx[0-9]*", NAME="v4l/vtx%n" | ||
32 | |||
33 | # dm devices (ignore them) | ||
34 | KERNEL="dm-[0-9]*", NAME="" | ||
35 | |||
36 | # i2c devices | ||
37 | KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k" | ||
38 | |||
39 | # loop devices | ||
40 | KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k" | ||
41 | |||
42 | # ramdisks | ||
43 | KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k" | ||
44 | |||
45 | # framebuffer devices | ||
46 | KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k" | ||
47 | |||
48 | # misc | ||
49 | KERNEL="rtc", NAME="misc/%k", SYMLINK="%k" | ||
50 | KERNEL="psaux", NAME="misc/%k", SYMLINK="%k" | ||
51 | KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k" | ||
52 | KERNEL="rtc", NAME="misc/%k", SYMLINK="%k" | ||
53 | KERNEL="psaux", NAME="misc/%k", SYMLINK="%k" | ||
54 | KERNEL="uinput", NAME="misc/%k", SYMLINK="%k" | ||
55 | |||
56 | # alsa devices | ||
57 | KERNEL="controlC[0-9]*", NAME="snd/%k" | ||
58 | KERNEL="hw[CD0-9]*", NAME="snd/%k" | ||
59 | KERNEL="pcm[CD0-9cp]*", NAME="snd/%k" | ||
60 | KERNEL="midi[CD0-9]*", NAME="snd/%k" | ||
61 | KERNEL="timer", NAME="snd/%k" | ||
62 | KERNEL="seq", NAME="snd/%k" | ||
63 | |||
64 | # oss devices | ||
65 | KERNEL="audio*", NAME="sound/%k", SYMLINK="%k" | ||
66 | KERNEL="dmmidi", NAME="sound/%k", SYMLINK="%k" | ||
67 | KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k" | ||
68 | KERNEL="midi*", NAME="sound/%k", SYMLINK="%k" | ||
69 | KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k" | ||
70 | KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k" | ||
71 | |||
72 | # input devices | ||
73 | KERNEL="mice", NAME="input/%k" | ||
74 | KERNEL="mouse*", NAME="input/%k" | ||
75 | KERNEL="event*", NAME="input/%k" | ||
76 | KERNEL="js*", NAME="input/%k" | ||
77 | KERNEL="ts*", NAME="input/%k" | ||
78 | |||
79 | # USB devices | ||
80 | KERNEL="hiddev*", NAME="usb/%k" | ||
81 | KERNEL="auer*", NAME="usb/%k" | ||
82 | KERNEL="legousbtower*", NAME="usb/%k" | ||
83 | KERNEL="dabusb*", NAME="usb/%k" | ||
84 | BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k" | ||
85 | |||
86 | # netlink devices | ||
87 | KERNEL="route", NAME="netlink/%k" | ||
88 | KERNEL="skip", NAME="netlink/%k" | ||
89 | KERNEL="usersock", NAME="netlink/%k" | ||
90 | KERNEL="fwmonitor", NAME="netlink/%k" | ||
91 | KERNEL="tcpdiag", NAME="netlink/%k" | ||
92 | KERNEL="nflog", NAME="netlink/%k" | ||
93 | KERNEL="xfrm", NAME="netlink/%k" | ||
94 | KERNEL="arpd", NAME="netlink/%k" | ||
95 | KERNEL="route6", NAME="netlink/%k" | ||
96 | KERNEL="ip6_fw", NAME="netlink/%k" | ||
97 | KERNEL="dnrtmsg", NAME="netlink/%k" | ||
98 | KERNEL="tap*", NAME="netlink/%k" | ||
99 | |||
100 | # CAPI devices | ||
101 | KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20" | ||
102 | KERNEL="capi*", NAME="capi/%n" | ||
103 | |||
104 | # Network devices | ||
105 | KERNEL="tun", NAME="net/%k" | ||
106 | |||
107 | # raw devices | ||
108 | KERNEL="raw[0-9]*", NAME="raw/%k" | ||
diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init index c60dbbf6d5..477a525b21 100644 --- a/meta/recipes-core/udev/eudev/init +++ b/meta/recipes-core/udev/eudev/init | |||
@@ -23,6 +23,42 @@ kill_udevd () { | |||
23 | [ -n "$pid" ] && kill $pid | 23 | [ -n "$pid" ] && kill $pid |
24 | } | 24 | } |
25 | 25 | ||
26 | make_static_nodes () { | ||
27 | [ -e /lib/modules/$(uname -r)/modules.devname ] || return 0 | ||
28 | [ -x @KMOD@ ] || return 0 | ||
29 | |||
30 | #output to /proc/self/fd/1 since /dev/stdout not created by udevd yet | ||
31 | @KMOD@ static-nodes --format=tmpfiles --output=/proc/self/fd/1 | | ||
32 | while read TTYPE TPATH TMODE TUSER TGROUP TAGE TARG; do | ||
33 | case "${TTYPE}" in | ||
34 | 'd') | ||
35 | test -d "${TPATH}" || mkdir -p -m "${TMODE}" "${TPATH}" | ||
36 | ;; | ||
37 | |||
38 | 'c!') | ||
39 | if [ ! -c "${TPATH}" ]; then | ||
40 | old_ifs="${IFS}" | ||
41 | IFS=: | ||
42 | set -- ${TARG} | ||
43 | IFS="${old_ifs}" | ||
44 | mknod -m "${TMODE}" "${TPATH}" c "$@" | ||
45 | fi | ||
46 | ;; | ||
47 | |||
48 | *) | ||
49 | echo "Unparseable line (${TTYPE} ${TPATH} ${TMODE} ${TUSER} ${TGROUP} ${TAGE} ${TARG})" | ||
50 | return 1 | ||
51 | ;; | ||
52 | esac | ||
53 | if [ "${TUSER}" != "-" ]; then | ||
54 | chown "${TUSER}" "${TPATH}" | ||
55 | fi | ||
56 | if [ "${TGROUP}" != "-" ]; then | ||
57 | chgrp "${TGROUP}" "${TPATH}" | ||
58 | fi | ||
59 | done | ||
60 | } | ||
61 | |||
26 | case "$1" in | 62 | case "$1" in |
27 | start) | 63 | start) |
28 | export ACTION=add | 64 | export ACTION=add |
@@ -51,6 +87,7 @@ case "$1" in | |||
51 | # make_extra_nodes | 87 | # make_extra_nodes |
52 | kill_udevd > "/dev/null" 2>&1 | 88 | kill_udevd > "/dev/null" 2>&1 |
53 | 89 | ||
90 | make_static_nodes | ||
54 | # trigger the sorted events | 91 | # trigger the sorted events |
55 | [ -e /proc/sys/kernel/hotplug ] && printf '\0\n' >/proc/sys/kernel/hotplug | 92 | [ -e /proc/sys/kernel/hotplug ] && printf '\0\n' >/proc/sys/kernel/hotplug |
56 | @UDEVD@ -d | 93 | @UDEVD@ -d |
diff --git a/meta/recipes-core/udev/eudev/links.conf b/meta/recipes-core/udev/eudev/links.conf deleted file mode 100644 index 8fff922db6..0000000000 --- a/meta/recipes-core/udev/eudev/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 | |||
4 | L fd /proc/self/fd | ||
5 | L stdin /proc/self/fd/0 | ||
6 | L stdout /proc/self/fd/1 | ||
7 | L stderr /proc/self/fd/2 | ||
8 | L core /proc/kcore | ||
9 | L sndstat /proc/asound/oss/sndstat | ||
10 | L MAKEDEV /sbin/MAKEDEV | ||
11 | |||
12 | D pts | ||
13 | D shm | ||
14 | |||
15 | # Hic sunt leones. | ||
16 | M ppp c 108 0 | ||
17 | D loop | ||
18 | M loop/0 b 7 0 | ||
19 | D net | ||
20 | M net/tun c 10 200 | ||
21 | |||
diff --git a/meta/recipes-core/udev/eudev/netifnames.patch b/meta/recipes-core/udev/eudev/netifnames.patch new file mode 100644 index 0000000000..4f8e54d12d --- /dev/null +++ b/meta/recipes-core/udev/eudev/netifnames.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | eudev: consider ID_NET_NAME_MAC as an interface name | ||
2 | |||
3 | eudev might not create names based on slot or path. | ||
4 | |||
5 | Upstream-Status: Backport [github.com/eudev-project/eudev/pull/274] | ||
6 | |||
7 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
8 | |||
9 | --- a/rules/80-net-name-slot.rules | ||
10 | +++ b/rules/80-net-name-slot.rules | ||
11 | @@ -10,5 +10,6 @@ ENV{net.ifnames}=="0", GOTO="net_name_sl | ||
12 | NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}" | ||
13 | NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}" | ||
14 | NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}" | ||
15 | +NAME=="", ENV{ID_NET_NAME_MAC}!="", NAME="$env{ID_NET_NAME_MAC}" | ||
16 | |||
17 | LABEL="net_name_slot_end" | ||
diff --git a/meta/recipes-core/udev/eudev/permissions.rules b/meta/recipes-core/udev/eudev/permissions.rules deleted file mode 100644 index 205b733292..0000000000 --- a/meta/recipes-core/udev/eudev/permissions.rules +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | ACTION!="add", GOTO="permissions_end" | ||
2 | |||
3 | # workarounds needed to synchronize with sysfs | ||
4 | # only needed for kernels < v2.6.18-rc1 | ||
5 | ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" | ||
6 | SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" | ||
7 | # only needed for kernels < 2.6.16 | ||
8 | SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" | ||
9 | # only needed for kernels < 2.6.17 | ||
10 | SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" | ||
11 | |||
12 | # devices needed to load the drivers providing them | ||
13 | KERNEL=="tun", OPTIONS+="ignore_remove" | ||
14 | KERNEL=="ppp", OPTIONS+="ignore_remove" | ||
15 | KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove" | ||
16 | |||
17 | # default permissions for block devices | ||
18 | SUBSYSTEM=="block", GROUP="disk" | ||
19 | # the aacraid driver is broken and reports that disks removable (see #404927) | ||
20 | SUBSYSTEM=="block", ATTRS{removable}=="1", \ | ||
21 | DRIVERS!="aacraid", GROUP="floppy" | ||
22 | # all block devices on these buses are "removable" | ||
23 | SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy" | ||
24 | |||
25 | # IDE devices | ||
26 | KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \ | ||
27 | IMPORT{program}="cdrom_id --export $tempnode" | ||
28 | ENV{ID_CDROM}=="?*", GROUP="cdrom" | ||
29 | KERNEL=="ht[0-9]*", GROUP="tape" | ||
30 | KERNEL=="nht[0-9]*", GROUP="tape" | ||
31 | |||
32 | # SCSI devices | ||
33 | KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" | ||
34 | SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" | ||
35 | SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" | ||
36 | SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" | ||
37 | SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" | ||
38 | SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" | ||
39 | SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" | ||
40 | SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" | ||
41 | SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape" | ||
42 | |||
43 | # USB devices | ||
44 | KERNEL=="legousbtower*", MODE="0666" | ||
45 | KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" | ||
46 | |||
47 | # usbfs-like devices | ||
48 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ | ||
49 | MODE="0664" | ||
50 | |||
51 | # iRiver music players | ||
52 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ | ||
53 | ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" | ||
54 | |||
55 | # serial devices | ||
56 | SUBSYSTEM=="tty", GROUP="dialout" | ||
57 | SUBSYSTEM=="capi", GROUP="dialout" | ||
58 | SUBSYSTEM=="slamr", GROUP="dialout" | ||
59 | SUBSYSTEM=="zaptel", GROUP="dialout" | ||
60 | |||
61 | # vc devices (all members of the tty subsystem) | ||
62 | KERNEL=="ptmx", MODE="0666", GROUP="root" | ||
63 | KERNEL=="console", MODE="0600", GROUP="root" | ||
64 | KERNEL=="tty", MODE="0666", GROUP="root" | ||
65 | KERNEL=="tty[0-9]*", GROUP="root" | ||
66 | KERNEL=="pty*", MODE="0666", GROUP="tty" | ||
67 | |||
68 | # video devices | ||
69 | SUBSYSTEM=="video4linux", GROUP="video" | ||
70 | SUBSYSTEM=="drm", GROUP="video" | ||
71 | SUBSYSTEM=="dvb", GROUP="video" | ||
72 | SUBSYSTEM=="em8300", GROUP="video" | ||
73 | SUBSYSTEM=="graphics", GROUP="video" | ||
74 | SUBSYSTEM=="nvidia", GROUP="video" | ||
75 | |||
76 | # misc devices | ||
77 | KERNEL=="random", MODE="0666" | ||
78 | KERNEL=="urandom", MODE="0666" | ||
79 | KERNEL=="mem", MODE="0640", GROUP="kmem" | ||
80 | KERNEL=="kmem", MODE="0640", GROUP="kmem" | ||
81 | KERNEL=="port", MODE="0640", GROUP="kmem" | ||
82 | KERNEL=="full", MODE="0666" | ||
83 | KERNEL=="null", MODE="0666" | ||
84 | KERNEL=="zero", MODE="0666" | ||
85 | KERNEL=="inotify", MODE="0666" | ||
86 | KERNEL=="sgi_fetchop", MODE="0666" | ||
87 | KERNEL=="sonypi", MODE="0666" | ||
88 | KERNEL=="agpgart", GROUP="video" | ||
89 | KERNEL=="nvram", GROUP="nvram" | ||
90 | KERNEL=="rtc|rtc[0-9]*", GROUP="audio" | ||
91 | KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" | ||
92 | KERNEL=="fuse", GROUP="fuse" | ||
93 | KERNEL=="kqemu", MODE="0666" | ||
94 | KERNEL=="kvm", GROUP="kvm" | ||
95 | KERNEL=="tun", MODE="0666", | ||
96 | |||
97 | KERNEL=="cdemu[0-9]*", GROUP="cdrom" | ||
98 | KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" | ||
99 | KERNEL=="pktcdvd", MODE="0644" | ||
100 | |||
101 | KERNEL=="uverbs*", GROUP="rdma" | ||
102 | KERNEL=="ucm*", GROUP="rdma" | ||
103 | KERNEL=="rdma_ucm", GROUP="rdma" | ||
104 | |||
105 | # printers and parallel devices | ||
106 | SUBSYSTEM=="printer", GROUP="lp" | ||
107 | SUBSYSTEM=="ppdev", GROUP="lp" | ||
108 | KERNEL=="irlpt*", GROUP="lp" | ||
109 | KERNEL=="pt[0-9]*", GROUP="tape" | ||
110 | KERNEL=="pht[0-9]*", GROUP="tape" | ||
111 | |||
112 | # sound devices | ||
113 | SUBSYSTEM=="sound", GROUP="audio" | ||
114 | |||
115 | # ieee1394 devices | ||
116 | KERNEL=="raw1394", GROUP="disk" | ||
117 | KERNEL=="dv1394*", GROUP="video" | ||
118 | KERNEL=="video1394*", GROUP="video" | ||
119 | |||
120 | # input devices | ||
121 | KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \ | ||
122 | MODE="0664", GROUP="video" | ||
123 | KERNEL=="js[0-9]*", MODE="0664" | ||
124 | KERNEL=="lirc[0-9]*", GROUP="video" | ||
125 | |||
126 | # AOE character devices | ||
127 | SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" | ||
128 | SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" | ||
129 | |||
130 | LABEL="permissions_end" | ||
131 | |||
diff --git a/meta/recipes-core/udev/eudev/run.rules b/meta/recipes-core/udev/eudev/run.rules deleted file mode 100644 index 75d71375bb..0000000000 --- a/meta/recipes-core/udev/eudev/run.rules +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # debugging monitor | ||
2 | RUN+="socket:/org/kernel/udev/monitor" | ||
3 | |||
4 | # run a command on remove events | ||
5 | ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" | ||
6 | |||
7 | # ignore the events generated by virtual consoles | ||
8 | KERNEL=="ptmx", OPTIONS+="last_rule" | ||
9 | KERNEL=="console", OPTIONS+="last_rule" | ||
10 | KERNEL=="tty" , OPTIONS+="last_rule" | ||
11 | KERNEL=="tty[0-9]*", OPTIONS+="last_rule" | ||
12 | KERNEL=="pty*", OPTIONS+="last_rule" | ||
13 | SUBSYSTEM=="vc", OPTIONS+="last_rule" | ||
14 | |||
diff --git a/meta/recipes-core/udev/eudev/udev.rules b/meta/recipes-core/udev/eudev/udev.rules deleted file mode 100644 index a19d4a0bf6..0000000000 --- a/meta/recipes-core/udev/eudev/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 | ||
17 | SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \ | ||
18 | ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions" | ||
19 | SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \ | ||
20 | OPTIONS+="all_partitions" | ||
21 | |||
22 | # SCSI devices | ||
23 | SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" | ||
24 | |||
25 | # USB devices | ||
26 | SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" | ||
27 | SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k" | ||
28 | SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k" | ||
29 | SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k" | ||
30 | SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" | ||
31 | SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" | ||
32 | SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ | ||
33 | ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \ | ||
34 | SYMLINK+="pilot" | ||
35 | |||
36 | # usbfs-like devices | ||
37 | SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ | ||
38 | NAME="%c" | ||
39 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" | ||
40 | |||
41 | # serial devices | ||
42 | KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" | ||
43 | KERNEL=="capi[0-9]*", NAME="capi/%n" | ||
44 | |||
45 | # video devices | ||
46 | KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \ | ||
47 | NAME="%c" | ||
48 | KERNEL=="card[0-9]*", NAME="dri/%k" | ||
49 | |||
50 | # misc devices | ||
51 | KERNEL=="hw_random", NAME="hwrng" | ||
52 | KERNEL=="tun", NAME="net/%k" | ||
53 | KERNEL=="evtchn", NAME="xen/%k" | ||
54 | |||
55 | KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" | ||
56 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" | ||
57 | KERNEL=="pktcdvd", NAME="pktcdvd/control" | ||
58 | |||
59 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" | ||
60 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" | ||
61 | KERNEL=="microcode", NAME="cpu/microcode" | ||
62 | |||
63 | KERNEL=="umad*", NAME="infiniband/%k" | ||
64 | KERNEL=="issm*", NAME="infiniband/%k" | ||
65 | KERNEL=="uverbs*", NAME="infiniband/%k" | ||
66 | KERNEL=="ucm*", NAME="infiniband/%k" | ||
67 | KERNEL=="rdma_ucm", NAME="infiniband/%k" | ||
68 | |||
69 | # ALSA devices | ||
70 | KERNEL=="controlC[0-9]*", NAME="snd/%k" | ||
71 | KERNEL=="hwC[D0-9]*", NAME="snd/%k" | ||
72 | KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" | ||
73 | KERNEL=="midiC[D0-9]*", NAME="snd/%k" | ||
74 | KERNEL=="timer", NAME="snd/%k" | ||
75 | KERNEL=="seq", NAME="snd/%k" | ||
76 | |||
77 | # ieee1394 devices | ||
78 | KERNEL=="dv1394*", NAME="dv1394/%n" | ||
79 | KERNEL=="video1394*", NAME="video1394/%n" | ||
80 | |||
81 | # input devices | ||
82 | KERNEL=="mice", NAME="input/%k" | ||
83 | KERNEL=="mouse[0-9]*", NAME="input/%k" | ||
84 | KERNEL=="event[0-9]*", NAME="input/%k" | ||
85 | KERNEL=="js[0-9]*", NAME="input/%k" | ||
86 | KERNEL=="ts[0-9]*", NAME="input/%k" | ||
87 | KERNEL=="uinput", NAME="input/%k" | ||
88 | |||
89 | # Zaptel | ||
90 | KERNEL=="zapctl", NAME="zap/ctl" | ||
91 | KERNEL=="zaptimer", NAME="zap/timer" | ||
92 | KERNEL=="zapchannel", NAME="zap/channel" | ||
93 | KERNEL=="zappseudo", NAME="zap/pseudo" | ||
94 | KERNEL=="zap[0-9]*", NAME="zap/%n" | ||
95 | |||
96 | # AOE character devices | ||
97 | SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" | ||
98 | SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" | ||
99 | SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" | ||
100 | SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k" | ||
101 | |||
102 | # device mapper creates its own device nodes, so ignore these | ||
103 | KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" | ||
104 | KERNEL=="device-mapper", NAME="mapper/control" | ||
105 | |||
106 | KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660" | ||
107 | |||
108 | # Firmware Helper | ||
109 | ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware.sh" | ||
110 | |||
111 | # Samsung UARTS | ||
112 | KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n" | ||
113 | |||
114 | # MXC UARTs | ||
115 | KERNEL=="ttymxc[0-4]", NAME="ttymxc%n" | ||
116 | |||