diff options
| author | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-21 11:30:59 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-21 11:30:59 +0200 |
| commit | 45ec14197af8ca5b745207e6c7955c40ba18a54a (patch) | |
| tree | fe9a74a503048e583be7c70785141de125adc7f8 | |
| parent | 8380d36fe30c4ad824b00ba7f8c5fc5f70404db8 (diff) | |
| download | meta-ti-45ec14197af8ca5b745207e6c7955c40ba18a54a.tar.gz | |
gadget-init: add in latest batch of workarounds
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
5 files changed, 22 insertions, 11 deletions
diff --git a/recipes-ti/beagleboard/gadget-init.bb b/recipes-ti/beagleboard/gadget-init.bb index f3300e19..cedb9e82 100644 --- a/recipes-ti/beagleboard/gadget-init.bb +++ b/recipes-ti/beagleboard/gadget-init.bb | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | DESCRIPTION = "Units to initialize usb gadgets" | 1 | DESCRIPTION = "Units to initialize usb gadgets" |
| 2 | 2 | ||
| 3 | PR = "r2" | ||
| 4 | |||
| 3 | LICENSE = "MIT" | 5 | LICENSE = "MIT" |
| 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | 6 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" |
| 5 | 7 | ||
| @@ -7,7 +9,8 @@ COMPATIBLE_MACHINE = "(ti33x)" | |||
| 7 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 9 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 8 | 10 | ||
| 9 | SRC_URI = "file://storage-gadget-init.service \ | 11 | SRC_URI = "file://storage-gadget-init.service \ |
| 10 | file://hokey-pokey.service \ | 12 | file://99-hokey-pokey.rules \ |
| 13 | file://hokey-pokey.sh \ | ||
| 11 | " | 14 | " |
| 12 | 15 | ||
| 13 | do_install() { | 16 | do_install() { |
| @@ -17,6 +20,13 @@ do_install() { | |||
| 17 | install -m 0644 $i ${D}${base_libdir}/systemd/system | 20 | install -m 0644 $i ${D}${base_libdir}/systemd/system |
| 18 | ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/ | 21 | ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/ |
| 19 | done | 22 | done |
| 23 | |||
| 24 | install -d ${D}${sysconfdir}/udev/rules.d | ||
| 25 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d | ||
| 26 | |||
| 27 | install -d ${D}${bindir} | ||
| 28 | install -m 0755 ${WORKDIR}/*.sh ${D}${bindir} | ||
| 29 | |||
| 20 | } | 30 | } |
| 21 | 31 | ||
| 22 | FILES_${PN} = "${base_libdir}/systemd" | 32 | 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 new file mode 100644 index 00000000..bb3c8d34 --- /dev/null +++ b/recipes-ti/beagleboard/gadget-init/99-hokey-pokey.rules | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | ACTION=="remove", DEVPATH=="/devices/platform/omap/ti81xx-usbss/musb-hdrc.1/usb1/1-1", RUN+="/usr/bin/hokey-pokey.sh" | ||
| 2 | |||
diff --git a/recipes-ti/beagleboard/gadget-init/hokey-pokey.service b/recipes-ti/beagleboard/gadget-init/hokey-pokey.service deleted file mode 100644 index dfe06892..00000000 --- a/recipes-ti/beagleboard/gadget-init/hokey-pokey.service +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Hokey Pokey modprobe dance to get the USB host port working | ||
| 3 | After=storage-gadget-init.service | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | ExecStart=/sbin/modprobe g_zero | ||
| 7 | |||
| 8 | [Install] | ||
| 9 | WantedBy=basic.target | ||
diff --git a/recipes-ti/beagleboard/gadget-init/hokey-pokey.sh b/recipes-ti/beagleboard/gadget-init/hokey-pokey.sh new file mode 100755 index 00000000..2139eb02 --- /dev/null +++ b/recipes-ti/beagleboard/gadget-init/hokey-pokey.sh | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | sleep 1 | ||
| 4 | echo F > /proc/driver/musb_hdrc.1 | ||
| 5 | sleep 1 | ||
| 6 | echo F > /proc/driver/musb_hdrc.1 | ||
| 7 | |||
diff --git a/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service index 2fe48e15..764db62d 100644 --- a/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service +++ b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service | |||
| @@ -3,6 +3,7 @@ Description=Start usb mass storage gadget | |||
| 3 | After=dev-mmcblk0p1.device | 3 | After=dev-mmcblk0p1.device |
| 4 | 4 | ||
| 5 | [Service] | 5 | [Service] |
| 6 | ExecStartPre=/sbin/modprobe g_zero | ||
| 6 | ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 | 7 | ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 |
| 7 | 8 | ||
| 8 | [Install] | 9 | [Install] |
