mvebu: add switch config for clearfog pro
authorJonas Gorski <jonas.gorski@gmail.com>
Mon, 26 Sep 2016 11:25:44 +0000 (13:25 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Mon, 26 Sep 2016 11:27:44 +0000 (13:27 +0200)
Check for switch0 existance and add default switch config if found.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
target/linux/mvebu/base-files/etc/board.d/02_network

index 8f633c9bad7c8818c4e4759abb9acd8ffe6d3d2d..21c666025ca93fa52dbf228ed44f2f43dcdf94be 100755 (executable)
@@ -31,6 +31,9 @@ armada-xp-gp)
        ;;
 armada-388-clearfog)
        ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
+       swconfig list 2>&1 | grep -q switch0 && \
+               ucidef_add_switch "switch0" \
+                       "0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5@eth0" "6:lan:6"
        ;;
 *)
        ucidef_set_interface_lan "eth0"