From: Michael Mrozek Date: Fri, 27 Apr 2012 00:24:38 +0000 (+0200) Subject: pandora-usbhost.bb: New Startup daemon to enable USB Host on boot X-Git-Tag: sz_beta4~9 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=d0c9c4d245868a7b65196a8ca5256192bfd1311d pandora-usbhost.bb: New Startup daemon to enable USB Host on boot --- diff --git a/recipes/pandora-system/pandora-usbhost.bb b/recipes/pandora-system/pandora-usbhost.bb new file mode 100644 index 0000000..1a06579 --- /dev/null +++ b/recipes/pandora-system/pandora-usbhost.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Startup service for USB Host" +LICENSE = "GPLV2" + +COMPATIBLE_MACHINE = "omap3-pandora" + +PR = "r1" + +SRC_URI = " \ + file://rc.usbhost \ +" + +do_install() { + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/rc.usbhost ${D}${sysconfdir}/init.d/usbhost +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} += "${prefix} ${datadir}" diff --git a/recipes/pandora-system/pandora-usbhost/rc.usbhost b/recipes/pandora-system/pandora-usbhost/rc.usbhost new file mode 100644 index 0000000..2783ecc --- /dev/null +++ b/recipes/pandora-system/pandora-usbhost/rc.usbhost @@ -0,0 +1,39 @@ +#!/bin/sh +DESC="USB HOST" +NAME="EHCI Driver" + +d_stop() { + if `grep -q ehci_hcd /proc/modules` ; then + rmmod ehci_hcd 2> /dev/null + fi +} + +d_start() { + modprobe ehci-hcd + } + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + d_start & + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + d_stop + echo "." + ;; + restart|force-reload) + echo -n "Restarting $DESC: $NAME" + d_stop + sleep 1 + d_start + echo "." + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0