diff options
Diffstat (limited to 'meta/recipes-core/udev/udev-115')
-rw-r--r-- | meta/recipes-core/udev/udev-115/flags.patch | 56 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/init | 48 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/local.rules | 31 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/noasmlinkage.patch | 36 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/permissions.rules | 101 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/udev.rules | 105 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/udevtrigger_add_devname_filtering.patch | 104 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-115/vol_id_ld.patch | 17 |
8 files changed, 498 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/udev-115/flags.patch b/meta/recipes-core/udev/udev-115/flags.patch new file mode 100644 index 0000000000..13f20eb6a8 --- /dev/null +++ b/meta/recipes-core/udev/udev-115/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-115/init b/meta/recipes-core/udev/udev-115/init new file mode 100644 index 0000000000..c882c75607 --- /dev/null +++ b/meta/recipes-core/udev/udev-115/init | |||
@@ -0,0 +1,48 @@ | |||
1 | export TZ=/etc/localtime | ||
2 | |||
3 | [ -d /sys/class ] || exit 1 | ||
4 | [ -r /proc/mounts ] || exit 1 | ||
5 | [ -x /sbin/udevd ] || exit 1 | ||
6 | [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf | ||
7 | |||
8 | kill_udevd() { | ||
9 | if [ -x /sbin/pidof ]; then | ||
10 | pid=`/sbin/pidof -x udevd` | ||
11 | [ -n "$pid" ] && kill $pid | ||
12 | fi | ||
13 | } | ||
14 | |||
15 | export ACTION=add | ||
16 | # propagate /dev from /sys | ||
17 | echo -n "Starting udev" | ||
18 | |||
19 | # mount the tmpfs on /dev, if not already done | ||
20 | LANG=C awk "\$2 == \"/dev\" && \$4 == \"tmpfs\" { exit 1 }" /proc/mounts && { | ||
21 | mount -n -o mode=0755 -t tmpfs none "/dev" | ||
22 | mkdir -m 0755 /dev/pts | ||
23 | mkdir -m 0755 /dev/shm | ||
24 | } | ||
25 | |||
26 | if [ -e /etc/dev.tar ]; then | ||
27 | (cd /; tar xf /etc/dev.tar) | ||
28 | not_first_boot=1 | ||
29 | fi | ||
30 | |||
31 | # make_extra_nodes | ||
32 | kill_udevd > "/dev/null" 2>&1 | ||
33 | |||
34 | # trigger the sorted events | ||
35 | echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug | ||
36 | /sbin/udevd -d | ||
37 | |||
38 | /sbin/udevcontrol env STARTUP=1 | ||
39 | if [ "$not_first_boot" != "" ];then | ||
40 | /sbin/udevtrigger --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 | ||
41 | (/sbin/udevsettle --timeout=3; /sbin/udevcontrol env STARTUP=)& | ||
42 | else | ||
43 | /sbin/udevtrigger | ||
44 | /sbin/udevsettle | ||
45 | fi | ||
46 | |||
47 | echo | ||
48 | exit 0 | ||
diff --git a/meta/recipes-core/udev/udev-115/local.rules b/meta/recipes-core/udev/udev-115/local.rules new file mode 100644 index 0000000000..5b926018f5 --- /dev/null +++ b/meta/recipes-core/udev/udev-115/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-115/noasmlinkage.patch b/meta/recipes-core/udev/udev-115/noasmlinkage.patch new file mode 100644 index 0000000000..5824d29590 --- /dev/null +++ b/meta/recipes-core/udev/udev-115/noasmlinkage.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- | ||
7 | udevd.c | 2 +- | ||
8 | udevstart.c | 2 +- | ||
9 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
10 | |||
11 | Index: udev-115/udevd.c | ||
12 | =================================================================== | ||
13 | --- udev-115.orig/udevd.c 2007-08-24 01:29:54.000000000 +0200 | ||
14 | +++ udev-115/udevd.c 2007-09-20 17:04:51.000000000 +0200 | ||
15 | @@ -767,7 +767,7 @@ | ||
16 | return msg; | ||
17 | } | ||
18 | |||
19 | -static void asmlinkage sig_handler(int signum) | ||
20 | +static void sig_handler(int signum) | ||
21 | { | ||
22 | switch (signum) { | ||
23 | case SIGINT: | ||
24 | Index: udev-115/udevstart.c | ||
25 | =================================================================== | ||
26 | --- udev-115.orig/udevstart.c 2007-08-24 01:29:54.000000000 +0200 | ||
27 | +++ udev-115/udevstart.c 2007-09-20 17:04:51.000000000 +0200 | ||
28 | @@ -304,7 +304,7 @@ | ||
29 | } | ||
30 | } | ||
31 | |||
32 | -static void asmlinkage sig_handler(int signum) | ||
33 | +static void sig_handler(int signum) | ||
34 | { | ||
35 | switch (signum) { | ||
36 | case SIGALRM: | ||
diff --git a/meta/recipes-core/udev/udev-115/permissions.rules b/meta/recipes-core/udev/udev-115/permissions.rules new file mode 100644 index 0000000000..99e03b1036 --- /dev/null +++ b/meta/recipes-core/udev/udev-115/permissions.rules | |||
@@ -0,0 +1,101 @@ | |||
1 | ACTION!="add", GOTO="permissions_end" | ||
2 | |||
3 | # workarounds needed to synchronize with sysfs | ||
4 | DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" | ||
5 | SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" | ||
6 | # only needed for kernels < 2.6.16 | ||
7 | SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" | ||
8 | # only needed for kernels < 2.6.17 | ||
9 | SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" | ||
10 | |||
11 | # default permissions for block devices | ||
12 | SUBSYSTEM=="block", GROUP="disk" | ||
13 | SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy" | ||
14 | |||
15 | # IDE devices | ||
16 | BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", \ | ||
17 | IMPORT{program}="cdrom_id --export $tempnode" | ||
18 | ENV{ID_CDROM}=="?*", GROUP="cdrom" | ||
19 | BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape" | ||
20 | BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape" | ||
21 | |||
22 | # SCSI devices | ||
23 | BUS=="scsi", SYSFS{type}=="1", GROUP="tape" | ||
24 | BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom" | ||
25 | |||
26 | # USB devices | ||
27 | BUS=="usb", KERNEL=="legousbtower*", MODE="0666" | ||
28 | BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp" | ||
29 | |||
30 | # usbfs-like devices | ||
31 | SUBSYSTEM=="usb_device", MODE="0664" | ||
32 | |||
33 | # iRiver music players | ||
34 | SUBSYSTEM=="usb_device", GROUP="plugdev", \ | ||
35 | SYSFS{idVendor}=="4102", SYSFS{idProduct}=="10[01][135789]" | ||
36 | |||
37 | # serial devices | ||
38 | SUBSYSTEM=="tty", GROUP="dialout" | ||
39 | SUBSYSTEM=="capi", GROUP="dialout" | ||
40 | SUBSYSTEM=="slamr", GROUP="dialout" | ||
41 | SUBSYSTEM=="zaptel", GROUP="dialout" | ||
42 | |||
43 | # vc devices (all members of the tty subsystem) | ||
44 | KERNEL=="ptmx", MODE="0666", GROUP="root" | ||
45 | KERNEL=="console", MODE="0600", GROUP="root" | ||
46 | KERNEL=="tty", MODE="0666", GROUP="root" | ||
47 | KERNEL=="tty[0-9]*", GROUP="root" | ||
48 | KERNEL=="pty*", MODE="0666", GROUP="tty" | ||
49 | |||
50 | # video devices | ||
51 | SUBSYSTEM=="video4linux", GROUP="video" | ||
52 | SUBSYSTEM=="drm", GROUP="video" | ||
53 | SUBSYSTEM=="dvb", GROUP="video" | ||
54 | SUBSYSTEM=="em8300", GROUP="video" | ||
55 | SUBSYSTEM=="graphics", GROUP="video" | ||
56 | SUBSYSTEM=="nvidia", GROUP="video" | ||
57 | |||
58 | # misc devices | ||
59 | KERNEL=="random", MODE="0666" | ||
60 | KERNEL=="urandom", MODE="0666" | ||
61 | KERNEL=="mem", MODE="0640", GROUP="kmem" | ||
62 | KERNEL=="kmem", MODE="0640", GROUP="kmem" | ||
63 | KERNEL=="port", MODE="0640", GROUP="kmem" | ||
64 | KERNEL=="full", MODE="0666" | ||
65 | KERNEL=="null", MODE="0666" | ||
66 | KERNEL=="zero", MODE="0666" | ||
67 | KERNEL=="inotify", MODE="0666" | ||
68 | KERNEL=="sgi_fetchop", MODE="0666" | ||
69 | KERNEL=="sonypi", MODE="0666" | ||
70 | KERNEL=="agpgart", GROUP="video" | ||
71 | KERNEL=="rtc", GROUP="audio" | ||
72 | |||
73 | KERNEL=="cdemu[0-9]*", GROUP="cdrom" | ||
74 | KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" | ||
75 | KERNEL=="pktcdvd", MODE="0644" | ||
76 | |||
77 | # printers and parallel devices | ||
78 | SUBSYSTEM=="printer", GROUP="lp" | ||
79 | SUBSYSTEM=="ppdev", GROUP="lp" | ||
80 | KERNEL=="pt[0-9]*", GROUP="tape" | ||
81 | KERNEL=="pht[0-9]*", GROUP="tape" | ||
82 | |||
83 | # sound devices | ||
84 | SUBSYSTEM=="sound", GROUP="audio" | ||
85 | |||
86 | # ieee1394 devices | ||
87 | KERNEL=="raw1394", GROUP="disk" | ||
88 | KERNEL=="dv1394*", GROUP="video" | ||
89 | KERNEL=="video1394*", GROUP="video" | ||
90 | |||
91 | # input devices | ||
92 | KERNEL=="event[0-9]*", SYSFS{name}=="*dvb*|*DVB*|* IR *" \ | ||
93 | MODE="0664", GROUP="video" | ||
94 | KERNEL=="js[0-9]*", MODE="0664" | ||
95 | |||
96 | # AOE character devices | ||
97 | SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" | ||
98 | SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" | ||
99 | |||
100 | LABEL="permissions_end" | ||
101 | |||
diff --git a/meta/recipes-core/udev/udev-115/udev.rules b/meta/recipes-core/udev/udev-115/udev.rules new file mode 100644 index 0000000000..4d29acac0c --- /dev/null +++ b/meta/recipes-core/udev/udev-115/udev.rules | |||
@@ -0,0 +1,105 @@ | |||
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 | # SCSI devices | ||
17 | BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" | ||
18 | |||
19 | # USB devices | ||
20 | BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" | ||
21 | BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k" | ||
22 | BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k" | ||
23 | BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k" | ||
24 | BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" | ||
25 | BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" | ||
26 | BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \ | ||
27 | SYMLINK+="pilot" | ||
28 | |||
29 | # usbfs-like devices | ||
30 | SUBSYSTEM=="usb_device", \ | ||
31 | PROGRAM="/bin/sh -c 'export X=%k; export X=$${X#usbdev}; export B=$${X%%%%.*}; export D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" | ||
32 | |||
33 | # serial devices | ||
34 | KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" | ||
35 | KERNEL=="capi[0-9]*", NAME="capi/%n" | ||
36 | |||
37 | # video devices | ||
38 | KERNEL=="card[0-9]*", NAME="dri/%k" | ||
39 | |||
40 | # misc devices | ||
41 | KERNEL=="hw_random", NAME="hwrng" | ||
42 | KERNEL=="tun", NAME="net/%k" | ||
43 | |||
44 | KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" | ||
45 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" | ||
46 | KERNEL=="pktcdvd", NAME="pktcdvd/control" | ||
47 | |||
48 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" | ||
49 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" | ||
50 | KERNEL=="microcode", NAME="cpu/microcode" | ||
51 | |||
52 | KERNEL=="umad*", NAME="infiniband/%k" | ||
53 | KERNEL=="issm*", NAME="infiniband/%k" | ||
54 | KERNEL=="uverbs*", NAME="infiniband/%k" | ||
55 | KERNEL=="ucm", NAME="infiniband/%k" | ||
56 | |||
57 | KERNEL=="buzzer", NAME="misc/buzzer" | ||
58 | |||
59 | # ALSA devices | ||
60 | KERNEL=="controlC[0-9]*", NAME="snd/%k" | ||
61 | KERNEL=="hwC[D0-9]*", NAME="snd/%k" | ||
62 | KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" | ||
63 | KERNEL=="midiC[D0-9]*", NAME="snd/%k" | ||
64 | KERNEL=="timer", NAME="snd/%k" | ||
65 | KERNEL=="seq", NAME="snd/%k" | ||
66 | |||
67 | # ieee1394 devices | ||
68 | KERNEL=="dv1394*", NAME="dv1394/%n" | ||
69 | KERNEL=="video1394*", NAME="video1394/%n" | ||
70 | |||
71 | # input devices | ||
72 | KERNEL=="mice", NAME="input/%k" | ||
73 | KERNEL=="mouse[0-9]*", NAME="input/%k" | ||
74 | KERNEL=="event[0-9]*", NAME="input/%k" | ||
75 | KERNEL=="js[0-9]*", NAME="input/%k" | ||
76 | KERNEL=="ts[0-9]*", NAME="input/%k" | ||
77 | KERNEL=="uinput", NAME="input/%k" | ||
78 | |||
79 | # Zaptel | ||
80 | KERNEL=="zapctl", NAME="zap/ctl" | ||
81 | KERNEL=="zaptimer", NAME="zap/timer" | ||
82 | KERNEL=="zapchannel", NAME="zap/channel" | ||
83 | KERNEL=="zappseudo", NAME="zap/pseudo" | ||
84 | KERNEL=="zap[0-9]*", NAME="zap/%n" | ||
85 | |||
86 | # AOE character devices | ||
87 | SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" | ||
88 | SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" | ||
89 | SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" | ||
90 | |||
91 | # device mapper creates its own device nodes, so ignore these | ||
92 | KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" | ||
93 | KERNEL=="device-mapper", NAME="mapper/control" | ||
94 | |||
95 | KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660" | ||
96 | |||
97 | # Firmware Helper | ||
98 | ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware_helper" | ||
99 | |||
100 | # Samsung UARTS | ||
101 | KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n" | ||
102 | |||
103 | # MXC UARTs | ||
104 | KERNEL=="ttymxc[0-4]", NAME="ttymxc%n" | ||
105 | |||
diff --git a/meta/recipes-core/udev/udev-115/udevtrigger_add_devname_filtering.patch b/meta/recipes-core/udev/udev-115/udevtrigger_add_devname_filtering.patch new file mode 100644 index 0000000000..87cafcaa9d --- /dev/null +++ b/meta/recipes-core/udev/udev-115/udevtrigger_add_devname_filtering.patch | |||
@@ -0,0 +1,104 @@ | |||
1 | --- | ||
2 | udevtrigger.c | 40 ++++++++++++++++++++++++++++++++++++++++ | ||
3 | 1 file changed, 40 insertions(+) | ||
4 | |||
5 | Index: udev-115/udevtrigger.c | ||
6 | =================================================================== | ||
7 | --- udev-115.orig/udevtrigger.c 2007-08-24 01:29:54.000000000 +0200 | ||
8 | +++ udev-115/udevtrigger.c 2007-09-21 18:45:28.000000000 +0200 | ||
9 | @@ -39,6 +39,8 @@ | ||
10 | LIST_HEAD(device_list); | ||
11 | LIST_HEAD(filter_subsystem_match_list); | ||
12 | LIST_HEAD(filter_subsystem_nomatch_list); | ||
13 | +LIST_HEAD(filter_kernel_match_list); | ||
14 | +LIST_HEAD(filter_kernel_nomatch_list); | ||
15 | LIST_HEAD(filter_attr_match_list); | ||
16 | LIST_HEAD(filter_attr_nomatch_list); | ||
17 | |||
18 | @@ -218,6 +220,26 @@ | ||
19 | return 0; | ||
20 | } | ||
21 | |||
22 | +static int kernel_filtered(const char *kernel) | ||
23 | +{ | ||
24 | + struct name_entry *loop_name; | ||
25 | + | ||
26 | + /* skip devices matching the prohibited kernel device names */ | ||
27 | + list_for_each_entry(loop_name, &filter_kernel_nomatch_list, node) | ||
28 | + if (fnmatch(loop_name->name, kernel, 0) == 0) | ||
29 | + return 1; | ||
30 | + | ||
31 | + /* skip devices not matching the listed kernel device names */ | ||
32 | + if (!list_empty(&filter_kernel_match_list)) { | ||
33 | + list_for_each_entry(loop_name, &filter_kernel_match_list, node) | ||
34 | + if (fnmatch(loop_name->name, kernel, 0) == 0) | ||
35 | + return 0; | ||
36 | + return 1; | ||
37 | + } | ||
38 | + | ||
39 | + return 0; | ||
40 | +} | ||
41 | + | ||
42 | static int attr_filtered(const char *path) | ||
43 | { | ||
44 | struct name_entry *loop_name; | ||
45 | @@ -296,6 +318,9 @@ | ||
46 | if (dent2->d_name[0] == '.') | ||
47 | continue; | ||
48 | |||
49 | + if (kernel_filtered(dent2->d_name)) | ||
50 | + continue; | ||
51 | + | ||
52 | strlcpy(dirname2, dirname, sizeof(dirname2)); | ||
53 | strlcat(dirname2, "/", sizeof(dirname2)); | ||
54 | strlcat(dirname2, dent2->d_name, sizeof(dirname2)); | ||
55 | @@ -402,6 +427,9 @@ | ||
56 | if (!strcmp(dent2->d_name, "device")) | ||
57 | continue; | ||
58 | |||
59 | + if (kernel_filtered(dent2->d_name)) | ||
60 | + continue; | ||
61 | + | ||
62 | strlcpy(dirname2, dirname, sizeof(dirname2)); | ||
63 | strlcat(dirname2, "/", sizeof(dirname2)); | ||
64 | strlcat(dirname2, dent2->d_name, sizeof(dirname2)); | ||
65 | @@ -458,6 +486,8 @@ | ||
66 | { "subsystem-nomatch", 1, NULL, 'S' }, | ||
67 | { "attr-match", 1, NULL, 'a' }, | ||
68 | { "attr-nomatch", 1, NULL, 'A' }, | ||
69 | + { "kernel-match", 1, NULL, 'k' }, | ||
70 | + { "kernel-nomatch", 1, NULL, 'K' }, | ||
71 | {} | ||
72 | }; | ||
73 | |||
74 | @@ -496,6 +526,12 @@ | ||
75 | case 'A': | ||
76 | name_list_add(&filter_attr_nomatch_list, optarg, 0); | ||
77 | break; | ||
78 | + case 'k': | ||
79 | + name_list_add(&filter_kernel_match_list, optarg, 0); | ||
80 | + break; | ||
81 | + case 'K': | ||
82 | + name_list_add(&filter_kernel_nomatch_list, optarg, 0); | ||
83 | + break; | ||
84 | case 'h': | ||
85 | printf("Usage: udevtrigger OPTIONS\n" | ||
86 | " --verbose print the list of devices while running\n" | ||
87 | @@ -504,6 +540,8 @@ | ||
88 | " marked as failed during a previous run\n" | ||
89 | " --subsystem-match=<subsystem> trigger devices from a matching subystem\n" | ||
90 | " --subsystem-nomatch=<subsystem> exclude devices from a matching subystem\n" | ||
91 | + " --kernel-match=<subsystem> trigger devices from a matching kernel device name\n" | ||
92 | + " --kernel-nomatch=<subsystem> exclude devices from a matching kernel device name\n" | ||
93 | " --attr-match=<file[=<value>]> trigger devices with a matching sysfs\n" | ||
94 | " attribute\n" | ||
95 | " --attr-nomatch=<file[=<value>]> exclude devices with a matching sysfs\n" | ||
96 | @@ -549,6 +587,8 @@ | ||
97 | exit: | ||
98 | name_list_cleanup(&filter_subsystem_match_list); | ||
99 | name_list_cleanup(&filter_subsystem_nomatch_list); | ||
100 | + name_list_cleanup(&filter_kernel_match_list); | ||
101 | + name_list_cleanup(&filter_kernel_nomatch_list); | ||
102 | name_list_cleanup(&filter_attr_match_list); | ||
103 | name_list_cleanup(&filter_attr_nomatch_list); | ||
104 | |||
diff --git a/meta/recipes-core/udev/udev-115/vol_id_ld.patch b/meta/recipes-core/udev/udev-115/vol_id_ld.patch new file mode 100644 index 0000000000..11126eef8d --- /dev/null +++ b/meta/recipes-core/udev/udev-115/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 | ||