v853上电自动打开eth0怎么设置
-
此回复已被删除! -
@sunxi 修改脚本/etc/init.d/S40network
添加 ifconfig eth0 up
ifconfig eth0 "192.168.1.1" netmask "255.255.255.0"参考例子
#!/bin/sh # # Start the network.... # # Debian ifupdown needs the /run/network lock directory mkdir -p /run/network MAC_ADDR="`cat /sys/class/sunxi_info/sys_info | awk '$1=="sunxi_chipid" {print $3}' | sed 's/../&:/g' | cut -c1-14`" ipaddr="192.168.20.162" netmask="255.255.255.0" case "$1" in start) printf "Starting network: " /sbin/ifup -a [ $? = 0 ] && echo "OK" || echo "FAIL" /sbin/ifconfig eth0 hw ether "00:$MAC_ADDR" #udhcpc -b -R & ifconfig eth0 up ifconfig eth0 "$ipaddr" netmask "$netmask" ;; stop) printf "Stopping network: " /sbin/ifdown -a [ $? = 0 ] && echo "OK" || echo "FAIL" ;; restart|reload) "$0" stop "$0" start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit $?
可以修改openwrt/target/v853/v853-vision/busybox-init-base-files/etc/init.d/S40network,这样每次打包都会把这个脚本改好
-
此回复已被删除! -
@sunxi vi /etc/init.d/S40network
学一下vi编辑器,用vi来改或者你在电脑改好这个文件,adb传到开发板
adb push ./S40network /etc/init.d/S40Network -
@xjy_5 谢谢
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号