use CDC-NCM instead of RNDIS
fix https://github.com/milk-v/milkv.io/issues/45 Signed-off-by: FUKAUMI Naoki <naoki@milkv.io>
This commit is contained in:
28
device/milkv-duo256m/overlay/mnt/system/usb-ncm.sh
Executable file
28
device/milkv-duo256m/overlay/mnt/system/usb-ncm.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
/etc/uhubon.sh device >> /tmp/ncm.log 2>&1
|
||||
/etc/run_usb.sh probe ncm >> /tmp/ncm.log 2>&1
|
||||
if test -e /usr/bin/burnd; then
|
||||
/etc/run_usb.sh probe acm >> /tmp/ncm.log 2>&1
|
||||
fi
|
||||
/etc/run_usb.sh start ncm >> /tmp/ncm.log 2>&1
|
||||
|
||||
sleep 0.5
|
||||
ifconfig usb0 192.168.42.1
|
||||
|
||||
count=`ps | grep dnsmasq | grep -v grep | wc -l`
|
||||
if [ ${count} -lt 1 ] ;then
|
||||
echo "/etc/init.d/S80dnsmasq start" >> /tmp/ncm.log 2>&1
|
||||
/etc/init.d/S80dnsmasq start >> /tmp/ncm.log 2>&1
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
mkdir -p /lib/firmware
|
||||
if test -e /usr/bin/burnd; then
|
||||
burnd &
|
||||
if test -e /lib/firmware/arduino.elf; then
|
||||
sleep 2
|
||||
echo stop > /sys/class/remoteproc/remoteproc0/state
|
||||
echo start > /sys/class/remoteproc/remoteproc0/state
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user