diff options
author | Samuel Ortiz <sameo@openedhand.com> | 2007-09-21 10:03:55 +0000 |
---|---|---|
committer | Samuel Ortiz <sameo@openedhand.com> | 2007-09-21 10:03:55 +0000 |
commit | cb40f228352aa322fd4b991ce7c5c8d7807a3a9d (patch) | |
tree | 463e3ddb25e07a2b11b9a7a63120e93ff9f45767 | |
parent | b03d999bb2eb86140cd6f22d74b9e6b164c52e96 (diff) | |
download | poky-cb40f228352aa322fd4b991ce7c5c8d7807a3a9d.tar.gz |
udev: adding the latest udev release, 115.
This release allows us to get rid of udevsynthesize in favour of
udevtrigger.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2769 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | meta/packages/udev/udev-115/flags.patch | 56 | ||||
-rw-r--r-- | meta/packages/udev/udev-115/init | 227 | ||||
-rw-r--r-- | meta/packages/udev/udev-115/local.rules | 31 | ||||
-rw-r--r-- | meta/packages/udev/udev-115/noasmlinkage.patch | 36 | ||||
-rw-r--r-- | meta/packages/udev/udev-115/permissions.rules | 101 | ||||
-rw-r--r-- | meta/packages/udev/udev-115/udev.rules | 102 | ||||
-rw-r--r-- | meta/packages/udev/udev-115/vol_id_ld.patch | 17 | ||||
-rw-r--r-- | meta/packages/udev/udev_115.bb | 57 |
8 files changed, 627 insertions, 0 deletions
diff --git a/meta/packages/udev/udev-115/flags.patch b/meta/packages/udev/udev-115/flags.patch new file mode 100644 index 0000000000..13f20eb6a8 --- /dev/null +++ b/meta/packages/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/packages/udev/udev-115/init b/meta/packages/udev/udev-115/init new file mode 100644 index 0000000000..f3eaaf0ffe --- /dev/null +++ b/meta/packages/udev/udev-115/init | |||
@@ -0,0 +1,227 @@ | |||
1 | #!/bin/sh -e | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: udev | ||
4 | # Required-Start: mountvirtfs | ||
5 | # Required-Stop: | ||
6 | # Default-Start: S | ||
7 | # Default-Stop: | ||
8 | # Short-Description: Start udevd, populate /dev and load drivers. | ||
9 | ### END INIT INFO | ||
10 | |||
11 | # we need to unmount /dev/pts/ and remount it later over the tmpfs | ||
12 | unmount_devpts() { | ||
13 | if mountpoint -q /dev/pts/; then | ||
14 | umount -l /dev/pts/ | ||
15 | fi | ||
16 | |||
17 | if mountpoint -q /dev/shm/; then | ||
18 | umount -l /dev/shm/ | ||
19 | fi | ||
20 | } | ||
21 | |||
22 | # mount a tmpfs over /dev, if somebody did not already do it | ||
23 | mount_tmpfs() { | ||
24 | if grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then | ||
25 | return | ||
26 | fi | ||
27 | |||
28 | # /dev/.static/dev/ is used by MAKEDEV to access the real /dev/ directory. | ||
29 | # /etc/udev/ is recycled as a temporary mount point because it's the only | ||
30 | # directory which is guaranteed to be available. | ||
31 | mount -n -o bind /dev /etc/udev | ||
32 | |||
33 | if ! mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs /dev; then | ||
34 | umount /etc/udev | ||
35 | echo "udev requires tmpfs support, not started." | ||
36 | exit 1 | ||
37 | fi | ||
38 | |||
39 | mkdir -p /dev/.static/dev | ||
40 | chmod 700 /dev/.static/ | ||
41 | # The mount options in busybox are non-standard... | ||
42 | if test -x /bin/mount.util-linux | ||
43 | then | ||
44 | /bin/mount.util-linux --move /etc/udev /dev/.static/dev | ||
45 | elif test -x /bin/busybox | ||
46 | then | ||
47 | busybox mount -n -o move /etc/udev /dev/.static/dev | ||
48 | else | ||
49 | echo "udev requires an identifiable mount command, not started." | ||
50 | umount /etc/udev | ||
51 | umount /dev | ||
52 | exit 1 | ||
53 | fi | ||
54 | } | ||
55 | |||
56 | # I hate this hack. -- Md | ||
57 | make_extra_nodes() { | ||
58 | if [ "$(echo /lib/udev/devices/*)" != "/lib/udev/devices/*" ]; then | ||
59 | cp -a /lib/udev/devices/* /dev/ | ||
60 | fi | ||
61 | |||
62 | [ -e /etc/udev/links.conf ] || return 0 | ||
63 | grep '^[^#]' /etc/udev/links.conf | \ | ||
64 | while read type name arg1; do | ||
65 | [ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue | ||
66 | case "$type" in | ||
67 | L) ln -s $arg1 /dev/$name ;; | ||
68 | D) mkdir -p /dev/$name ;; | ||
69 | M) mknod -m 600 /dev/$name $arg1 ;; | ||
70 | *) echo "links.conf: unparseable line ($type $name $arg1)" ;; | ||
71 | esac | ||
72 | done | ||
73 | } | ||
74 | |||
75 | supported_kernel() { | ||
76 | case "$(uname -r)" in | ||
77 | 2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;; | ||
78 | 2.6.1[01]|2.6.1[01][!0-9]*) return 1 ;; | ||
79 | esac | ||
80 | return 0 | ||
81 | } | ||
82 | |||
83 | set_hotplug_handler() { | ||
84 | case "$(uname -r)" in | ||
85 | 2.6.1[0-4]|2.6.1[0-4][!0-9]*) HANDLER='/sbin/udevsend' ;; | ||
86 | esac | ||
87 | echo $HANDLER > /proc/sys/kernel/hotplug | ||
88 | } | ||
89 | |||
90 | # shell version of /usr/bin/tty | ||
91 | my_tty() { | ||
92 | [ -x /bin/readlink ] || return 0 | ||
93 | [ -e /proc/self/fd/0 ] || return 0 | ||
94 | readlink --silent /proc/self/fd/0 || true | ||
95 | } | ||
96 | |||
97 | warn_if_interactive() { | ||
98 | if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then | ||
99 | return | ||
100 | fi | ||
101 | |||
102 | TTY=$(my_tty) | ||
103 | if [ -z "$TTY" -o "$TTY" = "/dev/console" ]; then | ||
104 | return | ||
105 | fi | ||
106 | |||
107 | printf "\n\n\nIt has been detected that the command\n\n\t$0 $*\n\n" | ||
108 | printf "has been run from an interactive shell.\n" | ||
109 | printf "It will probably not do what you expect, so this script will wait\n" | ||
110 | printf "60 seconds before continuing. Press ^C to stop it.\n" | ||
111 | printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n" | ||
112 | sleep 60 | ||
113 | } | ||
114 | |||
115 | ############################################################################## | ||
116 | |||
117 | PATH="/sbin:/bin:/usr/bin" | ||
118 | |||
119 | [ -x /sbin/udevd ] || exit 0 | ||
120 | |||
121 | # defaults | ||
122 | tmpfs_size="10M" | ||
123 | udev_root="/dev" | ||
124 | udevd_timeout=30 | ||
125 | |||
126 | . /etc/udev/udev.conf | ||
127 | |||
128 | if ! supported_kernel; then | ||
129 | echo "udev requires a kernel >= 2.6.12, not started." | ||
130 | exit 1 | ||
131 | fi | ||
132 | |||
133 | if [ ! -e /proc/filesystems ]; then | ||
134 | echo "udev requires a mounted procfs, not started." | ||
135 | exit 1 | ||
136 | fi | ||
137 | |||
138 | if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then | ||
139 | echo "udev requires tmpfs support, not started." | ||
140 | exit 1 | ||
141 | fi | ||
142 | |||
143 | if [ ! -d /sys/class/ ]; then | ||
144 | echo "udev requires a mounted sysfs, not started." | ||
145 | exit 1 | ||
146 | fi | ||
147 | |||
148 | if [ ! -e /proc/sys/kernel/hotplug ]; then | ||
149 | echo "udev requires hotplug support, not started." | ||
150 | exit 1 | ||
151 | fi | ||
152 | |||
153 | ############################################################################## | ||
154 | |||
155 | # When modifying this script, do not forget that between the time that | ||
156 | # the new /dev has been mounted and udevsynthesize has been run there will be | ||
157 | # no /dev/null. This also means that you cannot use the "&" shell command. | ||
158 | |||
159 | case "$1" in | ||
160 | start) | ||
161 | if [ -e "$udev_root/.udev/" ]; then | ||
162 | if mountpoint -q /dev/; then | ||
163 | TMPFS_MOUNTED=1 | ||
164 | else | ||
165 | echo ".udev/ already exists on the static $udev_root!" | ||
166 | fi | ||
167 | else | ||
168 | warn_if_interactive | ||
169 | fi | ||
170 | |||
171 | echo "Starting the hotplug events dispatcher" "udevd" | ||
172 | udevd --daemon | ||
173 | |||
174 | set_hotplug_handler | ||
175 | |||
176 | if [ -z "$TMPFS_MOUNTED" ]; then | ||
177 | unmount_devpts | ||
178 | mount_tmpfs | ||
179 | [ -d /proc/1 ] || mount -n /proc | ||
180 | fi | ||
181 | |||
182 | # if this directory is not present /dev will not be updated by udev | ||
183 | mkdir -p /dev/.udev/ /dev/.udev/db/ /dev/.udev/queue/ /dev/.udevdb/ | ||
184 | # /dev/null must be created before udevd is started | ||
185 | make_extra_nodes | ||
186 | |||
187 | echo "Synthesizing the initial hotplug events" | ||
188 | udevtrigger | ||
189 | |||
190 | # wait for the udevd childs to finish | ||
191 | echo "Waiting for /dev to be fully populated" | ||
192 | while [ -d /dev/.udev/queue/ ]; do | ||
193 | sleep 1 | ||
194 | udevd_timeout=$(($udevd_timeout - 1)) | ||
195 | if [ $udevd_timeout -eq 0 ]; then | ||
196 | # ps axf | ||
197 | break | ||
198 | fi | ||
199 | done | ||
200 | if [ $udevd_timeout -eq 0 ]; then | ||
201 | echo 'timeout' | ||
202 | fi | ||
203 | ;; | ||
204 | |||
205 | stop) | ||
206 | echo "Stopping the hotplug events dispatcher" "udevd" | ||
207 | start-stop-daemon --stop --name udevd --quiet | ||
208 | ;; | ||
209 | |||
210 | restart|force-reload) | ||
211 | echo "Stopping the hotplug events dispatcher" "udevd" | ||
212 | if start-stop-daemon --stop --name udevd --quiet ; then | ||
213 | exit 1 | ||
214 | fi | ||
215 | |||
216 | echo "Starting the hotplug events dispatcher" "udevd" | ||
217 | udevd --daemon | ||
218 | ;; | ||
219 | |||
220 | *) | ||
221 | echo "Usage: /etc/init.d/udev {start|stop|restart|force-reload}" | ||
222 | exit 1 | ||
223 | ;; | ||
224 | esac | ||
225 | |||
226 | exit 0 | ||
227 | |||
diff --git a/meta/packages/udev/udev-115/local.rules b/meta/packages/udev/udev-115/local.rules new file mode 100644 index 0000000000..5b926018f5 --- /dev/null +++ b/meta/packages/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/packages/udev/udev-115/noasmlinkage.patch b/meta/packages/udev/udev-115/noasmlinkage.patch new file mode 100644 index 0000000000..5824d29590 --- /dev/null +++ b/meta/packages/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/packages/udev/udev-115/permissions.rules b/meta/packages/udev/udev-115/permissions.rules new file mode 100644 index 0000000000..99e03b1036 --- /dev/null +++ b/meta/packages/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/packages/udev/udev-115/udev.rules b/meta/packages/udev/udev-115/udev.rules new file mode 100644 index 0000000000..72be706e84 --- /dev/null +++ b/meta/packages/udev/udev-115/udev.rules | |||
@@ -0,0 +1,102 @@ | |||
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 | |||
diff --git a/meta/packages/udev/udev-115/vol_id_ld.patch b/meta/packages/udev/udev-115/vol_id_ld.patch new file mode 100644 index 0000000000..11126eef8d --- /dev/null +++ b/meta/packages/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 | ||
diff --git a/meta/packages/udev/udev_115.bb b/meta/packages/udev/udev_115.bb new file mode 100644 index 0000000000..7c2c372dea --- /dev/null +++ b/meta/packages/udev/udev_115.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \ | ||
2 | /dev/, handles hotplug events and loads drivers at boot time. It replaces \ | ||
3 | the hotplug package and requires a kernel not older than 2.6.12." | ||
4 | RPROVIDES_${PN} = "hotplug" | ||
5 | |||
6 | DEFAULT_PREFERENCE = "-1" | ||
7 | |||
8 | PR = "r0" | ||
9 | |||
10 | SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ | ||
11 | file://noasmlinkage.patch;patch=1 \ | ||
12 | file://flags.patch;patch=1 \ | ||
13 | file://vol_id_ld.patch;patch=1 \ | ||
14 | file://mount.blacklist \ | ||
15 | " | ||
16 | |||
17 | SRC_URI_append_h2200 = " file://50-hostap_cs.rules " | ||
18 | PACKAGE_ARCH_h2200 = "h2200" | ||
19 | |||
20 | require udev.inc | ||
21 | |||
22 | INITSCRIPT_PARAMS = "start 03 S ." | ||
23 | |||
24 | FILES_${PN} += "${base_libdir}/udev/*" | ||
25 | FILES_${PN}-dbg += "${base_libdir}/udev/.debug" | ||
26 | UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/" | ||
27 | EXTRA_OEMAKE += "libudevdir=/lib/udev libdir=${base_libdir} prefix=" | ||
28 | |||
29 | do_install () { | ||
30 | install -d ${D}${usrsbindir} \ | ||
31 | ${D}${sbindir} | ||
32 | oe_runmake 'DESTDIR=${D}' INSTALL=install install | ||
33 | install -d ${D}${sysconfdir}/init.d | ||
34 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev | ||
35 | |||
36 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
37 | |||
38 | install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/ | ||
39 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules | ||
40 | install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules | ||
41 | install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules | ||
42 | install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf | ||
43 | if [ "${UDEV_DEVFS_RULES}" = "1" ]; then | ||
44 | install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules | ||
45 | fi | ||
46 | |||
47 | install -d ${D}${sysconfdir}/udev/scripts/ | ||
48 | |||
49 | install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh | ||
50 | install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts | ||
51 | |||
52 | install -d ${D}${base_libdir}/udev/ | ||
53 | } | ||
54 | |||
55 | do_install_append_h2200() { | ||
56 | install -m 0644 ${WORKDIR}/50-hostap_cs.rules ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules | ||
57 | } | ||