需求描述
根据项目需要,需要动态切换wan/lan口,查看realtek sdk,在系统启动的过程中,有如下log输出
/bin/echo 0 eth0.2 > /proc/rtl8686gmac/dev_port_mapping
[ 29.084000] port 0 assign to eth0.2
[ 29.088000] eth0.2 -> 0x1
CMD: /bin/brctl addif br0 eth0.3
[ 29.189000] device eth0.3 entered promiscuous mode
system(): /bin/echo 1 eth0.3 > /proc/rtl8686gmac/dev_port_mapping
[ 29.204000] port 1 assign to eth0.3
[ 29.208000] eth0.3 -> 0x2
system(): /bin/echo 2 eth0.4 > /proc/rtl8686gmac/dev_port_mapping
[ 29.229000] port 2 assign to eth0.4
[ 29.233000] eth0.4 -> 0x4
system(): /bin/echo 3 eth0.4 > /proc/rtl8686gmac/dev_port_mapping
[ 29.245000] port 3 assign to eth0.4
[ 29.249000] eth0.4 -> 0x8
system(): /bin/echo 4 eth0.4 >