3 # Copyright (C) 2011-2015 OpenWrt.org
6 .
/lib
/functions
/uci-defaults.sh
7 .
/lib
/functions
/system.sh
8 .
/lib
/functions
/lantiq.sh
21 board
=$
(lantiq_board_name
)
25 ucidef_add_switch
"switch0" \
26 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0"
30 lan_mac
=$
(mtd_get_mac_ascii uboot_env ethaddr
)
31 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
32 ucidef_add_switch
"switch0" \
33 "0:lan:4" "2:lan:2" "1:lan:3" "3:lan:1" "5t@eth0"
36 ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22
)
37 ucidef_add_switch
"switch0" \
38 "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan"
42 ucidef_add_switch
"switch0" \
43 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0"
47 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary board_config 22)" 2)
48 ucidef_add_switch
"switch0" \
49 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0"
53 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary board_config 22)" 1)
54 ucidef_add_switch
"switch0" \
55 "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0"
59 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary boardconfig 22)" 1)
60 ucidef_add_switch
"switch0" \
61 "0:lan" "2:lan" "3:lan" "4:lan" "5:lan" "6t@eth0"
65 lan_mac
=$
(mtd_get_mac_ascii uboot_env ethaddr
)
66 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
67 ucidef_add_switch
"switch0" \
68 "1:lan" "2:lan" "3:lan" "4:lan" "5t@eth0"
72 lan_mac
=$
(mtd_get_mac_ascii uboot_env ethaddr
)
73 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
74 ucidef_set_interface_lan
'eth0'
78 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary caldata 4364)" 1)
79 ucidef_add_switch
"switch0" \
80 "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
84 ucidef_add_switch
"switch0" \
85 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0"
88 EASY80920NAND|EASY80920NOR
)
89 lan_mac
=$
(mtd_get_mac_ascii uboot_env ethaddr
)
90 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
91 ucidef_add_switch
"switch0" \
92 "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
96 ucidef_add_switch
"switch0" \
97 "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
101 ucidef_add_switch
"switch0" \
102 "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0"
106 ucidef_add_switch
"switch0" \
107 "0:lan" "1:lan" "2:lan" "3:lan" "5t@eth0"
111 lan_mac
=$
(mtd_get_mac_ascii uboot-env ethaddr
)
112 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
113 ucidef_add_switch
"switch0" \
114 "0:lan" "1:lan" "2:lan" "4:lan" "5:lan" "6t@eth0"
118 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary boardconfig 61696)" 1)
119 ucidef_add_switch
"switch0" \
120 "0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0"
124 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary romfile 61696)" 1)
125 ucidef_add_switch
"switch0" \
126 "0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0"
130 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary board_config 22)" 1)
131 ucidef_add_switch
"switch0" \
132 "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "6t@eth0"
136 wan_mac
=$
(macaddr_add
"$(mtd_get_mac_binary board_config 22)" 1)
137 ucidef_add_switch
"switch0" \
138 "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "6t@eth0"
142 ucidef_add_switch
"switch0" \
143 "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan"
147 lan_mac
=$
(mtd_get_mac_ascii ubootconfig ethaddr
)
149 ucidef_add_switch
"switch0" \
150 "2:lan:2" "3:lan:3" "5:lan:4" "4:wan:1" "6t@eth0"
154 ucidef_set_interface_lan
'eth0'
159 if [ -n "$(ls /lib/modules/`uname -r`/ltq_atm*)" ]; then
160 ucidef_add_atm_bridge
"$vpi" "$vci" "$encaps" "$payload"
163 if grep -qE "system type.*: (VR9|xRX200)" /proc
/cpuinfo
; then
165 ucidef_add_vdsl_modem
"$annex" "av" "ptm"
168 ucidef_add_adsl_modem
"$annex" "/lib/firmware/adsl.bin"
171 ucidef_set_interface_wan
"$interface_wan" "pppoe"
173 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr
"lan" "$lan_mac"
174 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr
"wan" "$wan_mac"