diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/udev | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/udev')
23 files changed, 1169 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/automount.rules b/meta/recipes-core/udev/udev-extraconf/automount.rules new file mode 100644 index 0000000000..62578ea631 --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/automount.rules | |||
@@ -0,0 +1,19 @@ | |||
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 | # Media automounting | ||
17 | SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" | ||
18 | SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" | ||
19 | SUBSYSTEM=="block", ACTION=="change", ENV{DISK_MEDIA_CHANGE}=="1" RUN+="/etc/udev/scripts/mount.sh" | ||
diff --git a/meta/recipes-core/udev/udev-extraconf/autonet.rules b/meta/recipes-core/udev/udev-extraconf/autonet.rules new file mode 100644 index 0000000000..19676aa13b --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/autonet.rules | |||
@@ -0,0 +1,19 @@ | |||
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 | # Handle network interface setup | ||
17 | SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" | ||
18 | SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" | ||
19 | |||
diff --git a/meta/recipes-core/udev/udev-extraconf/localextra.rules b/meta/recipes-core/udev/udev-extraconf/localextra.rules new file mode 100644 index 0000000000..3d51d3e395 --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/localextra.rules | |||
@@ -0,0 +1,23 @@ | |||
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 | # The first rtc device is symlinked to /dev/rtc | ||
17 | KERNEL=="rtc0", SYMLINK+="rtc" | ||
18 | |||
19 | #The first framebuffer is symlinked to /dev/fb | ||
20 | KERNEL=="fb0", SYMLINK+="fb" | ||
21 | |||
22 | # Make all input devices read-write to the input group | ||
23 | SUBSYSTEM=="input", GROUP="input", MODE="660" | ||
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.blacklist b/meta/recipes-core/udev/udev-extraconf/mount.blacklist new file mode 100644 index 0000000000..e49349428b --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/mount.blacklist | |||
@@ -0,0 +1,5 @@ | |||
1 | /dev/loop | ||
2 | /dev/ram | ||
3 | /dev/mtdblock | ||
4 | /dev/md | ||
5 | /dev/dm-* | ||
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh new file mode 100644 index 0000000000..3eea910854 --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh | |||
@@ -0,0 +1,90 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Called from udev | ||
4 | # | ||
5 | # Attempt to mount any added block devices and umount any removed devices | ||
6 | |||
7 | |||
8 | MOUNT="/bin/mount" | ||
9 | PMOUNT="/usr/bin/pmount" | ||
10 | UMOUNT="/bin/umount" | ||
11 | for line in `grep -v ^# /etc/udev/mount.blacklist` | ||
12 | do | ||
13 | if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ]; | ||
14 | then | ||
15 | logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring" | ||
16 | exit 0 | ||
17 | fi | ||
18 | done | ||
19 | |||
20 | automount() { | ||
21 | name="`basename "$DEVNAME"`" | ||
22 | |||
23 | ! test -d "/run/media/$name" && mkdir -p "/run/media/$name" | ||
24 | # Silent util-linux's version of mounting auto | ||
25 | if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ; | ||
26 | then | ||
27 | MOUNT="$MOUNT -o silent" | ||
28 | fi | ||
29 | |||
30 | # If filesystem type is vfat, change the ownership group to 'disk', and | ||
31 | # grant it with w/r/x permissions. | ||
32 | case $ID_FS_TYPE in | ||
33 | vfat|fat) | ||
34 | MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" | ||
35 | ;; | ||
36 | # TODO | ||
37 | *) | ||
38 | ;; | ||
39 | esac | ||
40 | |||
41 | if ! $MOUNT -t auto $DEVNAME "/run/media/$name" | ||
42 | then | ||
43 | #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!" | ||
44 | rm_dir "/run/media/$name" | ||
45 | else | ||
46 | logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful" | ||
47 | touch "/tmp/.automount-$name" | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | rm_dir() { | ||
52 | # We do not want to rm -r populated directories | ||
53 | if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1" | ||
54 | then | ||
55 | ! test -z "$1" && rm -r "$1" | ||
56 | else | ||
57 | logger "mount.sh/automount" "Not removing non-empty directory [$1]" | ||
58 | fi | ||
59 | } | ||
60 | |||
61 | # No ID_FS_TYPE for cdrom device, yet it should be mounted | ||
62 | name="`basename "$DEVNAME"`" | ||
63 | [ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media` | ||
64 | |||
65 | if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then | ||
66 | if [ -x "$PMOUNT" ]; then | ||
67 | $PMOUNT $DEVNAME 2> /dev/null | ||
68 | elif [ -x $MOUNT ]; then | ||
69 | $MOUNT $DEVNAME 2> /dev/null | ||
70 | fi | ||
71 | |||
72 | # If the device isn't mounted at this point, it isn't | ||
73 | # configured in fstab (note the root filesystem can show up as | ||
74 | # /dev/root in /proc/mounts, so check the device number too) | ||
75 | if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then | ||
76 | grep -q "^$DEVNAME " /proc/mounts || automount | ||
77 | fi | ||
78 | fi | ||
79 | |||
80 | |||
81 | if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then | ||
82 | for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` | ||
83 | do | ||
84 | $UMOUNT $mnt | ||
85 | done | ||
86 | |||
87 | # Remove empty directories from auto-mounter | ||
88 | name="`basename "$DEVNAME"`" | ||
89 | test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name" | ||
90 | fi | ||
diff --git a/meta/recipes-core/udev/udev-extraconf/network.sh b/meta/recipes-core/udev/udev-extraconf/network.sh new file mode 100644 index 0000000000..3ee92714af --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf/network.sh | |||
@@ -0,0 +1,54 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # We get two "add" events for hostap cards due to wifi0 | ||
4 | echo "$INTERFACE" | grep -q wifi && exit 0 | ||
5 | |||
6 | # udevd does clearenv(). Export shell PATH to children. | ||
7 | export PATH | ||
8 | |||
9 | # Check if /etc/init.d/network has been run yet to see if we are | ||
10 | # called by starting /etc/rcS.d/S03udev and not by hotplugging a device | ||
11 | # | ||
12 | # At this stage, network interfaces should not be brought up | ||
13 | # automatically because: | ||
14 | # a) /etc/init.d/network has not been run yet (security issue) | ||
15 | # b) /var has not been populated yet so /etc/resolv,conf points to | ||
16 | # oblivion, making the network unusable | ||
17 | # | ||
18 | |||
19 | spoofp="`grep ^spoofprotect /etc/network/options`" | ||
20 | if test -z "$spoofp" | ||
21 | then | ||
22 | # This is the default from /etc/init.d/network | ||
23 | spoofp_val=yes | ||
24 | else | ||
25 | spoofp_val=${spoofp#spoofprotect=} | ||
26 | fi | ||
27 | |||
28 | test "$spoofp_val" = yes && spoofp_val=1 || spoofp_val=0 | ||
29 | |||
30 | # I think it is safe to assume that "lo" will always be there ;) | ||
31 | if test "`cat /proc/sys/net/ipv4/conf/lo/rp_filter`" != "$spoofp_val" -a -n "$spoofp_val" | ||
32 | then | ||
33 | echo "$INTERFACE" >> /dev/udev_network_queue | ||
34 | exit 0 | ||
35 | fi | ||
36 | |||
37 | # | ||
38 | # Code taken from pcmcia-cs:/etc/pcmcia/network | ||
39 | # | ||
40 | |||
41 | # if this interface has an entry in /etc/network/interfaces, let ifupdown | ||
42 | # handle it | ||
43 | if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then | ||
44 | case $ACTION in | ||
45 | add) | ||
46 | ifconfig | grep -q "^$INTERFACE" || ifup $INTERFACE | ||
47 | ;; | ||
48 | remove) | ||
49 | ifdown $INTERFACE | ||
50 | ;; | ||
51 | esac | ||
52 | |||
53 | exit 0 | ||
54 | fi | ||
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb new file mode 100644 index 0000000000..d69056dd76 --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "Extra machine specific configuration files" | ||
2 | DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information." | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
5 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
6 | |||
7 | SRC_URI = " \ | ||
8 | file://automount.rules \ | ||
9 | file://mount.sh \ | ||
10 | file://mount.blacklist \ | ||
11 | file://autonet.rules \ | ||
12 | file://network.sh \ | ||
13 | file://localextra.rules \ | ||
14 | " | ||
15 | |||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${sysconfdir}/udev/rules.d | ||
19 | |||
20 | install -m 0644 ${WORKDIR}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules | ||
21 | install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules | ||
22 | install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules | ||
23 | |||
24 | install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/ | ||
25 | |||
26 | install -d ${D}${sysconfdir}/udev/scripts/ | ||
27 | |||
28 | install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh | ||
29 | install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts | ||
30 | } | ||
31 | |||
32 | FILES_${PN} = "${sysconfdir}/udev" | ||
33 | RDEPENDS_${PN} = "udev" | ||
34 | CONFFILES_${PN} = "${sysconfdir}/udev/mount.blacklist" | ||
35 | |||
36 | # to replace udev-extra-rules from meta-oe | ||
37 | RPROVIDES_${PN} = "udev-extra-rules" | ||
38 | RREPLACES_${PN} = "udev-extra-rules" | ||
39 | RCONFLICTS_${PN} = "udev-extra-rules" | ||
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc new file mode 100644 index 0000000000..24463b1d71 --- /dev/null +++ b/meta/recipes-core/udev/udev.inc | |||
@@ -0,0 +1,106 @@ | |||
1 | SUMMARY = "/dev/ and hotplug management daemon" | ||
2 | DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \ | ||
3 | /dev/, handles hotplug events and loads drivers at boot time." | ||
4 | HOMEPAGE = "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html" | ||
5 | LICENSE = "GPLv2.0+ & LGPLv2.1+" | ||
6 | LICENSE_${PN} = "GPLv2.0+" | ||
7 | LICENSE_libudev = "LGPLv2.1+" | ||
8 | LICENSE_libgudev = "LGPLv2.1+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \ | ||
11 | file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266" | ||
12 | |||
13 | LDFLAGS += "-lrt" | ||
14 | |||
15 | DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux" | ||
16 | RPROVIDES_${PN} = "hotplug" | ||
17 | |||
18 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ | ||
19 | file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \ | ||
20 | file://avoid-mouse-autosuspend.patch \ | ||
21 | file://run.rules \ | ||
22 | file://udev.rules \ | ||
23 | file://devfs-udev.rules \ | ||
24 | file://links.conf \ | ||
25 | file://permissions.rules \ | ||
26 | file://local.rules \ | ||
27 | file://udev-cache \ | ||
28 | file://udev-cache.default \ | ||
29 | file://add-install-ptest.patch \ | ||
30 | file://fix_rule-syntax-regex-ptest.patch \ | ||
31 | file://run-ptest \ | ||
32 | file://init" | ||
33 | |||
34 | inherit autotools pkgconfig update-rc.d ptest | ||
35 | RDEPENDS_${PN}-ptest += "make perl python" | ||
36 | |||
37 | libexecdir = "${base_libdir}" | ||
38 | EXTRA_OECONF = "--disable-introspection \ | ||
39 | --with-rootlibdir=${base_libdir} \ | ||
40 | --with-pci-ids-path=${datadir}/pci.ids \ | ||
41 | ac_cv_file__usr_share_pci_ids=no \ | ||
42 | ac_cv_file__usr_share_hwdata_pci_ids=no \ | ||
43 | ac_cv_file__usr_share_misc_pci_ids=yes \ | ||
44 | --sbindir=${base_sbindir} \ | ||
45 | --libexecdir=${nonarch_base_libdir} \ | ||
46 | --with-rootlibdir=${base_libdir} \ | ||
47 | --with-rootprefix= \ | ||
48 | --without-systemdsystemunitdir \ | ||
49 | " | ||
50 | |||
51 | PACKAGES =+ "udev-cache" | ||
52 | PACKAGES =+ "libudev" | ||
53 | PACKAGES =+ "libgudev" | ||
54 | |||
55 | INITSCRIPT_PACKAGES = "udev udev-cache" | ||
56 | INITSCRIPT_NAME_udev = "udev" | ||
57 | INITSCRIPT_PARAMS_udev = "start 04 S ." | ||
58 | INITSCRIPT_NAME_udev-cache = "udev-cache" | ||
59 | INITSCRIPT_PARAMS_udev-cache = "start 36 S ." | ||
60 | |||
61 | FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev ${bindir}/udevadm" | ||
62 | RRECOMMENDS_${PN} += "udev-cache" | ||
63 | |||
64 | FILES_${PN}-dbg += "${libexecdir}/.debug" | ||
65 | FILES_${PN}-dbg += "${base_libdir}/udev/.debug/" | ||
66 | FILES_${PN}-dbg += "${base_libdir}/udev/.debug/*" | ||
67 | FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*" | ||
68 | FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ | ||
69 | ${includedir}/libudev.h ${libdir}/libudev.so ${libdir}/libudev.la \ | ||
70 | ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc \ | ||
71 | ${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \ | ||
72 | ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc" | ||
73 | FILES_libudev = "${base_libdir}/libudev.so.*" | ||
74 | FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*" | ||
75 | FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" | ||
76 | |||
77 | do_install_append () { | ||
78 | install -d ${D}${sysconfdir}/init.d | ||
79 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev | ||
80 | install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache | ||
81 | sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev | ||
82 | sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache | ||
83 | |||
84 | install -d ${D}${sysconfdir}/default | ||
85 | install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache | ||
86 | |||
87 | touch ${D}${sysconfdir}/udev/cache.data | ||
88 | |||
89 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
90 | |||
91 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules | ||
92 | |||
93 | # hid2hci has moved to bluez4. removed in udev as of version 169 | ||
94 | rm -f ${D}${base_libdir}/udev/hid2hci | ||
95 | |||
96 | echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf | ||
97 | } | ||
98 | |||
99 | # As systemd also builds udev, skip this package if we're doing a systemd build. | ||
100 | python () { | ||
101 | if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
102 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") | ||
103 | } | ||
104 | do_compile_ptest() { | ||
105 | oe_runmake test-udev | ||
106 | } | ||
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 new file mode 100644 index 0000000000..41deafa918 --- /dev/null +++ b/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 0f8290c943da298abd269ca60fd8375dfb219971 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexandru DAMIAN <alexandru.damian@intel.com> | ||
3 | Date: Thu, 12 Jul 2012 12:54:48 +0300 | ||
4 | Subject: [PATCH] Fixing keyboard_force_release.sh shell script path | ||
5 | |||
6 | With the introduction of rootprefix, the keyboard-force-release.sh.in | ||
7 | was modified to be executed with @rootprefix@/bin/sh, which is wrong | ||
8 | because @rootprefix@ defaults to /usr (which is correct), but the | ||
9 | shell is always at /bin/sh (IEEE Std 1003.2-1992). | ||
10 | |||
11 | Therefore the interpreter for shell scripts needs to be /bin/sh at all times. | ||
12 | |||
13 | The upstream moved to configurable root prefix, this patch taclkes a | ||
14 | transition bug, and will not be applied upstream. | ||
15 | |||
16 | Upstream-Status: Inappropriate [legacy version] | ||
17 | |||
18 | Signed-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 | |||
23 | diff --git a/src/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in | ||
24 | index 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 | -- | ||
34 | 1.7.9.5 | ||
35 | |||
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch new file mode 100644 index 0000000000..bfc2e9409d --- /dev/null +++ b/meta/recipes-core/udev/udev/add-install-ptest.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | Adjustements 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 | |||
7 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
8 | Signed-off-by: Alexandra Safta <alst@enea.com> | ||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Add missing files for rule-syntax-check | ||
12 | - Add rule-syntax-check.py | ||
13 | - Add the deployed udev rules to the testdata | ||
14 | |||
15 | Signed-off-by: Max Krummenacher <max.oss.09@gmail.com> | ||
16 | Upstream-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 new file mode 100644 index 0000000000..2c31b33b02 --- /dev/null +++ b/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Source: http://cgit.freedesktop.org/systemd/systemd/commit/rules/42-usb-hid-pm.rules?id=e0386cf2809219bbdd30895f46f1f567b56902b6 | ||
2 | |||
3 | Some USB ports on external hubs may be reported as "fixed". We only want | ||
4 | to auto-enable this on ports that are internal to the machine, so check | ||
5 | the parent state as well. | ||
6 | |||
7 | Upstream-Status: backport | ||
8 | |||
9 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
10 | 2013/09/13 | ||
11 | |||
12 | Index: 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 new file mode 100644 index 0000000000..0ba1ad4e7f --- /dev/null +++ b/meta/recipes-core/udev/udev/devfs-udev.rules | |||
@@ -0,0 +1,108 @@ | |||
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/udev/fix_rule-syntax-regex-ptest.patch b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch new file mode 100644 index 0000000000..548a241d8a --- /dev/null +++ b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | The rule-syntax-check script fails with errors like this: | ||
2 | |||
3 | Invalid 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 | |||
8 | Move line comment from end of rules file to its own line, the regex used to | ||
9 | test correct syntax choke on it. | ||
10 | |||
11 | The rule-syntax-check.py uses regex which errournessly complains on ATTR rules | ||
12 | of the form ATTR{[dmi/id]board_name}=="30B7" | ||
13 | Use the regex from systemd's script which allow [] characters and additional | ||
14 | compare operators | ||
15 | |||
16 | The Makefile passes rules-test.sh script a build host path to the testdata. | ||
17 | Ignore the argument and use a relative path instead. | ||
18 | |||
19 | |||
20 | Signed-off-by: Max Krummenacher <max.oss.09@gmail.com> | ||
21 | Upstream status pending | ||
22 | Upstream status Inappropriate (cross environment path) | ||
23 | |||
24 | diff -Naur udev-182.orig/src/keymap/95-keymap.rules udev-182/src/keymap/95-keymap.rules | ||
25 | --- udev-182.orig/src/keymap/95-keymap.rules 2012-02-07 00:01:55.154640792 +0100 | ||
26 | +++ udev-182/src/keymap/95-keymap.rules 2015-01-24 20:58:40.156930520 +0100 | ||
27 | @@ -94,7 +94,8 @@ | ||
28 | ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www" | ||
29 | ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill" | ||
30 | # HP Pavillion dv6315ea has empty DMI_VENDOR | ||
31 | -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 | ||
32 | +# "quick play" | ||
33 | +ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" | ||
34 | |||
35 | # Gateway clone of Acer Aspire One AOA110/AOA150 | ||
36 | ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer" | ||
37 | diff -Naur udev-182.orig/test/rule-syntax-check.py udev-182/test/rule-syntax-check.py | ||
38 | --- udev-182.orig/test/rule-syntax-check.py 2012-02-15 20:10:12.872333342 +0100 | ||
39 | +++ udev-182/test/rule-syntax-check.py 2015-01-24 21:08:00.496049600 +0100 | ||
40 | @@ -28,7 +28,7 @@ | ||
41 | no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$') | ||
42 | args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$') | ||
43 | no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$') | ||
44 | -args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$') | ||
45 | +args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$') | ||
46 | |||
47 | result = 0 | ||
48 | buffer = '' | ||
49 | --- udev-182.orig/test/rules-test.sh 2012-01-29 01:15:46.000000000 +0100 | ||
50 | +++ udev-182/test/rules-test.sh 2015-01-24 17:53:51.201858658 +0100 | ||
51 | @@ -4,7 +4,7 @@ | ||
52 | # (C) 2010 Canonical Ltd. | ||
53 | # Author: Martin Pitt <martin.pitt@ubuntu.com> | ||
54 | |||
55 | -[ -n "$srcdir" ] || srcdir=`dirname $0`/.. | ||
56 | +srcdir=`dirname $0`/.. | ||
57 | |||
58 | # skip if we don't have python | ||
59 | type python >/dev/null 2>&1 || { | ||
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init new file mode 100644 index 0000000000..d26cbfca96 --- /dev/null +++ b/meta/recipes-core/udev/udev/init | |||
@@ -0,0 +1,140 @@ | |||
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 | |||
12 | export TZ=/etc/localtime | ||
13 | |||
14 | [ -d /sys/class ] || exit 1 | ||
15 | [ -r /proc/mounts ] || exit 1 | ||
16 | [ -x @UDEVD@ ] || exit 1 | ||
17 | SYSCONF_CACHED="/etc/udev/cache.data" | ||
18 | SYSCONF_TMP="/dev/shm/udev.cache" | ||
19 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | ||
20 | [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf | ||
21 | [ -f /etc/default/rcS ] && . /etc/default/rcS | ||
22 | |||
23 | readfiles () { | ||
24 | READDATA="" | ||
25 | for filename in $@; do | ||
26 | if [ -r $filename ]; then | ||
27 | while read line; do | ||
28 | READDATA="$READDATA$line" | ||
29 | done < $filename | ||
30 | fi | ||
31 | done | ||
32 | } | ||
33 | |||
34 | kill_udevd () { | ||
35 | pid=`pidof -x udevd` | ||
36 | [ -n "$pid" ] && kill $pid | ||
37 | } | ||
38 | |||
39 | case "$1" in | ||
40 | start) | ||
41 | export ACTION=add | ||
42 | # propagate /dev from /sys | ||
43 | echo "Starting udev" | ||
44 | |||
45 | # Check for requireed devtmpfs before trying to start udev and | ||
46 | # mount a no-existant fs. | ||
47 | if ! grep -q devtmpfs /proc/filesystems | ||
48 | then | ||
49 | echo "Missing devtmpfs, which is required for udev to run"; | ||
50 | echo "Halting..." | ||
51 | halt | ||
52 | fi | ||
53 | # mount the devtmpfs on /dev, if not already done | ||
54 | LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && { | ||
55 | mount -n -o mode=0755 -t devtmpfs none "/dev" | ||
56 | } | ||
57 | [ -e /dev/pts ] || mkdir -m 0755 /dev/pts | ||
58 | [ -e /dev/shm ] || mkdir -m 1777 /dev/shm | ||
59 | # the automount rule for udev needs /tmp directory available, as /tmp is a symlink | ||
60 | # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure | ||
61 | # /var/volatile/tmp directory to be available. | ||
62 | mkdir -m 1777 -p /var/volatile/tmp | ||
63 | |||
64 | # Cache handling. | ||
65 | # A list of files which are used as a criteria to judge whether the udev cache could be reused. | ||
66 | CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices /proc/atags" | ||
67 | if [ "$DEVCACHE" != "" ]; then | ||
68 | if [ -e $DEVCACHE ]; then | ||
69 | readfiles $CMP_FILE_LIST | ||
70 | NEWDATA="$READDATA" | ||
71 | readfiles "$SYSCONF_CACHED" | ||
72 | OLDDATA="$READDATA" | ||
73 | if [ "$OLDDATA" = "$NEWDATA" ]; 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 | else | ||
79 | # Output detailed reason why the cached /dev is not used | ||
80 | if [ "$VERBOSE" != "no" ]; then | ||
81 | echo "udev: udev cache not used" | ||
82 | echo "udev: we use $CMP_FILE_LIST as criteria to judge whether the cache /dev could be resued" | ||
83 | echo "udev: olddata: $OLDDATA" | ||
84 | echo "udev: newdata: $NEWDATA" | ||
85 | fi | ||
86 | echo "$NEWDATA" > "$SYSCONF_TMP" | ||
87 | fi | ||
88 | else | ||
89 | if [ "$ROOTFS_READ_ONLY" != "yes" ]; then | ||
90 | # If rootfs is not read-only, it's possible that a new udev cache would be generated; | ||
91 | # otherwise, we do not bother to read files. | ||
92 | readfiles $CMP_FILE_LIST | ||
93 | echo "$READDATA" > "$SYSCONF_TMP" | ||
94 | fi | ||
95 | fi | ||
96 | fi | ||
97 | |||
98 | # make_extra_nodes | ||
99 | kill_udevd > "/dev/null" 2>&1 | ||
100 | |||
101 | # trigger the sorted events | ||
102 | [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug | ||
103 | @UDEVD@ -d | ||
104 | |||
105 | udevadm control --env=STARTUP=1 | ||
106 | if [ "$not_first_boot" != "" ];then | ||
107 | if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then | ||
108 | PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform" | ||
109 | else | ||
110 | PLATFORM_BUS_NOMATCH="" | ||
111 | fi | ||
112 | 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 | ||
113 | (udevadm settle --timeout=3; udevadm control --env=STARTUP=)& | ||
114 | else | ||
115 | udevadm trigger --action=add | ||
116 | udevadm settle | ||
117 | fi | ||
118 | ;; | ||
119 | stop) | ||
120 | echo "Stopping udevd" | ||
121 | start-stop-daemon --stop --name udevd --quiet | ||
122 | ;; | ||
123 | restart) | ||
124 | $0 stop | ||
125 | sleep 1 | ||
126 | $0 start | ||
127 | ;; | ||
128 | status) | ||
129 | pid=`pidof -x udevd` | ||
130 | if [ -n "$pid" ]; then | ||
131 | echo "udevd (pid $pid) is running ..." | ||
132 | else | ||
133 | echo "udevd is stopped" | ||
134 | fi | ||
135 | ;; | ||
136 | *) | ||
137 | echo "Usage: $0 {start|stop|status|restart}" | ||
138 | exit 1 | ||
139 | esac | ||
140 | exit 0 | ||
diff --git a/meta/recipes-core/udev/udev/links.conf b/meta/recipes-core/udev/udev/links.conf new file mode 100644 index 0000000000..8fff922db6 --- /dev/null +++ b/meta/recipes-core/udev/udev/links.conf | |||
@@ -0,0 +1,21 @@ | |||
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/udev/local.rules b/meta/recipes-core/udev/udev/local.rules new file mode 100644 index 0000000000..9d4da493f7 --- /dev/null +++ b/meta/recipes-core/udev/udev/local.rules | |||
@@ -0,0 +1,22 @@ | |||
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 | # Try and modprobe for drivers for new hardware | ||
17 | ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" | ||
18 | |||
19 | # Create a symlink to any touchscreen input device | ||
20 | # Trigger based on input type, that the evbit (-e) has EV_SYN and EV_ABS, | ||
21 | # has an EV_ABS value (-a) which is used for touchscreen type devices. | ||
22 | SUBSYSTEM=="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 new file mode 100644 index 0000000000..205b733292 --- /dev/null +++ b/meta/recipes-core/udev/udev/permissions.rules | |||
@@ -0,0 +1,131 @@ | |||
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/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest new file mode 100644 index 0000000000..0e39806b01 --- /dev/null +++ b/meta/recipes-core/udev/udev/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | tar -C test/ -xJf test/sys.tar.xz | ||
4 | make -k check-TESTS | ||
5 | make test-sys-distclean | ||
diff --git a/meta/recipes-core/udev/udev/run.rules b/meta/recipes-core/udev/udev/run.rules new file mode 100644 index 0000000000..75d71375bb --- /dev/null +++ b/meta/recipes-core/udev/udev/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/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache new file mode 100644 index 0000000000..497d257397 --- /dev/null +++ b/meta/recipes-core/udev/udev/udev-cache | |||
@@ -0,0 +1,38 @@ | |||
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 | |||
12 | export 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 | ||
19 | DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar" | ||
20 | SYSCONF_CACHED="/etc/udev/cache.data" | ||
21 | SYSCONF_TMP="/dev/shm/udev.cache" | ||
22 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | ||
23 | |||
24 | if [ "$ROOTFS_READ_ONLY" = "yes" ]; then | ||
25 | [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache" | ||
26 | exit 0 | ||
27 | fi | ||
28 | |||
29 | if [ "$DEVCACHE" != "" -a -e "$SYSCONF_TMP" ]; then | ||
30 | echo "Populating dev cache" | ||
31 | find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ | ||
32 | | xargs tar cf "${DEVCACHE_TMP}" -T- | ||
33 | gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" | ||
34 | rm -f "${DEVCACHE_TMP}" | ||
35 | mv "$SYSCONF_TMP" "$SYSCONF_CACHED" | ||
36 | fi | ||
37 | |||
38 | exit 0 | ||
diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default new file mode 100644 index 0000000000..a3b732698d --- /dev/null +++ b/meta/recipes-core/udev/udev/udev-cache.default | |||
@@ -0,0 +1,5 @@ | |||
1 | # Default for /etc/init.d/udev | ||
2 | |||
3 | # Comment this out to disable device cache | ||
4 | DEVCACHE="/etc/udev-cache.tar.gz" | ||
5 | PROBE_PLATFORM_BUS="yes" | ||
diff --git a/meta/recipes-core/udev/udev/udev.rules b/meta/recipes-core/udev/udev/udev.rules new file mode 100644 index 0000000000..a19d4a0bf6 --- /dev/null +++ b/meta/recipes-core/udev/udev/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 | |||
diff --git a/meta/recipes-core/udev/udev_182.bb b/meta/recipes-core/udev/udev_182.bb new file mode 100644 index 0000000000..b216352035 --- /dev/null +++ b/meta/recipes-core/udev/udev_182.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | include udev.inc | ||
2 | |||
3 | PR = "r9" | ||
4 | |||
5 | # module-init-tools from kmod_git will provide libkmod runtime | ||
6 | DEPENDS += "module-init-tools" | ||
7 | |||
8 | SRC_URI[md5sum] = "1b964456177fbf48023dfee7db3a708d" | ||
9 | SRC_URI[sha256sum] = "7857ed19fafd8f3ca8de410194e8c7336e9eb8a20626ea8a4ba6449b017faba4" | ||