diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2016-03-01 02:52:47 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-02 22:39:43 +0000 |
commit | 3e5e540513665105b963262c2eaf33f197a0a36c (patch) | |
tree | 3ce445ae80c50cd303040a810ae478e0fdf1080d /meta/recipes-core/udev/eudev/udev.rules | |
parent | 674e55f4169de8080b8453f951a4f68fc4b3fcd8 (diff) | |
download | poky-3e5e540513665105b963262c2eaf33f197a0a36c.tar.gz |
eudev: Replaces udev with eudev for compatibility when using sysvinit on newer kernels
udev has started to fail on new kernels (4.4), due to being deprecated in favor
of systemd's udev implementation. To maintain a sysvinit alternative we also
need to provide an alternative to udev. Eudev is a fork of systemds udev,
this new eudev recipe provides upstream udev 220 funcitonality.
- Removes patches that dont apply anymore
- ToDo: eudev-ptest?
[YOCTO #8998]
(From OE-Core rev: a22797f7c37a865420837b5c29b270f73ee4c6ce)
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev/eudev/udev.rules')
-rw-r--r-- | meta/recipes-core/udev/eudev/udev.rules | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/eudev/udev.rules b/meta/recipes-core/udev/eudev/udev.rules new file mode 100644 index 0000000000..a19d4a0bf6 --- /dev/null +++ b/meta/recipes-core/udev/eudev/udev.rules | |||
@@ -0,0 +1,116 @@ | |||
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 | |||