summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-06-24 00:35:52 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2016-06-30 13:28:28 +0200
commit89b766bdc3a8d5e1cb132ea05531473b4e29ff6d (patch)
tree917ca451db3d7da5f6dcce4e3b7f9f08b4ef34ba
parent9fc430dbdd2b400ce8e2f25e016c0f45acbcadb3 (diff)
apalis-tk1: integrate usb-rndis
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--recipes-core/usb-rndis/files/tegra124/start-rndis.sh17
-rw-r--r--recipes/images/trdx-extra.inc2
2 files changed, 18 insertions, 1 deletions
diff --git a/recipes-core/usb-rndis/files/tegra124/start-rndis.sh b/recipes-core/usb-rndis/files/tegra124/start-rndis.sh
new file mode 100644
index 0000000..13efda3
--- /dev/null
+++ b/recipes-core/usb-rndis/files/tegra124/start-rndis.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# configures the usb gadget to provide rnidis,
+case "$1" in
+ start)
+ echo 0 > /sys/class/android_usb/android0/enable
+ echo rndis > /sys/class/android_usb/android0/functions
+ echo 1 > /sys/class/android_usb/android0/enable
+ ip link set rndis0 up
+ ;;
+
+ stop)
+ ip link set rndis0 down
+ echo 0 > /sys/class/android_usb/android0/enable
+ ;;
+esac
+
+exit 0
diff --git a/recipes/images/trdx-extra.inc b/recipes/images/trdx-extra.inc
index 84c41f9..3c38e4b 100644
--- a/recipes/images/trdx-extra.inc
+++ b/recipes/images/trdx-extra.inc
@@ -38,7 +38,6 @@ IMAGE_INSTALL_append_tegra3 = " \
nv-conf-systemd \
"
-#usb-rndis-systemd
IMAGE_INSTALL_append_tegra124 = " \
aspell \
canutils \
@@ -53,6 +52,7 @@ IMAGE_INSTALL_append_tegra124 = " \
ptpd \
tegrastats \
u-boot-toradex-fw-utils \
+ usb-rndis-systemd \
"
IMAGE_INSTALL_append_apalis-t30 = " \