summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2012-07-30 15:03:14 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-04 13:08:35 (GMT)
commit0cc01a67f1c0bf1bff491c9c644348d6be318a72 (patch)
tree2c090dc35a587707b0944162cd265a4c7574b4e9
parentc5003a45d9c54a7a6d1c78799b8c2e3962cf1e52 (diff)
downloadpoky-0cc01a67f1c0bf1bff491c9c644348d6be318a72.tar.gz
udev-extraconf: Merge with udev-extra-rules from meta-oe
* Move parts of local.rules from udev to udev-extraconf * Move mount.sh and network.sh to udev-extraconf along with rule fragments * Add mount.blacklist to CONFFILES * Change PV to 1.0 and bump PR to provide upgrade path from meta-oe's udev-extra-rules including RREPLACE/RPROVIDES/RCONFLICTS trio (From OE-Core rev: 0ca3a7823e97c4e4af6e89d852f98d29ed6193d7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 0000000..7e844c3
--- /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 0000000..19676aa
--- /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 0000000..4eaa8ca
--- /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 c13b8bb..2eb9aff 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 bccd422..3ee9271 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 d0d0e84..0000000
--- 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 0000000..ca079f1
--- /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 625e49a..72d92ef 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