1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-05-06 19:39:17 +00:00

gadget-init: add in latest batch of workarounds

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Koen Kooi
2011-10-21 11:30:59 +02:00
parent 8380d36fe3
commit 45ec14197a
5 changed files with 22 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
DESCRIPTION = "Units to initialize usb gadgets"
PR = "r2"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
@@ -7,7 +9,8 @@ COMPATIBLE_MACHINE = "(ti33x)"
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() {
@@ -17,6 +20,13 @@ 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}"

View File

@@ -0,0 +1,2 @@
ACTION=="remove", DEVPATH=="/devices/platform/omap/ti81xx-usbss/musb-hdrc.1/usb1/1-1", RUN+="/usr/bin/hokey-pokey.sh"

View File

@@ -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

View File

@@ -0,0 +1,7 @@
#!/bin/sh
sleep 1
echo F > /proc/driver/musb_hdrc.1
sleep 1
echo F > /proc/driver/musb_hdrc.1

View File

@@ -3,6 +3,7 @@ Description=Start usb mass storage gadget
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]