summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8380d36)
raw | patch | inline | side by side (parent: 8380d36)
author | Koen Kooi <koen@dominion.thruhere.net> | |
Fri, 21 Oct 2011 09:30:59 +0000 (11:30 +0200) | ||
committer | Koen Kooi <koen@dominion.thruhere.net> | |
Fri, 21 Oct 2011 09:30:59 +0000 (11:30 +0200) |
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
recipes-ti/beagleboard/gadget-init.bb | patch | blob | history | |
recipes-ti/beagleboard/gadget-init/99-hokey-pokey.rules | [new file with mode: 0644] | patch | blob |
recipes-ti/beagleboard/gadget-init/hokey-pokey.service | [deleted file] | patch | blob | history |
recipes-ti/beagleboard/gadget-init/hokey-pokey.sh | [new file with mode: 0755] | patch | blob |
recipes-ti/beagleboard/gadget-init/storage-gadget-init.service | patch | blob | history |
index f3300e1903eee46a6046ea7e90f08bd35e5ae4fd..cedb9e82694d41569df92fd8e33837209ff48eab 100644 (file)
DESCRIPTION = "Units to initialize usb gadgets"
+PR = "r2"
+
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
PACKAGE_ARCH = "${MACHINE_ARCH}"
SRC_URI = "file://storage-gadget-init.service \
- file://hokey-pokey.service \
+ file://99-hokey-pokey.rules \
+ file://hokey-pokey.sh \
"
do_install() {
install -m 0644 $i ${D}${base_libdir}/systemd/system
ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/
done
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d
+
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/*.sh ${D}${bindir}
+
}
-FILES_${PN} = "${base_libdir}/systemd"
+FILES_${PN} = "${base_libdir}/systemd ${sysconfdir} ${bindir}"
diff --git a/recipes-ti/beagleboard/gadget-init/99-hokey-pokey.rules b/recipes-ti/beagleboard/gadget-init/99-hokey-pokey.rules
--- /dev/null
@@ -0,0 +1,2 @@
+ACTION=="remove", DEVPATH=="/devices/platform/omap/ti81xx-usbss/musb-hdrc.1/usb1/1-1", RUN+="/usr/bin/hokey-pokey.sh"
+
diff --git a/recipes-ti/beagleboard/gadget-init/hokey-pokey.service b/recipes-ti/beagleboard/gadget-init/hokey-pokey.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Hokey Pokey modprobe dance to get the USB host port working
-After=storage-gadget-init.service
-
-[Service]
-ExecStart=/sbin/modprobe g_zero
-
-[Install]
-WantedBy=basic.target
diff --git a/recipes-ti/beagleboard/gadget-init/hokey-pokey.sh b/recipes-ti/beagleboard/gadget-init/hokey-pokey.sh
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+sleep 1
+echo F > /proc/driver/musb_hdrc.1
+sleep 1
+echo F > /proc/driver/musb_hdrc.1
+
diff --git a/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service
index 2fe48e15ee71f6f6e3fa23892aa22ad2294f4933..764db62d7548eea105935f52aeef62c4f68405a6 100644 (file)
After=dev-mmcblk0p1.device
[Service]
+ExecStartPre=/sbin/modprobe g_zero
ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1
[Install]