diff options
Diffstat (limited to 'meta/recipes-core/udev/udev-124')
-rw-r--r-- | meta/recipes-core/udev/udev-124/flags.patch | 56 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/init | 59 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/local.rules | 31 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/noasmlinkage.patch | 45 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/permissions.rules | 131 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/run.rules | 14 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/udev.rules | 116 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/udevtrigger_add_devname_filtering.patch | 99 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-124/vol_id_ld.patch | 17 |
9 files changed, 568 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev-124/flags.patch b/meta/recipes-core/udev/udev-124/flags.patch new file mode 100644 index 0000000000..13f20eb6a8 --- /dev/null +++ b/meta/recipes-core/udev/udev-124/flags.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | --- | ||
2 | Makefile | 16 ++++++++-------- | ||
3 | 1 file changed, 8 insertions(+), 8 deletions(-) | ||
4 | |||
5 | Index: udev-115/Makefile | ||
6 | =================================================================== | ||
7 | --- udev-115.orig/Makefile 2007-08-24 01:29:54.000000000 +0200 | ||
8 | +++ udev-115/Makefile 2007-09-20 17:21:45.000000000 +0200 | ||
9 | @@ -112,39 +112,39 @@ | ||
10 | AR = $(CROSS_COMPILE)ar | ||
11 | RANLIB = $(CROSS_COMPILE)ranlib | ||
12 | |||
13 | -CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 | ||
14 | +override CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 | ||
15 | WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \ | ||
16 | -Wchar-subscripts -Wmissing-declarations -Wnested-externs \ | ||
17 | -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes | ||
18 | -CFLAGS += $(WARNINGS) | ||
19 | +override CFLAGS += $(WARNINGS) | ||
20 | |||
21 | LDFLAGS += -Wl,-warn-common,--as-needed | ||
22 | |||
23 | OPTFLAGS = -Os | ||
24 | -CFLAGS += $(OPTFLAGS) | ||
25 | +override CFLAGS += $(OPTFLAGS) | ||
26 | |||
27 | ifeq ($(strip $(USE_LOG)),true) | ||
28 | - CFLAGS += -DUSE_LOG | ||
29 | + override CFLAGS += -DUSE_LOG | ||
30 | endif | ||
31 | |||
32 | # if DEBUG is enabled, then we do not strip | ||
33 | ifeq ($(strip $(DEBUG)),true) | ||
34 | - CFLAGS += -DDEBUG | ||
35 | + override CFLAGS += -DDEBUG | ||
36 | endif | ||
37 | |||
38 | ifeq ($(strip $(USE_GCOV)),true) | ||
39 | - CFLAGS += -fprofile-arcs -ftest-coverage | ||
40 | + override CFLAGS += -fprofile-arcs -ftest-coverage | ||
41 | LDFLAGS += -fprofile-arcs | ||
42 | endif | ||
43 | |||
44 | ifeq ($(strip $(USE_SELINUX)),true) | ||
45 | UDEV_OBJS += udev_selinux.o | ||
46 | LIB_OBJS += -lselinux -lsepol | ||
47 | - CFLAGS += -DUSE_SELINUX | ||
48 | + override CFLAGS += -DUSE_SELINUX | ||
49 | endif | ||
50 | |||
51 | ifeq ($(strip $(USE_STATIC)),true) | ||
52 | - CFLAGS += -DUSE_STATIC | ||
53 | + override CFLAGS += -DUSE_STATIC | ||
54 | LDFLAGS += -static | ||
55 | endif | ||
56 | |||
diff --git a/meta/recipes-core/udev/udev-124/init b/meta/recipes-core/udev/udev-124/init new file mode 100644 index 0000000000..32ab370aa9 --- /dev/null +++ b/meta/recipes-core/udev/udev-124/init | |||
@@ -0,0 +1,59 @@ | |||
1 | #!/bin/sh -e | ||
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 /sbin/udevd ] || exit 1 | ||
17 | [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf | ||
18 | |||
19 | kill_udevd() { | ||
20 | if [ -x /sbin/pidof ]; then | ||
21 | pid=`/sbin/pidof -x udevd` | ||
22 | [ -n "$pid" ] && kill $pid | ||
23 | fi | ||
24 | } | ||
25 | |||
26 | export ACTION=add | ||
27 | # propagate /dev from /sys | ||
28 | echo -n "Starting udev" | ||
29 | |||
30 | # mount the tmpfs on /dev, if not already done | ||
31 | LANG=C awk "\$2 == \"/dev\" && \$4 == \"tmpfs\" { exit 1 }" /proc/mounts && { | ||
32 | mount -n -o mode=0755 -t tmpfs none "/dev" | ||
33 | mkdir -m 0755 /dev/pts | ||
34 | mkdir -m 0755 /dev/shm | ||
35 | } | ||
36 | |||
37 | if [ -e /etc/dev.tar ]; then | ||
38 | (cd /; tar xf /etc/dev.tar) | ||
39 | not_first_boot=1 | ||
40 | fi | ||
41 | |||
42 | # make_extra_nodes | ||
43 | kill_udevd > "/dev/null" 2>&1 | ||
44 | |||
45 | # trigger the sorted events | ||
46 | echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug | ||
47 | /sbin/udevd -d | ||
48 | |||
49 | /sbin/udevadm control env STARTUP=1 | ||
50 | if [ "$not_first_boot" != "" ];then | ||
51 | /sbin/udevadm trigger --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 --subsystem-nomatch=platform | ||
52 | (/sbin/udevadm settle --timeout=3; /sbin/udevadm control env STARTUP=)& | ||
53 | else | ||
54 | /sbin/udevadm trigger | ||
55 | /sbin/udevadm settle | ||
56 | fi | ||
57 | |||
58 | echo | ||
59 | exit 0 | ||
diff --git a/meta/recipes-core/udev/udev-124/local.rules b/meta/recipes-core/udev/udev-124/local.rules new file mode 100644 index 0000000000..5b926018f5 --- /dev/null +++ b/meta/recipes-core/udev/udev-124/local.rules | |||
@@ -0,0 +1,31 @@ | |||
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 | |||
20 | # Handle network interface setup | ||
21 | SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" | ||
22 | SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" | ||
23 | |||
24 | # The first rtc device is symlinked to /dev/rtc | ||
25 | KERNEL=="rtc0", SYMLINK+="rtc" | ||
26 | |||
27 | # Try and modprobe for drivers for new hardware | ||
28 | ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" | ||
29 | |||
30 | # Create a symlink to any touchscreen input device | ||
31 | SUBSYSTEM=="input", KERNEL=="event[0-9]*", SYSFS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" | ||
diff --git a/meta/recipes-core/udev/udev-124/noasmlinkage.patch b/meta/recipes-core/udev/udev-124/noasmlinkage.patch new file mode 100644 index 0000000000..d58a7ea4de --- /dev/null +++ b/meta/recipes-core/udev/udev-124/noasmlinkage.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | diff -pru udev-124.orig/test-udev.c udev-124/test-udev.c | ||
2 | --- udev-124.orig/test-udev.c 2008-06-12 06:24:30.000000000 +0100 | ||
3 | +++ udev-124/test-udev.c 2008-07-07 14:43:37.000000000 +0100 | ||
4 | @@ -46,7 +46,7 @@ void log_message(int priority, const cha | ||
5 | } | ||
6 | #endif | ||
7 | |||
8 | -static void asmlinkage sig_handler(int signum) | ||
9 | +static void sig_handler(int signum) | ||
10 | { | ||
11 | switch (signum) { | ||
12 | case SIGALRM: | ||
13 | diff -pru udev-124.orig/udevd.c udev-124/udevd.c | ||
14 | --- udev-124.orig/udevd.c 2008-06-12 06:24:30.000000000 +0100 | ||
15 | +++ udev-124/udevd.c 2008-07-07 14:43:58.000000000 +0100 | ||
16 | @@ -87,7 +87,7 @@ void log_message(int priority, const cha | ||
17 | |||
18 | #endif | ||
19 | |||
20 | -static void asmlinkage udev_event_sig_handler(int signum) | ||
21 | +static void udev_event_sig_handler(int signum) | ||
22 | { | ||
23 | if (signum == SIGALRM) | ||
24 | exit(1); | ||
25 | @@ -798,7 +798,7 @@ static struct udevd_uevent_msg *get_netl | ||
26 | return msg; | ||
27 | } | ||
28 | |||
29 | -static void asmlinkage sig_handler(int signum) | ||
30 | +static void sig_handler(int signum) | ||
31 | { | ||
32 | switch (signum) { | ||
33 | case SIGINT: | ||
34 | diff -pru udev-124.orig/udevmonitor.c udev-124/udevmonitor.c | ||
35 | --- udev-124.orig/udevmonitor.c 2008-06-12 06:24:30.000000000 +0100 | ||
36 | +++ udev-124/udevmonitor.c 2008-07-07 14:44:24.000000000 +0100 | ||
37 | @@ -97,7 +97,7 @@ static int init_uevent_netlink_sock(void | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | -static void asmlinkage sig_handler(int signum) | ||
42 | +static void sig_handler(int signum) | ||
43 | { | ||
44 | if (signum == SIGINT || signum == SIGTERM) | ||
45 | udev_exit = 1; | ||
diff --git a/meta/recipes-core/udev/udev-124/permissions.rules b/meta/recipes-core/udev/udev-124/permissions.rules new file mode 100644 index 0000000000..205b733292 --- /dev/null +++ b/meta/recipes-core/udev/udev-124/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-124/run.rules b/meta/recipes-core/udev/udev-124/run.rules new file mode 100644 index 0000000000..75d71375bb --- /dev/null +++ b/meta/recipes-core/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/recipes-core/udev/udev-124/udev.rules b/meta/recipes-core/udev/udev-124/udev.rules new file mode 100644 index 0000000000..a19d4a0bf6 --- /dev/null +++ b/meta/recipes-core/udev/udev-124/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-124/udevtrigger_add_devname_filtering.patch b/meta/recipes-core/udev/udev-124/udevtrigger_add_devname_filtering.patch new file mode 100644 index 0000000000..5182542461 --- /dev/null +++ b/meta/recipes-core/udev/udev-124/udevtrigger_add_devname_filtering.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | diff -pru udev-124.orig/udevtrigger.c udev-124/udevtrigger.c | ||
2 | --- udev-124.orig/udevtrigger.c 2008-06-12 06:24:30.000000000 +0100 | ||
3 | +++ udev-124/udevtrigger.c 2008-07-07 15:10:09.000000000 +0100 | ||
4 | @@ -42,6 +42,8 @@ static int dry_run; | ||
5 | LIST_HEAD(device_list); | ||
6 | LIST_HEAD(filter_subsystem_match_list); | ||
7 | LIST_HEAD(filter_subsystem_nomatch_list); | ||
8 | +LIST_HEAD(filter_kernel_match_list); | ||
9 | +LIST_HEAD(filter_kernel_nomatch_list); | ||
10 | LIST_HEAD(filter_attr_match_list); | ||
11 | LIST_HEAD(filter_attr_nomatch_list); | ||
12 | static int sock = -1; | ||
13 | @@ -331,6 +333,26 @@ static int attr_match(const char *path, | ||
14 | return 0; | ||
15 | } | ||
16 | |||
17 | +static int kernel_filtered(const char *kernel) | ||
18 | +{ | ||
19 | + struct name_entry *loop_name; | ||
20 | + | ||
21 | + /* skip devices matching the prohibited kernel device names */ | ||
22 | + list_for_each_entry(loop_name, &filter_kernel_nomatch_list, node) | ||
23 | + if (fnmatch(loop_name->name, kernel, 0) == 0) | ||
24 | + return 1; | ||
25 | + | ||
26 | + /* skip devices not matching the listed kernel device names */ | ||
27 | + if (!list_empty(&filter_kernel_match_list)) { | ||
28 | + list_for_each_entry(loop_name, &filter_kernel_match_list, node) | ||
29 | + if (fnmatch(loop_name->name, kernel, 0) == 0) | ||
30 | + return 0; | ||
31 | + return 1; | ||
32 | + } | ||
33 | + | ||
34 | + return 0; | ||
35 | +} | ||
36 | + | ||
37 | static int attr_filtered(const char *path) | ||
38 | { | ||
39 | struct name_entry *loop_name; | ||
40 | @@ -409,6 +431,9 @@ static void scan_subsystem(const char *s | ||
41 | if (dent2->d_name[0] == '.') | ||
42 | continue; | ||
43 | |||
44 | + if (kernel_filtered(dent2->d_name)) | ||
45 | + continue; | ||
46 | + | ||
47 | strlcpy(dirname2, dirname, sizeof(dirname2)); | ||
48 | strlcat(dirname2, "/", sizeof(dirname2)); | ||
49 | strlcat(dirname2, dent2->d_name, sizeof(dirname2)); | ||
50 | @@ -465,6 +490,9 @@ static void scan_block(void) | ||
51 | if (!strcmp(dent2->d_name,"device")) | ||
52 | continue; | ||
53 | |||
54 | + if (kernel_filtered(dent2->d_name)) | ||
55 | + continue; | ||
56 | + | ||
57 | strlcpy(dirname2, dirname, sizeof(dirname2)); | ||
58 | strlcat(dirname2, "/", sizeof(dirname2)); | ||
59 | strlcat(dirname2, dent2->d_name, sizeof(dirname2)); | ||
60 | @@ -576,6 +604,8 @@ int udevtrigger(int argc, char *argv[], | ||
61 | { "subsystem-nomatch", 1, NULL, 'S' }, | ||
62 | { "attr-match", 1, NULL, 'a' }, | ||
63 | { "attr-nomatch", 1, NULL, 'A' }, | ||
64 | + { "kernel-match", 1, NULL, 'k' }, | ||
65 | + { "kernel-nomatch", 1, NULL, 'K' }, | ||
66 | { "env", 1, NULL, 'e' }, | ||
67 | {} | ||
68 | }; | ||
69 | @@ -622,6 +652,12 @@ int udevtrigger(int argc, char *argv[], | ||
70 | case 'A': | ||
71 | name_list_add(&filter_attr_nomatch_list, optarg, 0); | ||
72 | break; | ||
73 | + case 'k': | ||
74 | + name_list_add(&filter_kernel_match_list, optarg, 0); | ||
75 | + break; | ||
76 | + case 'K': | ||
77 | + name_list_add(&filter_kernel_nomatch_list, optarg, 0); | ||
78 | + break; | ||
79 | case 'h': | ||
80 | printf("Usage: udevadm trigger OPTIONS\n" | ||
81 | " --verbose print the list of devices while running\n" | ||
82 | @@ -632,6 +668,8 @@ int udevtrigger(int argc, char *argv[], | ||
83 | " --env=<KEY>=<value> pass an additional key (works only with --socket=)\n" | ||
84 | " --subsystem-match=<subsystem> trigger devices from a matching subystem\n" | ||
85 | " --subsystem-nomatch=<subsystem> exclude devices from a matching subystem\n" | ||
86 | + " --kernel-match=<subsystem> trigger devices from a matching kernel device name\n" | ||
87 | + " --kernel-nomatch=<subsystem> exclude devices from a matching kernel device name\n" | ||
88 | " --attr-match=<file[=<value>]> trigger devices with a matching sysfs\n" | ||
89 | " attribute\n" | ||
90 | " --attr-nomatch=<file[=<value>]> exclude devices with a matching sysfs\n" | ||
91 | @@ -701,6 +739,8 @@ int udevtrigger(int argc, char *argv[], | ||
92 | exit: | ||
93 | name_list_cleanup(&filter_subsystem_match_list); | ||
94 | name_list_cleanup(&filter_subsystem_nomatch_list); | ||
95 | + name_list_cleanup(&filter_kernel_match_list); | ||
96 | + name_list_cleanup(&filter_kernel_nomatch_list); | ||
97 | name_list_cleanup(&filter_attr_match_list); | ||
98 | name_list_cleanup(&filter_attr_nomatch_list); | ||
99 | |||
diff --git a/meta/recipes-core/udev/udev-124/vol_id_ld.patch b/meta/recipes-core/udev/udev-124/vol_id_ld.patch new file mode 100644 index 0000000000..11126eef8d --- /dev/null +++ b/meta/recipes-core/udev/udev-124/vol_id_ld.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | --- | ||
2 | extras/volume_id/Makefile | 2 +- | ||
3 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4 | |||
5 | Index: udev-115/extras/volume_id/Makefile | ||
6 | =================================================================== | ||
7 | --- udev-115.orig/extras/volume_id/Makefile 2007-09-20 18:17:59.000000000 +0200 | ||
8 | +++ udev-115/extras/volume_id/Makefile 2007-09-20 18:18:08.000000000 +0200 | ||
9 | @@ -44,7 +44,7 @@ | ||
10 | ifeq ($(strip $(VOLUME_ID_STATIC)),true) | ||
11 | $(Q) $(LD) $(LDFLAGS) -o $@ $@.o $(LIBUDEV) lib/libvolume_id.a $(LIB_OBJS) | ||
12 | else | ||
13 | - $(Q) $(LD) $(LDFLAGS) -o $@ $@.o $(LIBUDEV) -Llib -lvolume_id $(LIB_OBJS) | ||
14 | + $(Q) $(LD) -Llib $(LDFLAGS) -o $@ $@.o $(LIBUDEV) -lvolume_id $(LIB_OBJS) | ||
15 | endif | ||
16 | |||
17 | # man pages | ||