aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mediatek/base-files')
-rwxr-xr-xtarget/linux/mediatek/base-files/etc/board.d/02_network26
-rw-r--r--target/linux/mediatek/base-files/lib/mediatek.sh4
2 files changed, 28 insertions, 2 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
diff --git a/target/linux/mediatek/base-files/lib/mediatek.sh b/target/linux/mediatek/base-files/lib/mediatek.sh
index 8466c72ee3..09540326ae 100644
--- a/target/linux/mediatek/base-files/lib/mediatek.sh
+++ b/target/linux/mediatek/base-files/lib/mediatek.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 OpenWrt.org
#
mediatek_board_detect() {
@@ -10,7 +10,7 @@ mediatek_board_detect() {
machine=$(cat /proc/device-tree/model)
case "$machine" in
- "MediaTek MT7623 Evaluation Board")
+ "MediaTek MT7623 evaluation board")
name="mt7623_evb"
;;
esac