aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7629/base-files
diff options
context:
space:
mode:
authorYoonji Park <koreapyj@dcmys.kr>2022-06-06 07:44:48 +0000
committerDaniel Golle <daniel@makrotopia.org>2022-09-12 01:43:49 +0100
commitc27279dc26a26b8ad054882d4c5f86a85526fd16 (patch)
tree9622022edfd7a0dca29857546e9d6c290573246a /target/linux/mediatek/mt7629/base-files
parent49763d907b0d87769c3e5885f1c11b5b62ccfa2b (diff)
downloadupstream-c27279dc26a26b8ad054882d4c5f86a85526fd16.tar.gz
upstream-c27279dc26a26b8ad054882d4c5f86a85526fd16.tar.bz2
upstream-c27279dc26a26b8ad054882d4c5f86a85526fd16.zip
mediatek: add support for ipTIME A6004MX Add basic support for ipTIME A6004MX.
Hardware: SoC: MediaTek MT7629 Cortex-A7 (ARMv7 1.25GHz, Dual-Core) RAM: DDR3 128MB Flash: Macronix MX35LF1GE4AB (SPI-NAND 128MB) WiFi: MediaTek MT7761N (2.4GHz) / MediaTek MT7762N (5GHz) - no driver Ethernet: SoC (WAN) / MediaTek MT7531 (LAN x4) UART: [GND, RX, TX, 3.3V] (115200) Installation: - Flash recovery image with TFTP recovery Revert to stock firmware: - Flash stock firmware with TFTP recovery TFTP Recovery method: 1. Unplug the router 2. Hold the reset button and plug in 3. Release when the power LED stops flashing and go off 4. Set your computer IP address manually to 192.168.0.x / 255.255.255.0 5. Flash image with TFTP client to 192.168.0.1 Signed-off-by: Yoonji Park <koreapyj@dcmys.kr>
Diffstat (limited to 'target/linux/mediatek/mt7629/base-files')
-rw-r--r--target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds16
-rw-r--r--target/linux/mediatek/mt7629/base-files/etc/board.d/02_network3
-rwxr-xr-xtarget/linux/mediatek/mt7629/base-files/etc/init.d/bootcount17
-rwxr-xr-xtarget/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh3
4 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds b/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds
new file mode 100644
index 0000000000..42b6fcbbb3
--- /dev/null
+++ b/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds
@@ -0,0 +1,16 @@
+. /lib/functions/leds.sh
+. /lib/functions/uci-defaults.sh
+
+board=$(board_name)
+
+board_config_update
+
+case $board in
+iptime,a6004mx)
+ ucidef_set_led_netdev "wan" "WAN" "orange:wan" "eth1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
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
index c39417abbc..4254f39ca0 100644
--- a/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network
@@ -8,6 +8,9 @@ mediatek_setup_interfaces()
local board="$1"
case $board in
+ iptime,a6004mx)
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth1"
+ ;;
mediatek,mt7629-rfb)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
diff --git a/target/linux/mediatek/mt7629/base-files/etc/init.d/bootcount b/target/linux/mediatek/mt7629/base-files/etc/init.d/bootcount
new file mode 100755
index 0000000000..a6b8fac1d9
--- /dev/null
+++ b/target/linux/mediatek/mt7629/base-files/etc/init.d/bootcount
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+# SPDX-License-Identifier: GPL-2.0-only
+
+START=99
+
+boot() {
+ case $(board_name) in
+ iptime,a6004mx)
+ if [ `fw_printenv boot_sector` = "boot_sector=B" ]; then
+ echo "bootcount: boot_sector must be A. Rebooting..."
+ fw_setenv boot_sector A
+ reboot
+ exit 1
+ fi
+ ;;
+ esac
+}
diff --git a/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh
index 9a613c43b1..f10ad14b49 100755
--- a/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7629/base-files/lib/upgrade/platform.sh
@@ -9,6 +9,9 @@ platform_do_upgrade() {
local board=$(board_name)
case "$board" in
+ iptime,a6004mx)
+ nand_do_upgrade "$1"
+ ;;
*)
default_do_upgrade "$1"
;;