summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 = " \