summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-09-26 09:42:53 +0000
committerRichard Purdie <richard@openedhand.com>2006-09-26 09:42:53 +0000
commit361473f833c1623f83d6a56553d359d55f46fe9c (patch)
tree835bdffe4f8b1e3dc258f1b3d9ad11bda925788d /meta
parent675c8fc41c5736f92bb2a6085757145dcc3f2dfc (diff)
downloadpoky-361473f833c1623f83d6a56553d359d55f46fe9c.tar.gz
udev: Remove old unused versions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@759 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/udev/udev-084/flags.patch52
-rw-r--r--meta/packages/udev/udev-084/init227
-rw-r--r--meta/packages/udev/udev-084/local.rules28
-rw-r--r--meta/packages/udev/udev-084/udev.rules99
-rw-r--r--meta/packages/udev/udev-089/flags.patch51
-rw-r--r--meta/packages/udev/udev-089/init227
-rw-r--r--meta/packages/udev/udev-089/local.rules28
-rw-r--r--meta/packages/udev/udev-089/udev.rules98
-rw-r--r--meta/packages/udev/udev_084.bb60
-rw-r--r--meta/packages/udev/udev_089.bb49
10 files changed, 0 insertions, 919 deletions
diff --git a/meta/packages/udev/udev-084/flags.patch b/meta/packages/udev/udev-084/flags.patch
deleted file mode 100644
index f144a5f622..0000000000
--- a/meta/packages/udev/udev-084/flags.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1--- udev-081/Makefile.orig 2006-01-29 12:36:33.000000000 +0100
2+++ udev-081/Makefile 2006-01-29 12:36:58.000000000 +0100
3@@ -123,29 +123,29 @@
4 STRIP = $(CROSS)strip
5 STRIPCMD = $(STRIP) -s
6
7-CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
8+override CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
9 WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
10 -Wchar-subscripts -Wmissing-declarations -Wnested-externs \
11 -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes
12-CFLAGS += $(WARNINGS)
13+override CFLAGS += $(WARNINGS)
14
15 LDFLAGS = -Wl,-warn-common
16
17 OPTFLAGS = -Os
18-CFLAGS += $(OPTFLAGS)
19+override CFLAGS += $(OPTFLAGS)
20
21 ifeq ($(strip $(USE_LOG)),true)
22- CFLAGS += -DUSE_LOG
23+ override CFLAGS += -DUSE_LOG
24 endif
25
26 # if DEBUG is enabled, then we do not strip
27 ifeq ($(strip $(DEBUG)),true)
28- CFLAGS += -DDEBUG
29+ override CFLAGS += -DDEBUG
30 STRIPCMD =
31 endif
32
33 ifeq ($(strip $(USE_GCOV)),true)
34- CFLAGS += -fprofile-arcs -ftest-coverage
35+ override CFLAGS += -fprofile-arcs -ftest-coverage
36 LDFLAGS += -fprofile-arcs
37 endif
38
39@@ -160,11 +160,11 @@
40 ifeq ($(strip $(USE_SELINUX)),true)
41 UDEV_OBJS += udev_selinux.o
42 LIB_OBJS += -lselinux -lsepol
43- CFLAGS += -DUSE_SELINUX
44+ override CFLAGS += -DUSE_SELINUX
45 endif
46
47 ifeq ($(strip $(USE_STATIC)),true)
48- CFLAGS += -DUSE_STATIC
49+ override CFLAGS += -DUSE_STATIC
50 LDFLAGS += -static
51 endif
52
diff --git a/meta/packages/udev/udev-084/init b/meta/packages/udev/udev-084/init
deleted file mode 100644
index 5a60d52a9a..0000000000
--- a/meta/packages/udev/udev-084/init
+++ /dev/null
@@ -1,227 +0,0 @@
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
12unmount_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
23mount_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
57make_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
75supported_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
83set_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
91my_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
97warn_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
117PATH="/sbin:/bin:/usr/bin"
118
119[ -x /sbin/udevd ] || exit 0
120
121# defaults
122tmpfs_size="10M"
123udev_root="/dev"
124udevd_timeout=30
125
126. /etc/udev/udev.conf
127
128if ! supported_kernel; then
129 echo "udev requires a kernel >= 2.6.12, not started."
130 exit 1
131fi
132
133if [ ! -e /proc/filesystems ]; then
134 echo "udev requires a mounted procfs, not started."
135 exit 1
136fi
137
138if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
139 echo "udev requires tmpfs support, not started."
140 exit 1
141fi
142
143if [ ! -d /sys/class/ ]; then
144 echo "udev requires a mounted sysfs, not started."
145 exit 1
146fi
147
148if [ ! -e /proc/sys/kernel/hotplug ]; then
149 echo "udev requires hotplug support, not started."
150 exit 1
151fi
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
159case "$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 udevsynthesize
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 ;;
224esac
225
226exit 0
227
diff --git a/meta/packages/udev/udev-084/local.rules b/meta/packages/udev/udev-084/local.rules
deleted file mode 100644
index bb8459ba23..0000000000
--- a/meta/packages/udev/udev-084/local.rules
+++ /dev/null
@@ -1,28 +0,0 @@
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
17SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
18SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
19
20# Handle network interface setup
21SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
22SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
23
24# The first rtc device is symlinked to /dev/rtc
25KERNEL="rtc0", SYMLINK="rtc"
26
27# Try and modprobe for drivers for new hardware
28ACTION="add", DEVPATH="/devices/*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias"
diff --git a/meta/packages/udev/udev-084/udev.rules b/meta/packages/udev/udev-084/udev.rules
deleted file mode 100644
index 3ac51b301a..0000000000
--- a/meta/packages/udev/udev-084/udev.rules
+++ /dev/null
@@ -1,99 +0,0 @@
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
17BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
18SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
19
20# USB devices
21BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
22BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
23BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
24BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
25BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
26BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
27BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
28 SYMLINK+="pilot"
29
30# usbfs-like devices
31SUBSYSTEM=="usb_device", \
32 PROGRAM="/bin/sh -c 'export X=%k; export X=$${X#usbdev}; export B=$${X%%%%.*}; export D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"
33
34# serial devices
35KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
36KERNEL=="capi[0-9]*", NAME="capi/%n"
37
38# video devices
39KERNEL=="card[0-9]*", NAME="dri/%k"
40
41# misc devices
42KERNEL=="hw_random", NAME="hwrng"
43KERNEL=="tun", NAME="net/%k"
44
45KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
46KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
47KERNEL=="pktcdvd", NAME="pktcdvd/control"
48
49KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
50KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
51KERNEL=="microcode", NAME="cpu/microcode"
52
53KERNEL=="umad*", NAME="infiniband/%k"
54KERNEL=="issm*", NAME="infiniband/%k"
55KERNEL=="uverbs*", NAME="infiniband/%k"
56KERNEL=="ucm", NAME="infiniband/%k"
57
58KERNEL=="buzzer", NAME="misc/buzzer"
59
60# ALSA devices
61KERNEL=="controlC[0-9]*", NAME="snd/%k"
62KERNEL=="hwC[D0-9]*", NAME="snd/%k"
63KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
64KERNEL=="midiC[D0-9]*", NAME="snd/%k"
65KERNEL=="timer", NAME="snd/%k"
66KERNEL=="seq", NAME="snd/%k"
67
68# ieee1394 devices
69KERNEL=="dv1394*", NAME="dv1394/%n"
70KERNEL=="video1394*", NAME="video1394/%n"
71
72# input devices
73KERNEL=="mice", NAME="input/%k"
74KERNEL=="mouse[0-9]*", NAME="input/%k"
75KERNEL=="event[0-9]*", NAME="input/%k"
76KERNEL=="js[0-9]*", NAME="input/%k"
77KERNEL=="ts[0-9]*", NAME="input/%k"
78KERNEL=="uinput", NAME="input/%k"
79
80# Zaptel
81KERNEL=="zapctl", NAME="zap/ctl"
82KERNEL=="zaptimer", NAME="zap/timer"
83KERNEL=="zapchannel", NAME="zap/channel"
84KERNEL=="zappseudo", NAME="zap/pseudo"
85KERNEL=="zap[0-9]*", NAME="zap/%n"
86
87# AOE character devices
88SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
89SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
90SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
91
92# device mapper creates its own device nodes, so ignore these
93KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
94KERNEL=="device-mapper", NAME="mapper/control"
95
96KERNEL="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660"
97
98# Firmware Helper
99ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware_helper"
diff --git a/meta/packages/udev/udev-089/flags.patch b/meta/packages/udev/udev-089/flags.patch
deleted file mode 100644
index 492a39881c..0000000000
--- a/meta/packages/udev/udev-089/flags.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1--- udev-089/Makefile.orig 2006-04-08 13:32:53.000000000 +0200
2+++ udev-089/Makefile 2006-04-08 13:34:27.000000000 +0200
3@@ -117,28 +117,28 @@
4 AR = $(CROSS_COMPILE)ar
5 RANLIB = $(CROSS_COMPILE)ranlib
6
7-CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
8+override CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
9 WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
10 -Wchar-subscripts -Wmissing-declarations -Wnested-externs \
11 -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes
12-CFLAGS += $(WARNINGS)
13+override CFLAGS += $(WARNINGS)
14
15 LDFLAGS = -Wl,-warn-common
16
17 OPTFLAGS = -Os
18-CFLAGS += $(OPTFLAGS)
19+override CFLAGS += $(OPTFLAGS)
20
21 ifeq ($(strip $(USE_LOG)),true)
22- CFLAGS += -DUSE_LOG
23+ override CFLAGS += -DUSE_LOG
24 endif
25
26 # if DEBUG is enabled, then we do not strip
27 ifeq ($(strip $(DEBUG)),true)
28- CFLAGS += -DDEBUG
29+ override CFLAGS += -DDEBUG
30 endif
31
32 ifeq ($(strip $(USE_GCOV)),true)
33- CFLAGS += -fprofile-arcs -ftest-coverage
34+ override CFLAGS += -fprofile-arcs -ftest-coverage
35 LDFLAGS += -fprofile-arcs
36 endif
37
38@@ -151,11 +151,11 @@
39 ifeq ($(strip $(USE_SELINUX)),true)
40 UDEV_OBJS += udev_selinux.o
41 LIB_OBJS += -lselinux -lsepol
42- CFLAGS += -DUSE_SELINUX
43+ override CFLAGS += -DUSE_SELINUX
44 endif
45
46 ifeq ($(strip $(USE_STATIC)),true)
47- CFLAGS += -DUSE_STATIC
48+ override CFLAGS += -DUSE_STATIC
49 LDFLAGS += -static
50 endif
51
diff --git a/meta/packages/udev/udev-089/init b/meta/packages/udev/udev-089/init
deleted file mode 100644
index 5a60d52a9a..0000000000
--- a/meta/packages/udev/udev-089/init
+++ /dev/null
@@ -1,227 +0,0 @@
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
12unmount_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
23mount_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
57make_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
75supported_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
83set_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
91my_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
97warn_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
117PATH="/sbin:/bin:/usr/bin"
118
119[ -x /sbin/udevd ] || exit 0
120
121# defaults
122tmpfs_size="10M"
123udev_root="/dev"
124udevd_timeout=30
125
126. /etc/udev/udev.conf
127
128if ! supported_kernel; then
129 echo "udev requires a kernel >= 2.6.12, not started."
130 exit 1
131fi
132
133if [ ! -e /proc/filesystems ]; then
134 echo "udev requires a mounted procfs, not started."
135 exit 1
136fi
137
138if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
139 echo "udev requires tmpfs support, not started."
140 exit 1
141fi
142
143if [ ! -d /sys/class/ ]; then
144 echo "udev requires a mounted sysfs, not started."
145 exit 1
146fi
147
148if [ ! -e /proc/sys/kernel/hotplug ]; then
149 echo "udev requires hotplug support, not started."
150 exit 1
151fi
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
159case "$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 udevsynthesize
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 ;;
224esac
225
226exit 0
227
diff --git a/meta/packages/udev/udev-089/local.rules b/meta/packages/udev/udev-089/local.rules
deleted file mode 100644
index bb8459ba23..0000000000
--- a/meta/packages/udev/udev-089/local.rules
+++ /dev/null
@@ -1,28 +0,0 @@
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
17SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
18SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
19
20# Handle network interface setup
21SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
22SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
23
24# The first rtc device is symlinked to /dev/rtc
25KERNEL="rtc0", SYMLINK="rtc"
26
27# Try and modprobe for drivers for new hardware
28ACTION="add", DEVPATH="/devices/*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias"
diff --git a/meta/packages/udev/udev-089/udev.rules b/meta/packages/udev/udev-089/udev.rules
deleted file mode 100644
index 7b4152c5bf..0000000000
--- a/meta/packages/udev/udev-089/udev.rules
+++ /dev/null
@@ -1,98 +0,0 @@
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
17BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
18
19# USB devices
20BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
21BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
22BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
23BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
24BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
25BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
26BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
27 SYMLINK+="pilot"
28
29# usbfs-like devices
30SUBSYSTEM=="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
34KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
35KERNEL=="capi[0-9]*", NAME="capi/%n"
36
37# video devices
38KERNEL=="card[0-9]*", NAME="dri/%k"
39
40# misc devices
41KERNEL=="hw_random", NAME="hwrng"
42KERNEL=="tun", NAME="net/%k"
43
44KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
45KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
46KERNEL=="pktcdvd", NAME="pktcdvd/control"
47
48KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
49KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
50KERNEL=="microcode", NAME="cpu/microcode"
51
52KERNEL=="umad*", NAME="infiniband/%k"
53KERNEL=="issm*", NAME="infiniband/%k"
54KERNEL=="uverbs*", NAME="infiniband/%k"
55KERNEL=="ucm", NAME="infiniband/%k"
56
57KERNEL=="buzzer", NAME="misc/buzzer"
58
59# ALSA devices
60KERNEL=="controlC[0-9]*", NAME="snd/%k"
61KERNEL=="hwC[D0-9]*", NAME="snd/%k"
62KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
63KERNEL=="midiC[D0-9]*", NAME="snd/%k"
64KERNEL=="timer", NAME="snd/%k"
65KERNEL=="seq", NAME="snd/%k"
66
67# ieee1394 devices
68KERNEL=="dv1394*", NAME="dv1394/%n"
69KERNEL=="video1394*", NAME="video1394/%n"
70
71# input devices
72KERNEL=="mice", NAME="input/%k"
73KERNEL=="mouse[0-9]*", NAME="input/%k"
74KERNEL=="event[0-9]*", NAME="input/%k"
75KERNEL=="js[0-9]*", NAME="input/%k"
76KERNEL=="ts[0-9]*", NAME="input/%k"
77KERNEL=="uinput", NAME="input/%k"
78
79# Zaptel
80KERNEL=="zapctl", NAME="zap/ctl"
81KERNEL=="zaptimer", NAME="zap/timer"
82KERNEL=="zapchannel", NAME="zap/channel"
83KERNEL=="zappseudo", NAME="zap/pseudo"
84KERNEL=="zap[0-9]*", NAME="zap/%n"
85
86# AOE character devices
87SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
88SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
89SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
90
91# device mapper creates its own device nodes, so ignore these
92KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
93KERNEL=="device-mapper", NAME="mapper/control"
94
95KERNEL="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660"
96
97# Firmware Helper
98ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware_helper"
diff --git a/meta/packages/udev/udev_084.bb b/meta/packages/udev/udev_084.bb
deleted file mode 100644
index 81a14eaf86..0000000000
--- a/meta/packages/udev/udev_084.bb
+++ /dev/null
@@ -1,60 +0,0 @@
1DESCRIPTION = "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 \
3the hotplug package and requires a kernel not older than 2.6.12."
4RPROVIDES = "hotplug"
5
6SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
7 file://noasmlinkage.patch;patch=1 \
8 file://flags.patch;patch=1 \
9 file://udevsynthesize.patch;patch=1 \
10 file://udevsynthesize.sh \
11 file://mount.blacklist \
12 file://udev_network_queue.sh"
13
14require udev.inc
15
16INITSCRIPT_PARAMS = "start 03 S ."
17
18PR = "r13"
19
20FILES_${PN} += "${base_libdir}"
21UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/ extras/run_directory/"
22EXTRA_OEMAKE += "libudevdir=/lib/udev"
23
24do_install () {
25 install -d ${D}${usrsbindir} \
26 ${D}${sbindir}
27 oe_runmake 'DESTDIR=${D}' INSTALL=install install
28 install -d ${D}${sysconfdir}/init.d
29 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
30 install -m 0755 ${WORKDIR}/udev_network_queue.sh ${D}${sysconfdir}/init.d/
31
32 install -d ${D}${sysconfdir}/udev/rules.d/
33
34 install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
35 install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
36 install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules
37 install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules
38 if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
39 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
40 fi
41
42 install -d ${D}${sysconfdir}/udev/scripts/
43
44 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
45 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
46
47 install -d ${D}${base_libdir}/udev/
48 install -m 0755 ${S}/udevsynthesize ${D}${base_libdir}/udev/udevsynthesize
49 install -m 0755 ${WORKDIR}/udevsynthesize.sh ${D}${sbindir}/udevsynthesize
50}
51
52
53pkg_postinst_append() {
54 update-rc.d -s udev_network_queue.sh start 41 S . start 55 0 6 .
55}
56
57
58pkg_postrm_append() {
59 update-rc.d -f udev_network_queue.sh remove
60}
diff --git a/meta/packages/udev/udev_089.bb b/meta/packages/udev/udev_089.bb
deleted file mode 100644
index d081cc8cc2..0000000000
--- a/meta/packages/udev/udev_089.bb
+++ /dev/null
@@ -1,49 +0,0 @@
1DESCRIPTION = "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 \
3the hotplug package and requires a kernel not older than 2.6.12."
4RPROVIDES = "hotplug"
5
6PR = "r2"
7
8SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
9 file://noasmlinkage.patch;patch=1 \
10 file://flags.patch;patch=1 \
11 file://udevsynthesize.patch;patch=1 \
12 file://udevsynthesize.sh \
13 file://mount.blacklist"
14
15require udev.inc
16
17INITSCRIPT_PARAMS = "start 03 S ."
18
19FILES_${PN} += "${base_libdir}"
20UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/ extras/run_directory/"
21EXTRA_OEMAKE += "libudevdir=/lib/udev"
22
23do_install () {
24 install -d ${D}${usrsbindir} \
25 ${D}${sbindir}
26 oe_runmake 'DESTDIR=${D}' INSTALL=install install
27 install -d ${D}${sysconfdir}/init.d
28 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
29
30 install -d ${D}${sysconfdir}/udev/rules.d/
31
32 install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
33 install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
34 install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.rules
35 install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules
36 install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf
37 if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
38 install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
39 fi
40
41 install -d ${D}${sysconfdir}/udev/scripts/
42
43 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
44 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
45
46 install -d ${D}${base_libdir}/udev/
47 install -m 0755 ${S}/udevsynthesize ${D}${base_libdir}/udev/udevsynthesize
48 install -m 0755 ${WORKDIR}/udevsynthesize.sh ${D}${sbindir}/udevsynthesize
49}