<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[v853上电自动打开eth0怎么设置]]></title><description><![CDATA[[[topic:post_is_deleted]]]]></description><link>https://bbs.aw-ol.com/topic/4538/v853上电自动打开eth0怎么设置</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 00:05:29 GMT</lastBuildDate><atom:link href="https://bbs.aw-ol.com/topic/4538.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Nov 2023 08:21:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to v853上电自动打开eth0怎么设置 on Fri, 03 Nov 2023 01:25:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://bbs.aw-ol.com/uid/3553">@xjy_5</a> 谢谢</p>
]]></description><link>https://bbs.aw-ol.com/post/19595</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/19595</guid><dc:creator><![CDATA[sunxi]]></dc:creator><pubDate>Fri, 03 Nov 2023 01:25:29 GMT</pubDate></item><item><title><![CDATA[Reply to v853上电自动打开eth0怎么设置 on Thu, 02 Nov 2023 10:14:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://bbs.aw-ol.com/uid/3730">@sunxi</a> vi /etc/init.d/S40network<br />
学一下vi编辑器，用vi来改</p>
<p dir="auto">或者你在电脑改好这个文件，adb传到开发板<br />
adb push ./S40network /etc/init.d/S40Network</p>
]]></description><link>https://bbs.aw-ol.com/post/19583</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/19583</guid><dc:creator><![CDATA[xjy_5]]></dc:creator><pubDate>Thu, 02 Nov 2023 10:14:32 GMT</pubDate></item><item><title><![CDATA[Reply to v853上电自动打开eth0怎么设置 on Thu, 02 Nov 2023 08:38:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://bbs.aw-ol.com/uid/3730">@sunxi</a> 修改脚本/etc/init.d/S40network<br />
添加 ifconfig eth0 up<br />
ifconfig eth0 "192.168.1.1" netmask "255.255.255.0"</p>
<p dir="auto">参考例子</p>
<pre><code>
#!/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/../&amp;:/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 ] &amp;&amp; echo "OK" || echo "FAIL"
        /sbin/ifconfig eth0 hw ether "00:$MAC_ADDR"
        #udhcpc -b -R &amp;
        ifconfig eth0 up
        ifconfig eth0 "$ipaddr" netmask "$netmask"
        ;;
  stop)
        printf "Stopping network: "
        /sbin/ifdown -a
        [ $? = 0 ] &amp;&amp; echo "OK" || echo "FAIL"
        ;;
  restart|reload)
        "$0" stop
        "$0" start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $?

</code></pre>
<p dir="auto">可以修改openwrt/target/v853/v853-vision/busybox-init-base-files/etc/init.d/S40network，这样每次打包都会把这个脚本改好</p>
]]></description><link>https://bbs.aw-ol.com/post/19579</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/19579</guid><dc:creator><![CDATA[xjy_5]]></dc:creator><pubDate>Thu, 02 Nov 2023 08:38:05 GMT</pubDate></item></channel></rss>