diff options
Diffstat (limited to 'recipes/adbd/files')
| -rwxr-xr-x | recipes/adbd/files/adb-init | 2 | ||||
| -rw-r--r-- | recipes/adbd/files/raspberrypi/adb-init | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/recipes/adbd/files/adb-init b/recipes/adbd/files/adb-init index e88df23..6faed60 100755 --- a/recipes/adbd/files/adb-init +++ b/recipes/adbd/files/adb-init | |||
| @@ -8,7 +8,7 @@ SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth0/address) | |||
| 8 | 8 | ||
| 9 | case "$1" in | 9 | case "$1" in |
| 10 | start) | 10 | start) |
| 11 | insmod $(busybox find /lib/modules/$(uname -r) -name "g_ffs.ko") idVendor=${VENDOR} idProduct=${PRODUCT} iSerialNumber=${SERIAL} | 11 | modprobe g_ffs idVendor=${VENDOR} idProduct=${PRODUCT} iSerialNumber=${SERIAL} |
| 12 | mkdir -p /dev/usb-ffs | 12 | mkdir -p /dev/usb-ffs |
| 13 | chmod 770 /dev/usb-ffs | 13 | chmod 770 /dev/usb-ffs |
| 14 | mkdir -p /dev/usb-ffs/adb | 14 | mkdir -p /dev/usb-ffs/adb |
diff --git a/recipes/adbd/files/raspberrypi/adb-init b/recipes/adbd/files/raspberrypi/adb-init new file mode 100644 index 0000000..8910e0e --- /dev/null +++ b/recipes/adbd/files/raspberrypi/adb-init | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | DAEMON=/usr/bin/adbd | ||
| 4 | |||
| 5 | case "$1" in | ||
| 6 | start) | ||
| 7 | start-stop-daemon --start --quiet --exec $DAEMON & | ||
| 8 | ;; | ||
| 9 | stop) | ||
| 10 | start-stop-daemon --stop --quiet --exec $DAEMON | ||
| 11 | ;; | ||
| 12 | restart) | ||
| 13 | start-stop-daemon --stop --quiet --exec $DAEMON | ||
| 14 | sleep 1 | ||
| 15 | start-stop-daemon --start --quiet --exec $DAEMON & | ||
| 16 | ;; | ||
| 17 | *) | ||
| 18 | echo "Usage: $0 {start|stop|restart}" | ||
| 19 | exit 1 | ||
| 20 | esac | ||
| 21 | exit 0 | ||
