ramips: add support for Linksys EA8100 v2
authorTee Hao Wei <angelsl@in04.sg>
Mon, 5 Jul 2021 17:19:08 +0000 (01:19 +0800)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 11 Jul 2021 14:58:12 +0000 (16:58 +0200)
Specifications:
- SoC: MT7621AT
- RAM: 256MB
- Flash: 128MB NAND
- Ethernet: 5 Gigabit ports
- WiFi: 2.4G/5G MT7615N
- USB: 1 USB 3.0, 1 USB 2.0

This device is very similar to the EA7300 v1/v2, EA7500 v2, and EA8100 v1.

Installation:

Upload the generated factory image through the factory web interface.

(following part taken from EA7300 v2 commit message:)

This might fail due to the A/B nature of this device. When flashing, OEM
firmware writes over the non-booted partition. If booted from 'A',
flashing over 'B' won't work. To get around this, you should flash the
OEM image over itself. This will then boot the router from 'B' and
allow you to flash OpenWRT without problems.

Reverting to factory firmware:

Hard-reset the router three times to force it to boot from 'B.' This is
where the stock firmware resides. To remove any traces of OpenWRT from
your router simply flash the OEM image at this point.

With thanks to Tom Wizetek (@wizetek) for testing.

Signed-off-by: Tee Hao Wei <angelsl@in04.sg>
package/boot/uboot-envtools/files/ramips
target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
target/linux/ramips/mt7621/base-files/etc/board.d/02_network
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh

index 2bb04997f9fda4f30a1b7156168933887f033800..7941c106e422bb34853bc2d25f58d54e53c8d503 100644 (file)
@@ -54,6 +54,7 @@ linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 linksys,ea8100-v1|\
+linksys,ea8100-v2|\
 xiaomi,mi-router-3g|\
 xiaomi,mi-router-3-pro|\
 xiaomi,mi-router-4|\
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts b/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts
new file mode 100644 (file)
index 0000000..db1429e
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+       compatible = "linksys,ea8100-v2", "mediatek,mt7621-soc";
+       model = "Linksys EA8100 v2";
+};
index 63d28530b6a9f1dc4b4fde39a92a576bde3ee373..853741f9afdda39d1cef7ba03e2c71be77c423b2 100644 (file)
@@ -870,6 +870,14 @@ define Device/linksys_ea8100-v1
 endef
 TARGET_DEVICES += linksys_ea8100-v1
 
+define Device/linksys_ea8100-v2
+  $(Device/linksys_ea7xxx)
+  DEVICE_MODEL := EA8100
+  DEVICE_VARIANT := v2
+  LINKSYS_HWNAME := EA8100v2
+endef
+TARGET_DEVICES += linksys_ea8100-v2
+
 define Device/linksys_re6500
   $(Device/dsa-migration)
   IMAGE_SIZE := 7872k
index cb889de208e1c7ff3810f36e804b814063de489b..9545d8d0c76e12497c058a013c35c30fe7e92589 100644 (file)
@@ -55,7 +55,8 @@ linksys,e5600)
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
-linksys,ea8100-v1)
+linksys,ea8100-v1|\
+linksys,ea8100-v2)
        ucidef_set_led_netdev "lan1" "lan1 link" "green:lan1" "lan1" "link"
        ucidef_set_led_netdev "lan2" "lan2 link" "green:lan2" "lan2" "link"
        ucidef_set_led_netdev "lan3" "lan3 link" "green:lan3" "lan3" "link"
index aa1d6449388a76bab2be234a6396adf093879bb3..16148547f7d592b265c1d22ea3cd0868a8516261 100644 (file)
@@ -143,7 +143,8 @@ ramips_setup_macs()
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
-       linksys,ea8100-v1)
+       linksys,ea8100-v1|\
+       linksys,ea8100-v2)
                lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
                wan_mac=$lan_mac
                label_mac=$lan_mac
index 24d73b039d3d57bee3d1c845cc1a94b2639d4ea0..ee847e947beb90cfdc199a96d7b8daa186b21376 100644 (file)
@@ -28,7 +28,8 @@ case "$board" in
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
-       linksys,ea8100-v1)
+       linksys,ea8100-v1|\
+       linksys,ea8100-v2)
                hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
                [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
index d3525ea0c9389df73f6f29635a3c75554b883d18..7b4a63d663524eb64025fd5fccf5a5e30c95d358 100755 (executable)
@@ -12,7 +12,8 @@ boot() {
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
-       linksys,ea8100-v1)
+       linksys,ea8100-v1|\
+       linksys,ea8100-v2)
                mtd resetbc s_env || true
                ;;
        samknows,whitebox-v8)
index c2ad4d3ed63ebee9207e3323c2df3247b7fbd615..18fea53aee50b81ce09882dfb4f3ae6b42588101 100755 (executable)
@@ -63,6 +63,7 @@ platform_do_upgrade() {
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
        linksys,ea8100-v1|\
+       linksys,ea8100-v2|\
        netgear,r6220|\
        netgear,r6260|\
        netgear,r6350|\