diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-08-27 13:02:47 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-08-27 13:02:47 +0100 |
commit | ec1d4782715ec07890d73239a2d8afcd4c7d4ef9 (patch) | |
tree | caa3a3fe74a44d5c25c239fd83677e364687a1f1 /meta/packages | |
parent | c2a128ee2d0730b4d5dcb4a19264c38e9c5be69d (diff) | |
download | poky-ec1d4782715ec07890d73239a2d8afcd4c7d4ef9.tar.gz |
udev: Add 145
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages')
-rw-r--r-- | meta/packages/udev/udev-141/1 | 119 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/init | 60 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/local.rules | 31 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/noasmlinkage.patch | 48 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/permissions.rules | 131 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/run.rules | 14 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/udev.rules | 116 | ||||
-rw-r--r-- | meta/packages/udev/udev-145/unbreak.patch | 24 | ||||
-rw-r--r-- | meta/packages/udev/udev_145.bb | 67 |
9 files changed, 491 insertions, 119 deletions
diff --git a/meta/packages/udev/udev-141/1 b/meta/packages/udev/udev-141/1 deleted file mode 100644 index 87c8977347..0000000000 --- a/meta/packages/udev/udev-141/1 +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | # do not edit this file, it will be overwritten on update | ||
2 | |||
3 | SUBSYSTEM=="block", SYMLINK+="block/%M:%m" | ||
4 | SUBSYSTEM!="block", SYMLINK+="char/%M:%m" | ||
5 | |||
6 | KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660" | ||
7 | KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660" | ||
8 | KERNEL=="ptmx", GROUP="tty", MODE="0666" | ||
9 | KERNEL=="tty", GROUP="tty", MODE="0666" | ||
10 | KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" | ||
11 | KERNEL=="console", MODE="0600" | ||
12 | KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty" | ||
13 | |||
14 | # serial | ||
15 | KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" | ||
16 | KERNEL=="ppp", MODE="0600" | ||
17 | KERNEL=="mwave", NAME="modems/mwave", GROUP="dialout" | ||
18 | KERNEL=="hvc*|hvsi*", GROUP="dialout" | ||
19 | |||
20 | # mem | ||
21 | KERNEL=="null|zero|full|random|urandom", MODE="0666" | ||
22 | KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640" | ||
23 | |||
24 | # input | ||
25 | KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" | ||
26 | KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0640" | ||
27 | KERNEL=="js[0-9]*", NAME="input/%k", MODE="0644" | ||
28 | |||
29 | # video4linux | ||
30 | SUBSYSTEM=="video4linux", GROUP="video" | ||
31 | KERNEL=="vttuner*", GROUP="video" | ||
32 | KERNEL=="vtx*|vbi*", GROUP="video" | ||
33 | KERNEL=="winradio*", GROUP="video" | ||
34 | |||
35 | # graphics | ||
36 | KERNEL=="agpgart", MODE="0600", GROUP="video" | ||
37 | KERNEL=="card[0-9]*", NAME="dri/%k" | ||
38 | KERNEL=="pmu", GROUP="video" | ||
39 | KERNEL=="nvidia*|nvidiactl*", GROUP="video" | ||
40 | SUBSYSTEM=="graphics", GROUP="video" | ||
41 | SUBSYSTEM=="drm", GROUP="video" | ||
42 | |||
43 | # DVB (video) | ||
44 | SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video" | ||
45 | |||
46 | # Firewire | ||
47 | KERNEL=="dv1394-[0-9]*", NAME="dv1394/%n", GROUP="video" | ||
48 | KERNEL=="video1394-[0-9]*", NAME="video1394/%n", GROUP="video" | ||
49 | |||
50 | # libusb device nodes | ||
51 | SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664" | ||
52 | |||
53 | # printer | ||
54 | KERNEL=="parport[0-9]*", GROUP="lp" | ||
55 | SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" | ||
56 | SUBSYSTEM=="ppdev", GROUP="lp" | ||
57 | SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp" | ||
58 | KERNEL=="lp[0-9]*", GROUP="lp" | ||
59 | KERNEL=="irlpt[0-9]*", GROUP="lp" | ||
60 | |||
61 | # block | ||
62 | SUBSYSTEM=="block", GROUP="disk" | ||
63 | |||
64 | # floppy | ||
65 | KERNEL=="fd[0-9]", GROUP="floppy" | ||
66 | KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k" | ||
67 | KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions" | ||
68 | |||
69 | # cdrom | ||
70 | SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" | ||
71 | SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom" | ||
72 | SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" | ||
73 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom" | ||
74 | KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom" | ||
75 | |||
76 | # tape | ||
77 | KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape" | ||
78 | KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape" | ||
79 | SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" | ||
80 | |||
81 | # block-releated | ||
82 | KERNEL=="sch[0-9]*", GROUP="disk" | ||
83 | SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" | ||
84 | KERNEL=="pg[0-9]*", GROUP="disk" | ||
85 | KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" | ||
86 | KERNEL=="rawctl", NAME="raw/rawctl", GROUP="disk" | ||
87 | SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk" | ||
88 | SUBSYSTEM=="bsg", NAME="bsg/%k" | ||
89 | SUBSYSTEM=="aoe", NAME="etherd/%k", GROUP="disk", MODE="0220" | ||
90 | SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" | ||
91 | |||
92 | # network | ||
93 | KERNEL=="tun", NAME="net/%k", MODE="0666" | ||
94 | |||
95 | # CPU | ||
96 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", MODE="0444" | ||
97 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" | ||
98 | KERNEL=="microcode", NAME="cpu/microcode", MODE="0600" | ||
99 | |||
100 | # miscellaneous | ||
101 | KERNEL=="fuse", MODE="0666" | ||
102 | SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc" | ||
103 | KERNEL=="auer[0-9]*", NAME="usb/%k" | ||
104 | KERNEL=="hw_random", NAME="hwrng" | ||
105 | KERNEL=="mmtimer", MODE="0644" | ||
106 | KERNEL=="rflash[0-9]*", MODE="0400" | ||
107 | KERNEL=="rrom[0-9]*", MODE="0400" | ||
108 | KERNEL=="sxctl", NAME="specialix_sxctl" | ||
109 | KERNEL=="rioctl", NAME="specialix_rioctl" | ||
110 | KERNEL=="iowarrior[0-9]*", NAME="usb/%k" | ||
111 | KERNEL=="hiddev[0-9]*", NAME="usb/%k" | ||
112 | KERNEL=="legousbtower[0-9]*", NAME="usb/%k" | ||
113 | KERNEL=="dabusb[0-9]*", NAME="usb/%k" | ||
114 | KERNEL=="usbdpfp[0-9]*", NAME="usb/%k" | ||
115 | KERNEL=="cpad[0-9]*", NAME="usb/%k" | ||
116 | |||
117 | # do not delete static device nodes | ||
118 | ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" | ||
119 | ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove" | ||
diff --git a/meta/packages/udev/udev-145/init b/meta/packages/udev/udev-145/init new file mode 100644 index 0000000000..f38a0aa36e --- /dev/null +++ b/meta/packages/udev/udev-145/init | |||
@@ -0,0 +1,60 @@ | |||
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 1777 /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 | (cd /; tar cf /etc/dev.tar /dev) | ||
57 | fi | ||
58 | |||
59 | echo | ||
60 | exit 0 | ||
diff --git a/meta/packages/udev/udev-145/local.rules b/meta/packages/udev/udev-145/local.rules new file mode 100644 index 0000000000..5b926018f5 --- /dev/null +++ b/meta/packages/udev/udev-145/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-145/noasmlinkage.patch b/meta/packages/udev/udev-145/noasmlinkage.patch new file mode 100644 index 0000000000..6f9fe948f2 --- /dev/null +++ b/meta/packages/udev/udev-145/noasmlinkage.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | Index: udev-141/udev/test-udev.c | ||
2 | =================================================================== | ||
3 | --- udev-141.orig/udev/test-udev.c 2008-10-24 09:07:24.000000000 +0100 | ||
4 | +++ udev-141/udev/test-udev.c 2009-04-14 15:34:01.000000000 +0100 | ||
5 | @@ -30,7 +30,7 @@ | ||
6 | |||
7 | #include "udev.h" | ||
8 | |||
9 | -static void asmlinkage sig_handler(int signum) | ||
10 | +static void sig_handler(int signum) | ||
11 | { | ||
12 | switch (signum) { | ||
13 | case SIGALRM: | ||
14 | Index: udev-141/udev/udevadm-monitor.c | ||
15 | =================================================================== | ||
16 | --- udev-141.orig/udev/udevadm-monitor.c 2009-03-29 19:07:01.000000000 +0100 | ||
17 | +++ udev-141/udev/udevadm-monitor.c 2009-04-14 15:34:01.000000000 +0100 | ||
18 | @@ -35,7 +35,7 @@ | ||
19 | |||
20 | static int udev_exit; | ||
21 | |||
22 | -static void asmlinkage sig_handler(int signum) | ||
23 | +static void sig_handler(int signum) | ||
24 | { | ||
25 | if (signum == SIGINT || signum == SIGTERM) | ||
26 | udev_exit = 1; | ||
27 | Index: udev-141/udev/udevd.c | ||
28 | =================================================================== | ||
29 | --- udev-141.orig/udev/udevd.c 2009-03-29 19:07:01.000000000 +0100 | ||
30 | +++ udev-141/udev/udevd.c 2009-04-14 15:34:56.000000000 +0100 | ||
31 | @@ -172,7 +172,7 @@ | ||
32 | udev_event_unref(event); | ||
33 | } | ||
34 | |||
35 | -static void asmlinkage event_sig_handler(int signum) | ||
36 | +static void event_sig_handler(int signum) | ||
37 | { | ||
38 | if (signum == SIGALRM) | ||
39 | exit(1); | ||
40 | @@ -583,7 +583,7 @@ | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | -static void asmlinkage sig_handler(int signum) | ||
45 | +static void sig_handler(int signum) | ||
46 | { | ||
47 | switch (signum) { | ||
48 | case SIGINT: | ||
diff --git a/meta/packages/udev/udev-145/permissions.rules b/meta/packages/udev/udev-145/permissions.rules new file mode 100644 index 0000000000..205b733292 --- /dev/null +++ b/meta/packages/udev/udev-145/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/packages/udev/udev-145/run.rules b/meta/packages/udev/udev-145/run.rules new file mode 100644 index 0000000000..75d71375bb --- /dev/null +++ b/meta/packages/udev/udev-145/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/packages/udev/udev-145/udev.rules b/meta/packages/udev/udev-145/udev.rules new file mode 100644 index 0000000000..a19d4a0bf6 --- /dev/null +++ b/meta/packages/udev/udev-145/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/packages/udev/udev-145/unbreak.patch b/meta/packages/udev/udev-145/unbreak.patch new file mode 100644 index 0000000000..bb5988dca4 --- /dev/null +++ b/meta/packages/udev/udev-145/unbreak.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Index: udev-141/extras/volume_id/lib/Makefile.am | ||
2 | =================================================================== | ||
3 | --- udev-141.orig/extras/volume_id/lib/Makefile.am 2009-05-17 23:36:16.000000000 +0100 | ||
4 | +++ udev-141/extras/volume_id/lib/Makefile.am 2009-05-17 23:36:26.000000000 +0100 | ||
5 | @@ -54,19 +54,6 @@ | ||
6 | -version-info $(VOLID_LT_CURRENT):$(VOLID_LT_REVISION):$(VOLID_LT_AGE) \ | ||
7 | -export-symbols $(top_srcdir)/extras/volume_id/lib/exported_symbols | ||
8 | |||
9 | -# move devel files to $(prefix)$(libdir_name) if needed | ||
10 | -install-data-hook: | ||
11 | - rm $(DESTDIR)$(rootlibdir)/libvolume_id.la | ||
12 | - if test "$(prefix)" != "$(exec_prefix)"; then \ | ||
13 | - mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \ | ||
14 | - mv $(DESTDIR)$(rootlibdir)/libvolume_id.a $(DESTDIR)$(prefix)/$(libdir_name)/; \ | ||
15 | - so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libvolume_id.so); \ | ||
16 | - rm $(DESTDIR)$(rootlibdir)/libvolume_id.so; \ | ||
17 | - so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ | ||
18 | - ln -sf $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \ | ||
19 | - $(DESTDIR)$(prefix)/$(libdir_name)/libvolume_id.so; \ | ||
20 | - fi | ||
21 | - | ||
22 | EXTRA_DIST = \ | ||
23 | exported_symbols | ||
24 | |||
diff --git a/meta/packages/udev/udev_145.bb b/meta/packages/udev/udev_145.bb new file mode 100644 index 0000000000..8db92b8206 --- /dev/null +++ b/meta/packages/udev/udev_145.bb | |||
@@ -0,0 +1,67 @@ | |||
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 | PR = "r4" | ||
7 | |||
8 | SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ | ||
9 | file://run.rules \ | ||
10 | " | ||
11 | |||
12 | SRC_URI_append_h2200 = " file://50-hostap_cs.rules " | ||
13 | PACKAGE_ARCH_h2200 = "h2200" | ||
14 | |||
15 | require udev.inc | ||
16 | |||
17 | INITSCRIPT_PARAMS = "start 03 S ." | ||
18 | |||
19 | FILES_${PN} += "${base_libdir}/udev/*" | ||
20 | FILES_${PN}-dbg += "${base_libdir}/udev/.debug" | ||
21 | UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/" | ||
22 | #EXTRA_OEMAKE += "libudevdir=/lib/udev libdir=${base_libdir} prefix=" | ||
23 | |||
24 | exec_prefix = "" | ||
25 | |||
26 | EXTRA_OECONF = "--with-udev-prefix= --disable-extras" | ||
27 | |||
28 | do_install () { | ||
29 | install -d ${D}${usrsbindir} \ | ||
30 | ${D}${sbindir} | ||
31 | oe_runmake 'DESTDIR=${D}' INSTALL=install install | ||
32 | install -d ${D}${sysconfdir}/init.d | ||
33 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev | ||
34 | |||
35 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
36 | |||
37 | cp ${S}/rules/rules.d/* ${D}${sysconfdir}/udev/rules.d/ | ||
38 | cp ${S}/rules/packages/* ${D}${sysconfdir}/udev/rules.d/ | ||
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}/run.rules ${D}${sysconfdir}/udev/rules.d/run.rules | ||
42 | #install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules | ||
43 | install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf | ||
44 | #if [ "${UDEV_DEVFS_RULES}" = "1" ]; then | ||
45 | # install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules | ||
46 | #fi | ||
47 | |||
48 | # Remove some default rules that don't work well on embedded devices | ||
49 | #rm ${D}${sysconfdir}/udev/rules.d/60-persistent-input.rules | ||
50 | #rm ${D}${sysconfdir}/udev/rules.d/60-persistent-storage.rules | ||
51 | #rm ${D}${sysconfdir}/udev/rules.d/60-persistent-storage-tape.rules | ||
52 | |||
53 | install -d ${D}${sysconfdir}/udev/scripts/ | ||
54 | |||
55 | install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh | ||
56 | install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts | ||
57 | |||
58 | install -d ${D}${base_libdir}/udev/ | ||
59 | } | ||
60 | |||
61 | do_install_append_h2200() { | ||
62 | install -m 0644 ${WORKDIR}/50-hostap_cs.rules ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules | ||
63 | } | ||
64 | |||
65 | do_stage () { | ||
66 | autotools_stage_all | ||
67 | } \ No newline at end of file | ||