4 .
/lib
/functions
/uci-defaults.sh
5 .
/lib
/functions
/system.sh
7 ramips_setup_interfaces
()
13 ucidef_add_switch
"switch0" \
14 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
17 ucidef_add_switch
"switch0" \
18 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0"
21 ucidef_add_switch
"switch0" \
22 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
25 ucidef_add_switch
"switch0" \
26 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
30 ucidef_set_interface_lan
"eth0"
33 ucidef_add_switch
"switch0" \
34 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0"
39 ucidef_add_switch
"switch0" \
40 "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
54 lan_mac
=$
(macaddr_setbit_la
"$(cat /sys/class/net/eth0/address)")
55 wan_mac
=$
(mtd_get_mac_binary factory
0x8004)
58 wan_mac
=$
(mtd_get_mac_ascii uboot-env HW_WAN_MAC
)
59 lan_mac
=$
(mtd_get_mac_ascii uboot-env HW_LAN_MAC
)
63 lan_mac
=$
(mtd_get_mac_ascii nvram lanmac
)
64 wan_mac
=$
(mtd_get_mac_ascii nvram wanmac
)
67 wan_mac
=$
(mtd_get_mac_binary devdata
0x7)
70 lan_mac
=$
(mtd_get_mac_ascii nvram lanmac
)
71 wan_mac
=$
(mtd_get_mac_ascii nvram wanmac
)
75 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary factory 0x8004)" 2)
78 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary factory 0x4)" 3)
81 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary factory 0x4)" 1)
85 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr
"lan" $lan_mac
86 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr
"wan" $wan_mac
87 [ -n "$label_mac" ] && ucidef_set_label_macaddr
$label_mac
92 ramips_setup_interfaces
$board
93 ramips_setup_macs
$board