diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
| commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
| tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-bsp/usbinit | |
| parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
| download | poky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz | |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-bsp/usbinit')
| -rw-r--r-- | meta/recipes-bsp/usbinit/usbinit.bb | 18 | ||||
| -rwxr-xr-x | meta/recipes-bsp/usbinit/usbinit/usb-gether | 23 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-bsp/usbinit/usbinit.bb b/meta/recipes-bsp/usbinit/usbinit.bb new file mode 100644 index 0000000000..1d4575bddb --- /dev/null +++ b/meta/recipes-bsp/usbinit/usbinit.bb | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | DESCRIPTION = "Initscript to manage gadget Ethernet" | ||
| 2 | LICENSE = "GPL" | ||
| 3 | PRIORITY = "optional" | ||
| 4 | PR = "r1" | ||
| 5 | |||
| 6 | SRC_URI = "file://usb-gether" | ||
| 7 | S = "${WORKDIR}" | ||
| 8 | |||
| 9 | do_install() { | ||
| 10 | install -d ${D}/etc | ||
| 11 | install -d ${D}/etc/init.d | ||
| 12 | install usb-gether ${D}/etc/init.d | ||
| 13 | } | ||
| 14 | |||
| 15 | inherit update-rc.d | ||
| 16 | |||
| 17 | INITSCRIPT_NAME = "usb-gether" | ||
| 18 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." | ||
diff --git a/meta/recipes-bsp/usbinit/usbinit/usb-gether b/meta/recipes-bsp/usbinit/usbinit/usb-gether new file mode 100755 index 0000000000..e80a0bb30e --- /dev/null +++ b/meta/recipes-bsp/usbinit/usbinit/usb-gether | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 3 | # usb-ether Start up the gadget usb ethernet interface. | ||
| 4 | # | ||
| 5 | |||
| 6 | case "$1" in | ||
| 7 | start|"") | ||
| 8 | test "$VERBOSE" != no && echo "Initializing g_ether gadget..." | ||
| 9 | modprobe g_ether | ||
| 10 | ifup usb0 | ||
| 11 | ;; | ||
| 12 | stop) | ||
| 13 | test "$VERBOSE" != no && echo "Disabling g_ether..." | ||
| 14 | ifdown usb0 | ||
| 15 | rmmod g_ether | ||
| 16 | ;; | ||
| 17 | *) | ||
| 18 | echo "Usage: usb-ether {start|stop}" >&2 | ||
| 19 | exit 1 | ||
| 20 | ;; | ||
| 21 | esac | ||
| 22 | |||
| 23 | exit 0 | ||
