aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7629/base-files
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2019-11-01 11:17:28 +0800
committerChuanhong Guo <gch981213@gmail.com>2019-11-04 20:51:19 +0800
commit09fe0c847dd32a829fd3dcb21e284cc0c7a3e763 (patch)
tree54cf3c29b96e19d1754732b45b7b3160bb8f8285 /target/linux/mediatek/mt7629/base-files
parent58b0d3ecd66ef220101d1f4dfe550242d6004fce (diff)
downloadupstream-09fe0c847dd32a829fd3dcb21e284cc0c7a3e763.tar.gz
upstream-09fe0c847dd32a829fd3dcb21e284cc0c7a3e763.tar.bz2
upstream-09fe0c847dd32a829fd3dcb21e284cc0c7a3e763.zip
mediatek: add mt7629 subtarget with rfb image
base-files are added into subtarget directory like what's done recently in ath79. For this subtarget, metadata checks are enforced and a SUPPORTED_DEVICE is added to generate proper metadata. Since we only have mt7629 support in 4.19, override KERNEL_PATCHVER in target.mk for now. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/mediatek/mt7629/base-files')
-rwxr-xr-xtarget/linux/mediatek/mt7629/base-files/etc/board.d/02_network34
-rwxr-xr-xtarget/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh16
2 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network
new file mode 100755
index 0000000000..757a390c24
--- /dev/null
+++ b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+. /lib/functions/system.sh
+
+mediatek_setup_interfaces()
+{
+ local board="$1"
+
+ case $board in
+ mediatek,mt7629-lynx-rfb)
+ ucidef_set_interfaces_wan "eth1"
+ ucidef_add_switch "switch0" \
+ "0:lan" "1:lan" "2:lan" "3:lan" "6@eth0"
+ ;;
+ esac
+}
+
+mediatek_setup_macs()
+{
+ local board="$1"
+
+ case $board in
+ esac
+}
+
+board_config_update
+board=$(board_name)
+mediatek_setup_interfaces $board
+mediatek_setup_macs $board
+board_config_flush
+
+exit 0
diff --git a/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh
new file mode 100755
index 0000000000..9a613c43b1
--- /dev/null
+++ b/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,16 @@
+PART_NAME=firmware
+REQUIRE_IMAGE_METADATA=1
+
+platform_check_image() {
+ return 0
+}
+
+platform_do_upgrade() {
+ local board=$(board_name)
+
+ case "$board" in
+ *)
+ default_do_upgrade "$1"
+ ;;
+ esac
+}