diff options
author | Nikolay Martynov <mar.kolya@gmail.com> | 2022-12-14 20:26:38 -0500 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2023-01-04 23:19:19 +0100 |
commit | 665c2154ef122d10dfffeca95538ebdff82653b5 (patch) | |
tree | 57737ecd9bcd2983e3667bda5f9b5c25ae10f6b8 /target/linux/ramips/mt7621 | |
parent | c4b806d5c4ccc653968620e6e9aec93bc4e370e5 (diff) | |
download | upstream-665c2154ef122d10dfffeca95538ebdff82653b5.tar.gz upstream-665c2154ef122d10dfffeca95538ebdff82653b5.tar.bz2 upstream-665c2154ef122d10dfffeca95538ebdff82653b5.zip |
ramips: add basic support for tp-link er605-v2
This is a MT7621-based device with 128MB NAND flash, 256MB RAM, and a USB port.
The board has headers to attach console. In order for them to work two solder
bridges near those pads need to be made.
The defice has the following partition table:
```
0x000000000000-0x000000080000 : "u-boot"
0x000000080000-0x000000100000 : "u-boot-env"
0x000000100000-0x000000140000 : "factory"
0x000000140000-0x000007e00000 : "firmware"
0x000007e00000-0x000008000000 : "panic-ops"
```
`firmware` partition contains UBI volumes. Unfortunately I accidentally wiped
partition and I no longer have access to it.
`firmware` partition contains 'secondary' U-Boot which is run by 'first' u-boot.
It also contains various configuration partitions that include device info and
MAC address. There also seems to be 'primary' and 'backup' set of 'main' volumes.
U-boot has `mtkupgrade` command that just overrides data on firmware partitions.
Firmware file provided by TP-Link cannot be used with that command.
U-boot also has 'recovery' http server. Unfortunately I was not able to make it
work with manufacturer's firmware.
Manufacturer's firmware essentially contains multiple UBI volumes along with
'partition table'. Unfortunately I no longer can properly run manufacturer's
firmware so I cannot at the moment try to a support for building 'factory' images.
This patch adds support for initramfs image as well as sysupgrade image.
This seems to be pretty standard MT7621 board otherwise.
Things that work:
* network
* leds
* usb
* factory MAC detection
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Diffstat (limited to 'target/linux/ramips/mt7621')
-rw-r--r-- | target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 9 | ||||
-rwxr-xr-x | target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index b7121db64f..f0ac4f1c4f 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -99,6 +99,9 @@ ramips_setup_interfaces() tplink,eap615-wall-v1) ucidef_set_interface_lan "lan0 lan1 lan2 lan3" ;; + tplink,er605-v2) + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4" "eth0" + ;; tplink,tl-wpa8631p-v3) ucidef_set_interface_lan "lan1 lan2 lan3 plc0" ;; @@ -225,6 +228,12 @@ ramips_setup_macs() label_mac=$(cat "/sys/firmware/mikrotik/hard_config/mac_base") lan_mac=$label_mac ;; + tplink,er605-v2) + CI_UBIPART="firmware" + label_mac=$(mtd_get_mac_uci_config_ubi "tddp") + lan_mac=$label_mac + wan_mac=$(macaddr_add "$label_mac" 1) + ;; tplink,mr600-v2-eu) label_mac=$(cat "/sys/class/net/eth0/address") wwan_mac=$(macaddr_add $label_mac 1) diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index c665820169..fd856e6b3a 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -124,6 +124,12 @@ platform_do_upgrade() { iodata_mstc_upgrade_prepare "0x1fe75" nand_do_upgrade "$1" ;; + tplink,er605-v2) + echo "Upgrading tplink,er605-v2" + CI_UBIPART="firmware" + CI_KERNPART="kernel" + nand_do_upgrade "$1" + ;; ubnt,edgerouter-x|\ ubnt,edgerouter-x-sfp) platform_upgrade_ubnt_erx "$1" |