diff options
-rw-r--r-- | recipes-core/usb-rndis/files/tegra124/start-rndis.sh | 17 |
1 files changed, 17 insertions, 0 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 |