summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/udev/udev-extraconf/automount.rules19
-rw-r--r--meta/recipes-core/udev/udev-extraconf/autonet.rules19
-rw-r--r--meta/recipes-core/udev/udev-extraconf/localextra.rules21
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh (renamed from meta/recipes-core/udev/udev/mount.sh)3
-rw-r--r--meta/recipes-core/udev/udev-extraconf/network.sh (renamed from meta/recipes-core/udev/udev/network.sh)2
-rw-r--r--meta/recipes-core/udev/udev-extraconf_0.0.bb15
-rw-r--r--meta/recipes-core/udev/udev-extraconf_1.0.bb43
-rw-r--r--meta/recipes-core/udev/udev/local.rules14
8 files changed, 105 insertions, 31 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/automount.rules b/meta/recipes-core/udev/udev-extraconf/automount.rules
new file mode 100644
index 0000000000..7e844c31bd
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/automount.rules
@@ -0,0 +1,19 @@
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
diff --git a/meta/recipes-core/udev/udev-extraconf/autonet.rules b/meta/recipes-core/udev/udev-extraconf/autonet.rules
new file mode 100644
index 0000000000..19676aa13b
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/autonet.rules
@@ -0,0 +1,19 @@
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# Handle network interface setup
17SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
18SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
19
diff --git a/meta/recipes-core/udev/udev-extraconf/localextra.rules b/meta/recipes-core/udev/udev-extraconf/localextra.rules
new file mode 100644
index 0000000000..4eaa8ca9b0
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/localextra.rules
@@ -0,0 +1,21 @@
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# The first rtc device is symlinked to /dev/rtc
17KERNEL=="rtc0", SYMLINK+="rtc"
18
19#The first framebuffer is symlinked to /dev/fb
20KERNEL=="fb0", SYMLINK+="fb"
21
diff --git a/meta/recipes-core/udev/udev/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index c13b8bbb3b..2eb9affcc8 100644
--- a/meta/recipes-core/udev/udev/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -8,8 +8,7 @@
8MOUNT="/bin/mount" 8MOUNT="/bin/mount"
9PMOUNT="/usr/bin/pmount" 9PMOUNT="/usr/bin/pmount"
10UMOUNT="/bin/umount" 10UMOUNT="/bin/umount"
11 11for line in `grep -v ^# /etc/udev/mount.blacklist`
12for line in `cat /etc/udev/mount.blacklist`
13do 12do
14 if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ]; 13 if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
15 then 14 then
diff --git a/meta/recipes-core/udev/udev/network.sh b/meta/recipes-core/udev/udev-extraconf/network.sh
index bccd422dbf..3ee92714af 100644
--- a/meta/recipes-core/udev/udev/network.sh
+++ b/meta/recipes-core/udev/udev-extraconf/network.sh
@@ -3,6 +3,8 @@
3# We get two "add" events for hostap cards due to wifi0 3# We get two "add" events for hostap cards due to wifi0
4echo "$INTERFACE" | grep -q wifi && exit 0 4echo "$INTERFACE" | grep -q wifi && exit 0
5 5
6# udevd does clearenv(). Export shell PATH to children.
7export PATH
6 8
7# Check if /etc/init.d/network has been run yet to see if we are 9# Check if /etc/init.d/network has been run yet to see if we are
8# called by starting /etc/rcS.d/S03udev and not by hotplugging a device 10# called by starting /etc/rcS.d/S03udev and not by hotplugging a device
diff --git a/meta/recipes-core/udev/udev-extraconf_0.0.bb b/meta/recipes-core/udev/udev-extraconf_0.0.bb
deleted file mode 100644
index d0d0e84276..0000000000
--- a/meta/recipes-core/udev/udev-extraconf_0.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1SUMMARY = "Extra machine specific configuration files"
2DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6PR = "r2"
7
8SRC_URI = "file://mount.blacklist \
9 file://COPYING.GPL"
10
11do_install () {
12 install -d ${D}${sysconfdir}/udev/
13
14 install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
15}
diff --git a/meta/recipes-core/udev/udev-extraconf_1.0.bb b/meta/recipes-core/udev/udev-extraconf_1.0.bb
new file mode 100644
index 0000000000..ca079f132c
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf_1.0.bb
@@ -0,0 +1,43 @@
1SUMMARY = "Extra machine specific configuration files"
2DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6inherit allarch
7
8PR = "r5"
9
10SRC_URI = " \
11 file://automount.rules \
12 file://mount.sh \
13 file://mount.blacklist \
14 file://autonet.rules \
15 file://network.sh \
16 file://localextra.rules \
17 file://COPYING.GPL \
18"
19
20
21do_install() {
22 install -d ${D}${sysconfdir}/udev/rules.d
23
24 install -m 0644 ${WORKDIR}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules
25 install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules
26 install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules
27
28 install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
29
30 install -d ${D}${sysconfdir}/udev/scripts/
31
32 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
33 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
34}
35
36FILES_${PN} = "${sysconfdir}/udev"
37RDEPENDS_${PN} = "udev"
38CONFFILES_${PN} = "${sysconfdir}/udev/mount.blacklist"
39
40# to replace udev-extra-rules from meta-oe
41RPROVIDES_${PN} = "udev-extra-rules"
42RREPLACES_${PN} = "udev-extra-rules"
43RCONFLICTS_${PN} = "udev-extra-rules"
diff --git a/meta/recipes-core/udev/udev/local.rules b/meta/recipes-core/udev/udev/local.rules
index 625e49acb1..72d92ef627 100644
--- a/meta/recipes-core/udev/udev/local.rules
+++ b/meta/recipes-core/udev/udev/local.rules
@@ -13,20 +13,6 @@
13# %% the '%' char itself 13# %% the '%' char itself
14# 14#
15 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 framebuffer is symlinked to /dev/fb
25KERNEL=="fb0", SYMLINK+="fb"
26
27# The first rtc device is symlinked to /dev/rtc
28KERNEL=="rtc0", SYMLINK+="rtc"
29
30# Try and modprobe for drivers for new hardware 16# Try and modprobe for drivers for new hardware
31ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" 17ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
32 18