aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/base-files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mediatek/base-files/etc')
-rwxr-xr-xtarget/linux/mediatek/base-files/etc/board.d/02_network26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/mediatek/base-files/etc/board.d/02_network b/target/linux/mediatek/base-files/etc/board.d/02_network
new file mode 100755
index 0000000000..93d3d1e435
--- /dev/null
+++ b/target/linux/mediatek/base-files/etc/board.d/02_network
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/mediatek.sh
+. /lib/functions/uci-defaults.sh
+. /lib/functions/system.sh
+
+mediatek_setup_interfaces()
+{
+ local board="$1"
+
+ case $board in
+ mt7623_evb)
+ ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_add_switch "switch0" \
+ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth1" "6@eth0"
+ ;;
+ esac
+}
+
+board_config_update
+board=$(mediatek_board_name)
+mediatek_setup_interfaces $board
+board_config_flush
+
+exit 0