summaryrefslogtreecommitdiff
path: root/meta/packages/udev
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-07-24 17:00:15 +0000
committerRichard Purdie <richard@openedhand.com>2008-07-24 17:00:15 +0000
commitf9651fac68352c9cfa6c616ae50f711c32e7bf32 (patch)
tree0fb8142f6c6a16c1c2451686d7ab149b3145512a /meta/packages/udev
parentffc2de5a4ec8e26b0d666bcb4d1b552c8b18ec2b (diff)
downloadopenembedded-core-f9651fac68352c9cfa6c616ae50f711c32e7bf32.tar.gz
openembedded-core-f9651fac68352c9cfa6c616ae50f711c32e7bf32.tar.bz2
openembedded-core-f9651fac68352c9cfa6c616ae50f711c32e7bf32.tar.xz
openembedded-core-f9651fac68352c9cfa6c616ae50f711c32e7bf32.zip
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
Diffstat (limited to 'meta/packages/udev')
-rw-r--r--meta/packages/udev/udev-124/permissions.rules62
-rw-r--r--meta/packages/udev/udev-124/run.rules14
-rw-r--r--meta/packages/udev/udev-124/udev.rules37
-rw-r--r--meta/packages/udev/udev_124.bb4
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 99e03b103..205b73329 100644
--- a/meta/packages/udev/udev-124/permissions.rules
+++ b/meta/packages/udev/udev-124/permissions.rules
@@ -1,38 +1,56 @@
ACTION!="add", GOTO="permissions_end"
# workarounds needed to synchronize with sysfs
-DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
-SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
+# only needed for kernels < v2.6.18-rc1
+ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt"
# only needed for kernels < 2.6.16
SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
# only needed for kernels < 2.6.17
-SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+
+# devices needed to load the drivers providing them
+KERNEL=="tun", OPTIONS+="ignore_remove"
+KERNEL=="ppp", OPTIONS+="ignore_remove"
+KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove"
# default permissions for block devices
SUBSYSTEM=="block", GROUP="disk"
-SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy"
+# the aacraid driver is broken and reports that disks removable (see #404927)
+SUBSYSTEM=="block", ATTRS{removable}=="1", \
+ DRIVERS!="aacraid", GROUP="floppy"
+# all block devices on these buses are "removable"
+SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
# IDE devices
-BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", \
+KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
IMPORT{program}="cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", GROUP="cdrom"
-BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape"
-BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape"
+KERNEL=="ht[0-9]*", GROUP="tape"
+KERNEL=="nht[0-9]*", GROUP="tape"
# SCSI devices
-BUS=="scsi", SYSFS{type}=="1", GROUP="tape"
-BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom"
+KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
+SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom"
+SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
+SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
# USB devices
-BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
-BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
+KERNEL=="legousbtower*", MODE="0666"
+KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
# usbfs-like devices
-SUBSYSTEM=="usb_device", MODE="0664"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
+ MODE="0664"
# iRiver music players
-SUBSYSTEM=="usb_device", GROUP="plugdev", \
- SYSFS{idVendor}=="4102", SYSFS{idProduct}=="10[01][135789]"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \
+ ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
# serial devices
SUBSYSTEM=="tty", GROUP="dialout"
@@ -68,15 +86,26 @@ KERNEL=="inotify", MODE="0666"
KERNEL=="sgi_fetchop", MODE="0666"
KERNEL=="sonypi", MODE="0666"
KERNEL=="agpgart", GROUP="video"
-KERNEL=="rtc", GROUP="audio"
+KERNEL=="nvram", GROUP="nvram"
+KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
+KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
+KERNEL=="fuse", GROUP="fuse"
+KERNEL=="kqemu", MODE="0666"
+KERNEL=="kvm", GROUP="kvm"
+KERNEL=="tun", MODE="0666",
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd", MODE="0644"
+KERNEL=="uverbs*", GROUP="rdma"
+KERNEL=="ucm*", GROUP="rdma"
+KERNEL=="rdma_ucm", GROUP="rdma"
+
# printers and parallel devices
SUBSYSTEM=="printer", GROUP="lp"
SUBSYSTEM=="ppdev", GROUP="lp"
+KERNEL=="irlpt*", GROUP="lp"
KERNEL=="pt[0-9]*", GROUP="tape"
KERNEL=="pht[0-9]*", GROUP="tape"
@@ -89,9 +118,10 @@ KERNEL=="dv1394*", GROUP="video"
KERNEL=="video1394*", GROUP="video"
# input devices
-KERNEL=="event[0-9]*", SYSFS{name}=="*dvb*|*DVB*|* IR *" \
+KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
MODE="0664", GROUP="video"
KERNEL=="js[0-9]*", MODE="0664"
+KERNEL=="lirc[0-9]*", GROUP="video"
# AOE character devices
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 000000000..75d71375b
--- /dev/null
+++ b/meta/packages/udev/udev-124/run.rules
@@ -0,0 +1,14 @@
+# debugging monitor
+RUN+="socket:/org/kernel/udev/monitor"
+
+# run a command on remove events
+ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
+
+# ignore the events generated by virtual consoles
+KERNEL=="ptmx", OPTIONS+="last_rule"
+KERNEL=="console", OPTIONS+="last_rule"
+KERNEL=="tty" , OPTIONS+="last_rule"
+KERNEL=="tty[0-9]*", OPTIONS+="last_rule"
+KERNEL=="pty*", OPTIONS+="last_rule"
+SUBSYSTEM=="vc", OPTIONS+="last_rule"
+
diff --git a/meta/packages/udev/udev-124/udev.rules b/meta/packages/udev/udev-124/udev.rules
index 4d29acac0..443315ea5 100644
--- a/meta/packages/udev/udev-124/udev.rules
+++ b/meta/packages/udev/udev-124/udev.rules
@@ -13,33 +13,44 @@
# %% the '%' char itself
#
+# workaround for devices which do not report media changes
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
+ ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
+ OPTIONS+="all_partitions"
+
# SCSI devices
-BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
+SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
# USB devices
-BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
-BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
-BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
-BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
+SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
+ ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
SYMLINK+="pilot"
# usbfs-like devices
-SUBSYSTEM=="usb_device", \
- PROGRAM="/bin/sh -c 'export X=%k; export X=$${X#usbdev}; export B=$${X%%%%.*}; export D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
+ NAME="%c"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
# serial devices
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi[0-9]*", NAME="capi/%n"
# video devices
+KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
+ NAME="%c"
KERNEL=="card[0-9]*", NAME="dri/%k"
# misc devices
KERNEL=="hw_random", NAME="hwrng"
KERNEL=="tun", NAME="net/%k"
+KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
@@ -52,9 +63,8 @@ KERNEL=="microcode", NAME="cpu/microcode"
KERNEL=="umad*", NAME="infiniband/%k"
KERNEL=="issm*", NAME="infiniband/%k"
KERNEL=="uverbs*", NAME="infiniband/%k"
-KERNEL=="ucm", NAME="infiniband/%k"
-
-KERNEL=="buzzer", NAME="misc/buzzer"
+KERNEL=="ucm*", NAME="infiniband/%k"
+KERNEL=="rdma_ucm", NAME="infiniband/%k"
# ALSA devices
KERNEL=="controlC[0-9]*", NAME="snd/%k"
@@ -87,6 +97,7 @@ KERNEL=="zap[0-9]*", NAME="zap/%n"
SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
+SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
# device mapper creates its own device nodes, so ignore these
KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
diff --git a/meta/packages/udev/udev_124.bb b/meta/packages/udev/udev_124.bb
index 4a403c542..e4f7cb351 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
the hotplug package and requires a kernel not older than 2.6.12."
RPROVIDES_${PN} = "hotplug"
-PR = "r2"
+PR = "r4"
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://noasmlinkage.patch;patch=1 \
file://flags.patch;patch=1 \
file://vol_id_ld.patch;patch=1 \
file://udevtrigger_add_devname_filtering.patch;patch=1 \
+ file://run.rules \
"
SRC_URI_append_h2200 = " file://50-hostap_cs.rules "
@@ -35,6 +36,7 @@ do_install () {
install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules
+ install -m 0644 ${WORKDIR}/run.rules ${D}${sysconfdir}/udev/rules.d/run.rules
install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules
install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf
if [ "${UDEV_DEVFS_RULES}" = "1" ]; then