diff options
author | Richard Purdie <richard@openedhand.com> | 2008-07-24 17:00:15 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-07-24 17:00:15 +0000 |
commit | f9651fac68352c9cfa6c616ae50f711c32e7bf32 (patch) | |
tree | 0fb8142f6c6a16c1c2451686d7ab149b3145512a | |
parent | ffc2de5a4ec8e26b0d666bcb4d1b552c8b18ec2b (diff) | |
download | poky-f9651fac68352c9cfa6c616ae50f711c32e7bf32.tar.gz |
udev: Sync the rules with the versions from a more recent udev, optimise the boot process slightly by skipping boring ttys earlier
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4942 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | meta/packages/udev/udev-124/permissions.rules | 62 | ||||
-rw-r--r-- | meta/packages/udev/udev-124/run.rules | 14 | ||||
-rw-r--r-- | meta/packages/udev/udev-124/udev.rules | 37 | ||||
-rw-r--r-- | meta/packages/udev/udev_124.bb | 4 |
4 files changed, 87 insertions, 30 deletions
diff --git a/meta/packages/udev/udev-124/permissions.rules b/meta/packages/udev/udev-124/permissions.rules index 99e03b1036..205b733292 100644 --- a/meta/packages/udev/udev-124/permissions.rules +++ b/meta/packages/udev/udev-124/permissions.rules | |||
@@ -1,38 +1,56 @@ | |||
1 | ACTION!="add", GOTO="permissions_end" | 1 | ACTION!="add", GOTO="permissions_end" |
2 | 2 | ||
3 | # workarounds needed to synchronize with sysfs | 3 | # workarounds needed to synchronize with sysfs |
4 | DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" | 4 | # only needed for kernels < v2.6.18-rc1 |
5 | SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" | 5 | ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" |
6 | SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" | ||
6 | # only needed for kernels < 2.6.16 | 7 | # only needed for kernels < 2.6.16 |
7 | SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" | 8 | SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" |
8 | # only needed for kernels < 2.6.17 | 9 | # only needed for kernels < 2.6.17 |
9 | SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" | 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" | ||
10 | 16 | ||
11 | # default permissions for block devices | 17 | # default permissions for block devices |
12 | SUBSYSTEM=="block", GROUP="disk" | 18 | SUBSYSTEM=="block", GROUP="disk" |
13 | SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy" | 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" | ||
14 | 24 | ||
15 | # IDE devices | 25 | # IDE devices |
16 | BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", \ | 26 | KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \ |
17 | IMPORT{program}="cdrom_id --export $tempnode" | 27 | IMPORT{program}="cdrom_id --export $tempnode" |
18 | ENV{ID_CDROM}=="?*", GROUP="cdrom" | 28 | ENV{ID_CDROM}=="?*", GROUP="cdrom" |
19 | BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape" | 29 | KERNEL=="ht[0-9]*", GROUP="tape" |
20 | BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape" | 30 | KERNEL=="nht[0-9]*", GROUP="tape" |
21 | 31 | ||
22 | # SCSI devices | 32 | # SCSI devices |
23 | BUS=="scsi", SYSFS{type}=="1", GROUP="tape" | 33 | KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" |
24 | BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom" | 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" | ||
25 | 42 | ||
26 | # USB devices | 43 | # USB devices |
27 | BUS=="usb", KERNEL=="legousbtower*", MODE="0666" | 44 | KERNEL=="legousbtower*", MODE="0666" |
28 | BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp" | 45 | KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" |
29 | 46 | ||
30 | # usbfs-like devices | 47 | # usbfs-like devices |
31 | SUBSYSTEM=="usb_device", MODE="0664" | 48 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ |
49 | MODE="0664" | ||
32 | 50 | ||
33 | # iRiver music players | 51 | # iRiver music players |
34 | SUBSYSTEM=="usb_device", GROUP="plugdev", \ | 52 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ |
35 | SYSFS{idVendor}=="4102", SYSFS{idProduct}=="10[01][135789]" | 53 | ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" |
36 | 54 | ||
37 | # serial devices | 55 | # serial devices |
38 | SUBSYSTEM=="tty", GROUP="dialout" | 56 | SUBSYSTEM=="tty", GROUP="dialout" |
@@ -68,15 +86,26 @@ KERNEL=="inotify", MODE="0666" | |||
68 | KERNEL=="sgi_fetchop", MODE="0666" | 86 | KERNEL=="sgi_fetchop", MODE="0666" |
69 | KERNEL=="sonypi", MODE="0666" | 87 | KERNEL=="sonypi", MODE="0666" |
70 | KERNEL=="agpgart", GROUP="video" | 88 | KERNEL=="agpgart", GROUP="video" |
71 | KERNEL=="rtc", GROUP="audio" | 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", | ||
72 | 96 | ||
73 | KERNEL=="cdemu[0-9]*", GROUP="cdrom" | 97 | KERNEL=="cdemu[0-9]*", GROUP="cdrom" |
74 | KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" | 98 | KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" |
75 | KERNEL=="pktcdvd", MODE="0644" | 99 | KERNEL=="pktcdvd", MODE="0644" |
76 | 100 | ||
101 | KERNEL=="uverbs*", GROUP="rdma" | ||
102 | KERNEL=="ucm*", GROUP="rdma" | ||
103 | KERNEL=="rdma_ucm", GROUP="rdma" | ||
104 | |||
77 | # printers and parallel devices | 105 | # printers and parallel devices |
78 | SUBSYSTEM=="printer", GROUP="lp" | 106 | SUBSYSTEM=="printer", GROUP="lp" |
79 | SUBSYSTEM=="ppdev", GROUP="lp" | 107 | SUBSYSTEM=="ppdev", GROUP="lp" |
108 | KERNEL=="irlpt*", GROUP="lp" | ||
80 | KERNEL=="pt[0-9]*", GROUP="tape" | 109 | KERNEL=="pt[0-9]*", GROUP="tape" |
81 | KERNEL=="pht[0-9]*", GROUP="tape" | 110 | KERNEL=="pht[0-9]*", GROUP="tape" |
82 | 111 | ||
@@ -89,9 +118,10 @@ KERNEL=="dv1394*", GROUP="video" | |||
89 | KERNEL=="video1394*", GROUP="video" | 118 | KERNEL=="video1394*", GROUP="video" |
90 | 119 | ||
91 | # input devices | 120 | # input devices |
92 | KERNEL=="event[0-9]*", SYSFS{name}=="*dvb*|*DVB*|* IR *" \ | 121 | KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \ |
93 | MODE="0664", GROUP="video" | 122 | MODE="0664", GROUP="video" |
94 | KERNEL=="js[0-9]*", MODE="0664" | 123 | KERNEL=="js[0-9]*", MODE="0664" |
124 | KERNEL=="lirc[0-9]*", GROUP="video" | ||
95 | 125 | ||
96 | # AOE character devices | 126 | # AOE character devices |
97 | SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" | 127 | SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" |
diff --git a/meta/packages/udev/udev-124/run.rules b/meta/packages/udev/udev-124/run.rules new file mode 100644 index 0000000000..75d71375bb --- /dev/null +++ b/meta/packages/udev/udev-124/run.rules | |||
@@ -0,0 +1,14 @@ | |||
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/packages/udev/udev-124/udev.rules b/meta/packages/udev/udev-124/udev.rules index 4d29acac0c..443315ea53 100644 --- a/meta/packages/udev/udev-124/udev.rules +++ b/meta/packages/udev/udev-124/udev.rules | |||
@@ -13,33 +13,44 @@ | |||
13 | # %% the '%' char itself | 13 | # %% the '%' char itself |
14 | # | 14 | # |
15 | 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 | |||
16 | # SCSI devices | 22 | # SCSI devices |
17 | BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" | 23 | SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" |
18 | 24 | ||
19 | # USB devices | 25 | # USB devices |
20 | BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" | 26 | SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" |
21 | BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k" | 27 | SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k" |
22 | BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k" | 28 | SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k" |
23 | BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k" | 29 | SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k" |
24 | BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" | 30 | SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" |
25 | BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" | 31 | SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" |
26 | BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \ | 32 | SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \ |
33 | ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \ | ||
27 | SYMLINK+="pilot" | 34 | SYMLINK+="pilot" |
28 | 35 | ||
29 | # usbfs-like devices | 36 | # usbfs-like devices |
30 | SUBSYSTEM=="usb_device", \ | 37 | SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \ |
31 | PROGRAM="/bin/sh -c 'export X=%k; export X=$${X#usbdev}; export B=$${X%%%%.*}; export D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" | 38 | NAME="%c" |
39 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" | ||
32 | 40 | ||
33 | # serial devices | 41 | # serial devices |
34 | KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" | 42 | KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" |
35 | KERNEL=="capi[0-9]*", NAME="capi/%n" | 43 | KERNEL=="capi[0-9]*", NAME="capi/%n" |
36 | 44 | ||
37 | # video devices | 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" | ||
38 | KERNEL=="card[0-9]*", NAME="dri/%k" | 48 | KERNEL=="card[0-9]*", NAME="dri/%k" |
39 | 49 | ||
40 | # misc devices | 50 | # misc devices |
41 | KERNEL=="hw_random", NAME="hwrng" | 51 | KERNEL=="hw_random", NAME="hwrng" |
42 | KERNEL=="tun", NAME="net/%k" | 52 | KERNEL=="tun", NAME="net/%k" |
53 | KERNEL=="evtchn", NAME="xen/%k" | ||
43 | 54 | ||
44 | KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" | 55 | KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" |
45 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" | 56 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" |
@@ -52,9 +63,8 @@ KERNEL=="microcode", NAME="cpu/microcode" | |||
52 | KERNEL=="umad*", NAME="infiniband/%k" | 63 | KERNEL=="umad*", NAME="infiniband/%k" |
53 | KERNEL=="issm*", NAME="infiniband/%k" | 64 | KERNEL=="issm*", NAME="infiniband/%k" |
54 | KERNEL=="uverbs*", NAME="infiniband/%k" | 65 | KERNEL=="uverbs*", NAME="infiniband/%k" |
55 | KERNEL=="ucm", NAME="infiniband/%k" | 66 | KERNEL=="ucm*", NAME="infiniband/%k" |
56 | 67 | KERNEL=="rdma_ucm", NAME="infiniband/%k" | |
57 | KERNEL=="buzzer", NAME="misc/buzzer" | ||
58 | 68 | ||
59 | # ALSA devices | 69 | # ALSA devices |
60 | KERNEL=="controlC[0-9]*", NAME="snd/%k" | 70 | KERNEL=="controlC[0-9]*", NAME="snd/%k" |
@@ -87,6 +97,7 @@ KERNEL=="zap[0-9]*", NAME="zap/%n" | |||
87 | SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" | 97 | SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" |
88 | SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" | 98 | SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" |
89 | SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" | 99 | SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" |
100 | SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k" | ||
90 | 101 | ||
91 | # device mapper creates its own device nodes, so ignore these | 102 | # device mapper creates its own device nodes, so ignore these |
92 | KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" | 103 | KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" |
diff --git a/meta/packages/udev/udev_124.bb b/meta/packages/udev/udev_124.bb index 4a403c542f..e4f7cb351b 100644 --- a/meta/packages/udev/udev_124.bb +++ b/meta/packages/udev/udev_124.bb | |||
@@ -3,13 +3,14 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod | |||
3 | the hotplug package and requires a kernel not older than 2.6.12." | 3 | the hotplug package and requires a kernel not older than 2.6.12." |
4 | RPROVIDES_${PN} = "hotplug" | 4 | RPROVIDES_${PN} = "hotplug" |
5 | 5 | ||
6 | PR = "r2" | 6 | PR = "r4" |
7 | 7 | ||
8 | SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ | 8 | SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ |
9 | file://noasmlinkage.patch;patch=1 \ | 9 | file://noasmlinkage.patch;patch=1 \ |
10 | file://flags.patch;patch=1 \ | 10 | file://flags.patch;patch=1 \ |
11 | file://vol_id_ld.patch;patch=1 \ | 11 | file://vol_id_ld.patch;patch=1 \ |
12 | file://udevtrigger_add_devname_filtering.patch;patch=1 \ | 12 | file://udevtrigger_add_devname_filtering.patch;patch=1 \ |
13 | file://run.rules \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | SRC_URI_append_h2200 = " file://50-hostap_cs.rules " | 16 | SRC_URI_append_h2200 = " file://50-hostap_cs.rules " |
@@ -35,6 +36,7 @@ do_install () { | |||
35 | 36 | ||
36 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules | 37 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules |
37 | install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules | 38 | install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules |
39 | install -m 0644 ${WORKDIR}/run.rules ${D}${sysconfdir}/udev/rules.d/run.rules | ||
38 | install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules | 40 | install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules |
39 | install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf | 41 | install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf |
40 | if [ "${UDEV_DEVFS_RULES}" = "1" ]; then | 42 | if [ "${UDEV_DEVFS_RULES}" = "1" ]; then |