udev 151: move rules
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 19 Jul 2013 20:40:33 +0000 (23:40 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 19 Jul 2013 20:43:31 +0000 (23:43 +0300)
it turns out overriding RUN was a bad idea because non-modprobe
(socket creation) rules were lost too

recipes/udev/udev-151/omap3-pandora/80-drivers.rules [new file with mode: 0644]
recipes/udev/udev-151/omap3-pandora/local.rules
recipes/udev/udev_151.bb

diff --git a/recipes/udev/udev-151/omap3-pandora/80-drivers.rules b/recipes/udev/udev-151/omap3-pandora/80-drivers.rules
new file mode 100644 (file)
index 0000000..8dc8d9c
--- /dev/null
@@ -0,0 +1,26 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add", GOTO="drivers_end"
+
+# Pandora hack:
+# On later kernels we have lots of modules and running modprobe becomes
+# expensive and slows boot a lot.
+# Prevent it from being run for stuff we know is compiled in
+# pandora's kernel or is not needed in general
+ACTION=="add", ENV{MODALIAS}=="platform:*" GOTO="drivers_end"
+ACTION=="add", ENV{MODALIAS}=="mmc:block" GOTO="drivers_end"
+ACTION=="add", ENV{MODALIAS}=="sdio:c00v104Cd9066" GOTO="drivers_end"
+ACTION=="add", DEVPATH=="*twl4030_keypad*" GOTO="drivers_end"
+ACTION=="add", DEVPATH=="*twl4030_pwrbutton*" GOTO="drivers_end"
+ACTION=="add", DEVPATH=="*gpio-keys*" GOTO="drivers_end"
+ACTION=="add", DEVPATH=="*/i2c-3/3-006[67]*" GOTO="drivers_end"
+
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -b $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -b tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe -b tifm_ms"
+SUBSYSTEM=="memstick", RUN+="/sbin/modprobe -b --all ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN+="/sbin/modprobe -b i2o_block"
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -b sg"
+SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe -b ppdev"
+
+LABEL="drivers_end"
index 2c597eb..b867408 100644 (file)
@@ -47,15 +47,3 @@ KERNEL=="uinput",            NAME="input/%k", MODE="0666"
 
 # reserve fb2 for the system
 KERNEL=="fb2", ACTION=="add",  MODE="0600"
-
-# On later kernels we have lots of modules and running modprobe becomes
-# expensive and slows boot a lot.
-# Prevent it from being run for stuff we know is compiled in
-# pandora's kernel or is not needed in general
-ACTION=="add", ENV{MODALIAS}=="platform:*" RUN="/bin/true"
-ACTION=="add", ENV{MODALIAS}=="mmc:block" RUN="/bin/true"
-ACTION=="add", ENV{MODALIAS}=="sdio:c00v104Cd9066" RUN="/bin/true"
-ACTION=="add", DEVPATH=="*twl4030_keypad*" RUN="/bin/true"
-ACTION=="add", DEVPATH=="*twl4030_pwrbutton*" RUN="/bin/true"
-ACTION=="add", DEVPATH=="*gpio-keys*" RUN="/bin/true"
-ACTION=="add", DEVPATH=="*/i2c-3/3-006[67]*" RUN="/bin/true"
index c8d7cfc..9d0ee10 100644 (file)
@@ -3,7 +3,7 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod
 the hotplug package and requires a kernel not older than 2.6.12."
 LICENSE = "GPLv2+"
 
-PR = "r22"
+PR = "r23"
 
 # Untested
 DEFAULT_PREFERENCE = "-1"
@@ -26,6 +26,7 @@ SRC_URI += " \
        file://mount.sh \
        file://network.sh \
        file://local.rules \
+       file://80-drivers.rules \
        file://default \
        file://init \
        file://cache \
@@ -90,6 +91,7 @@ do_install () {
 
        install -m 0644 ${WORKDIR}/mount.blacklist     ${D}${sysconfdir}/udev/
        install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
+       install -m 0644 ${WORKDIR}/80-drivers.rules    ${D}${sysconfdir}/udev/rules.d/80-drivers.rules
        install -m 0644 ${WORKDIR}/permissions.rules   ${D}${sysconfdir}/udev/rules.d/permissions.rules
        install -m 0644 ${WORKDIR}/run.rules          ${D}${sysconfdir}/udev/rules.d/run.rules
        install -m 0644 ${WORKDIR}/udev.rules          ${D}${sysconfdir}/udev/rules.d/udev.rules