[oe-commits] Denis 'GNUtoo' Carikli : bug-udev: add support for bug1

git version control git at git.openembedded.org
Tue Jul 5 16:07:56 UTC 2011


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 99586e72058700db67eec1b83b00f1a050b0f374
URL:    http://git.openembedded.org/?p=openembedded.git&a=commit;h=99586e72058700db67eec1b83b00f1a050b0f374

Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date:   Mon Jul  4 23:38:42 2011 +0200

bug-udev: add support for bug1

10-mx31.rules and 30-BUG.rules were imported from the udev recipes
  directory( recipes/udev/udev/bug/ )

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>

---

 recipes/udev-rules-buglabs/bug-udev/10-mx31.rules |   49 +++++++++++++++++++++
 recipes/udev-rules-buglabs/bug-udev/30-BUG.rules  |   26 +++++++++++
 recipes/udev-rules-buglabs/bug-udev_0.1.bb        |   28 ++++++++----
 3 files changed, 93 insertions(+), 10 deletions(-)

diff --git a/recipes/udev-rules-buglabs/bug-udev/10-mx31.rules b/recipes/udev-rules-buglabs/bug-udev/10-mx31.rules
new file mode 100644
index 0000000..de427fc
--- /dev/null
+++ b/recipes/udev-rules-buglabs/bug-udev/10-mx31.rules
@@ -0,0 +1,49 @@
+KERNEL=="ttyS[0-9]",	NAME="tts/%n",		SYMLINK+="tts%n"
+KERNEL=="ttymxc[0-9]",	NAME="ttymxc/%n",	SYMLINK+="ttymxc%n"
+
+KERNEL=="mxc_mu[0-9]",	NAME="mxc_mu/%n",	SYMLINK+="mxc_mu%n"
+KERNEL=="fb*",		NAME="fb/%n",		SYMLINK+="fb%n"
+KERNEL=="i2c*",		NAME="i2c/%n"
+KERNEL=="mxc_ipc*",	NAME="mxc_ipc/%n"
+KERNEL=="video*",	NAME="v4l/video%n"
+
+KERNEL=="rtc",		NAME="misc/rtc"
+KERNEL=="watchdog",	NAME="misc/watchdog"
+
+KERNEL=="mc13783_adc",	NAME="mc13783_adc",	SYMLINK+="ts"
+KERNEL=="pmic_adc",	NAME="pmic_adc",	SYMLINK+="ts"
+
+# The long class name gets cut off to be mc13783_connectiv in 
+# /sys/class/mc13783_connectivity/mc13783_connectivit
+KERNEL=="mc13783_connectiv*",	NAME="mc13783_connectivity"
+
+KERNEL=="mxc_ssi[0-9]*",	NAME="mxc_ssi/%n",	SYMLINK+="mxc_ssi%n"
+KERNEL=="spi[0-9]*",	NAME="spi/%n",		SYMLINK+="spi%n"
+
+KERNEL=="mtdblock*",	NAME="mtdblock/%n"	SYMLINK+="mtdblock%n"
+KERNEL=="mtd[0-9]",	NAME="mtd/%n"
+
+# A more elegant way of doing this must exist...
+KERNEL=="mtd0ro",	NAME="mtd/0ro"
+KERNEL=="mtd1ro",	NAME="mtd/1ro"
+KERNEL=="mtd2ro",	NAME="mtd/2ro"
+KERNEL=="mtd3ro",	NAME="mtd/3ro"
+KERNEL=="mtd4ro",	NAME="mtd/4ro"
+KERNEL=="mtd5ro",	NAME="mtd/5ro"
+KERNEL=="mtd6ro",	NAME="mtd/6ro"
+KERNEL=="mtd7ro",	NAME="mtd/7ro"
+KERNEL=="mtd8ro",	NAME="mtd/8ro"
+KERNEL=="mtd9ro",	NAME="mtd/9ro"
+
+# Note that we want /dev/dsp linked to /dev/sound/dsp1...
+KERNEL=="dsp",		NAME="sound/dsp"
+KERNEL=="dspW",		NAME="sound/dspW"
+KERNEL=="dsp1",		NAME="sound/dsp1",	SYMLINK+="dsp"
+KERNEL=="mixer",		NAME="sound/mixer",	SYMLINK+="mixer"
+KERNEL=="sequencer",	NAME="sound/sequencer"
+KERNEL=="sequencer2",	NAME="sound/sequencer2"
+
+KERNEL=="ram[0-9]*",	NAME="ram/%n",		SYMLINK+="ram%n"
+
+KERNEL=="dvfs_dptc",	NAME="dvfs_dptc",	SYMLINK+="dptc dvfs"
+
diff --git a/recipes/udev-rules-buglabs/bug-udev/30-BUG.rules b/recipes/udev-rules-buglabs/bug-udev/30-BUG.rules
new file mode 100644
index 0000000..06faa6b
--- /dev/null
+++ b/recipes/udev-rules-buglabs/bug-udev/30-BUG.rules
@@ -0,0 +1,26 @@
+##
+## BUG/BMI specific
+##
+KERNEL=="event*", ATTRS{name}=="bugnav", SYMLINK+="input/bugnav"
+KERNEL=="event*", ATTRS{name}=="bmi_motion", SYMLINK+="input/bmi_motion"
+KERNEL=="event*", ATTRS{name}=="bug_cam", SYMLINK+="input/bmi_cam"
+KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m1", SYMLINK+="input/bmi_audio_m1"
+KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m2", SYMLINK+="input/bmi_audio_m2"
+KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m3", SYMLINK+="input/bmi_audio_m3"
+KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m4", SYMLINK+="input/bmi_audio_m4"
+DEVPATH=="/devices/platform/bugfb.0", SYMLINK+="bugfb"
+KERNEL=="rtc0", SYMLINK+="rtc"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts0", SYMLINK+="input/bmi_lcd_ts0"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts1", SYMLINK+="input/bmi_lcd_ts1"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts2", SYMLINK+="input/bmi_lcd_ts2"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts3", SYMLINK+="input/bmi_lcd_ts3"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts4", SYMLINK+="input/bmi_lcd_ts4"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts5", SYMLINK+="input/bmi_lcd_ts5"
+KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts6", SYMLINK+="input/bmi_lcd_ts6"
+ACTION=="add", DEVPATH=="/devices/conn*", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
+ACTION=="remove", DEVPATH=="/devices/conn*", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
+#
+# For USB PBPSD, which we've arbitrarily decided will be module F001
+#
+ACTION=="remove", SUBSYSTEM=="usb", DRIVERS=="psd_driver", ENV{BMIBUS_PRODUCT}="F001", ENV{BMIBUS_SLOT}="%n", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
+ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="psd_driver", ENV{BMIBUS_PRODUCT}="F001", ENV{BMIBUS_SLOT}="%n", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
diff --git a/recipes/udev-rules-buglabs/bug-udev_0.1.bb b/recipes/udev-rules-buglabs/bug-udev_0.1.bb
index 35db9e3..c25886c 100644
--- a/recipes/udev-rules-buglabs/bug-udev_0.1.bb
+++ b/recipes/udev-rules-buglabs/bug-udev_0.1.bb
@@ -3,16 +3,21 @@ LICENSE = "GPL"
 SECTION = "x11"
 PRIORITY = "optional"
 RDEPENDS_${PN} = "udev"
-PR = "r26"
+PR = "r27"
 
-SRC_URI = "file://00-bug20.rules \
-           file://bmi_eventpipe.sh \
-           file://bt_init.sh \
-           file://working.psr \
-           file://mbkb-stop.sh \
-           file://mbkb-start.sh \
-           file://wlan-trigger.sh \
-           "
+SRC_URI_bug20 = "file://00-bug20.rules \
+                 file://bmi_eventpipe.sh \
+                 file://bt_init.sh \
+                 file://working.psr \
+                 file://mbkb-stop.sh \
+                 file://mbkb-start.sh \
+                 file://wlan-trigger.sh \
+                "
+
+SRC_URI_bug = " file://30-BUG.rules \
+                file://10-mx31.rules \
+                file://bmi_eventpipe.sh \
+              "
 
 S = "${WORKDIR}"
 
@@ -23,5 +28,8 @@ do_install() {
     install -d ${D}/etc/udev/scripts
     install -m 0644 *.rules ${D}/etc/udev/rules.d
     install -m 0775 *.sh ${D}/etc/udev/scripts
+}
+
+do_install_append_bug20() {
     install -m 0644 working.psr ${D}/etc/udev/scripts/
-}    
+}





More information about the Openembedded-commits mailing list