ramips: add LinkIt Smart7688 support
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 02_network
index 75cccae0fb7cec75fb562c4398595166333417e3..07327968fc4a07628bba55e2aab39392112ff15e 100755 (executable)
@@ -46,6 +46,8 @@ ramips_setup_interfaces()
        dcs-930|\
        dcs-930l-b1|\
        ht-tm02|\
+       linkits7688 | \
+       linkits7688d | \
        microwrt|\
        ncs601w|\
        w150m|\
@@ -170,6 +172,13 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 6t"
                ucidef_add_switch_vlan "switch1" "2" "4 6t"
                ;;
+       hc5*61|\
+       y1s)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5 6t"
+               ucidef_add_switch_vlan "switch0" "2" "0 6t"
+               ;;
        m2m)
                ucidef_add_switch "switch0" "4"
                ucidef_set_interface_lan "eth0"
@@ -224,12 +233,6 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "1" "1 2 6t"
                ucidef_add_switch_vlan "switch0" "2" "0 6t"
                ;;
-       y1s)
-               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5 6t"
-               ucidef_add_switch_vlan "switch0" "2" "0 6t"
-               ;;
        zbt-wr8305rt)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                ucidef_add_switch "switch0" "1" "1"
@@ -293,9 +296,19 @@ ramips_setup_macs()
        e1700)
                wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
                ;;
+       hc5*61)
+               lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "`
+               [ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
+               wan_mac=$(macaddr_add "$lan_mac" 1)
+               ;;
        ht-tm02)
                lan_mac=$(cat /sys/class/net/eth0/address)
                ;;
+       linkits7688 | \
+       linkits7688d)
+               wan_mac=$(mtd_get_mac_binary factory 4)
+               lan_mac=$(mtd_get_mac_binary factory 46)
+               ;;
        m3|\
        m4|\
        x5|\