Add Support for Linksys EA7300 V2

Based on recently added support for Git EA7300 V1

I purchased a factory recertified EA7300 at a good price. Unfortunately, it is a V2.

There is very little difference between V1 https://deviwiki.com/wiki/Linksys_EA7300_v1
and
V2 https://deviwiki.com/wiki/Linksys_EA7300_v2

V1 has dual 7615E radios and V2 has 7603/7615 radios. Both have NANDflash=128/RAM=256 but different memory manufacturers.

Edit: Based on the IO-Data WN-AX2033GR (also with 7603/7615E radios), I added
the following to image/mt7621.mk

define Device/linksys_ea7300-v2
  $(Device/linksys_ea7xxx)
  DEVICE_MODEL := EA7300
  DEVICE_VARIANT := v2
  LINKSYS_HWNAME := EA7300v2
  DEVICE_PACKAGES += kmod-mt7603
endef
TARGET_DEVICES += linksys_ea7300-v2

My image built and flashed but has two glitchs - the mt7603 radio was not enabled and the switch interface does not show in Luci. My workstation, LAN1, is connected and I'm posting from the work station.

Wireless Overview
 radio0
MediaTek MT7615E 802.11nac
Device is not active
Restart
Scan
Add
 disabled
SSID: OpenWrt | Mode: Master
Wireless is disabled
Enable
Edit
Remove

My understanding is the mt7603 radio is integrated into the main mt7621 chip. I'm not sure if the mt7603 radio is a PCIe interface but the *.dtsi for this group of linksys devices has

&pcie0 {
	mt76@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x0000>;
	};
};

&pcie1 {
	mt76@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
	};
};

The I-O DATA WN-AX2033GR has the mt7603/mt7615e radios but also includes frequency limits:

&pcie0 {
	wifi@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;

		mediatek,mtd-eeprom = <&factory 0x0>;
		ieee80211-freq-limit = <2400000 2483000>;
	};
};

&pcie1 {
	wifi@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;

		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 5710000>;
	};
};

The IO-data is an older commit that is using the wifi@ and mt76@ looks to be current usage.
Any guidance appreciated

Edit: Found a typo in my image/mt7621.mk file

It's not, mt7603e is a dedicated chip, under the oddly shaped (smaller) can in the middle/ front of the board, connecting via PCIe.

1 Like

I have a successful master build/flash. The new DSA interface shows eth1 -> eth4 correctly and both 2.4/5.0 radios work. MAC's look good. Hope to generate a patch an submit later today.

Edit: Patch committed. Thread can be closed.

2 Likes

@SHEP. You are amazing

I would love to test this on my EA7300 V2

Any help you need in testing/debug I'm really motivated to get this going.

Snapshot builds are available from OpenWrt.

https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/

I built my own release, adding Luci/uhttp and Stubby and it is running - uptime almost 5 days. DNS over TLS/ Firefox SNI verified at

https://www.cloudflare.com/ssl/encrypted-sni/

If you've never installed OpenWrt before, there are differences between snapshots and releases:

https://openwrt.org/releases/snapshot

Installed and working well on my EA7300 v2 - I even (locally) modified luci-advanced-reboot, will submit a PR for this very soon. But one, slight problem ...

Is there no way to replace (overwrite) the stock Linksys firmare with OpenWrt? The notes in the commit seem to explain how to install OpenWrt in the "other" partition (and it works!), but that's a problem ... having Linksys in one, OpenWrt in another => cannot do a sysupgrade, and save settings.

Thoughts?

Thanks!

During development, I'd left ...v2 off the LINKSYS_HWNAME and my OpenWrt install disappeared. I ended up doing a hard reset, overwriting Linksys firmware on the first boot and then OpenWrt on the reboot. I've been able to upgrade from LuCi subsequently.

I do not know the actual factors that determine A/B booting, I based V2 on V1. You may want to reach out to the V1 developer who initially worked this out.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=ed087cba8a8e41f76f9487caa34eff926ea8a065

How did you do that? :smile:. From the OpenWrt partition, if I try to flash sysupgrade (to overwrite Linksys) ... it doesn't seem to work. Hmmm.

Will check with the V1 developer, as you say. But it seems from the commit there is info of how to go back to stock, but not how to remove Linksys. If OpenWrt isn't in both partitions, it basically breaks / doesn't allow sysupgrade while keeping settings.

Thanks!

Using the OEM GUI update interface, select a previously downloaded Linksys firmware update:

https://www.linksys.com/us/support-article?articleNum=205516

Sorry, I probably wasn't very clear - let me try to explain. Here is what I have now,

So I want to replace Linksys (partition 2) by OpenWrt. To do that, I need to flash from partition 1 (flash is always done to the other partition). But it's not working. Actually, it almost looks like it flashed to the same partition, not the alternative?

Thanks!

My understanding is that flashing overwrites the backup - not the booted image.

Pasted from the V1 commit page:

  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.

I not sure, if you are running OpenWrt on 'A', that you can reflash OpenWrt to 'B' using the OpenWrt interfaces. There may be a way to ID the 'B' partition and use mtd but I actually like having OEM as a backup.

Yes, understand your point (OEM as a backup) - it's not bad, agreed there. What has been confusing me is that my Linksys EA3500 is also dual partition, and it behaves differently => always flashes the backup (non-active) partition.

So I tried something ... updated and re-built OpenWrt, flashed it. It should flash the backup partition, as you noted - but it doesn't! Confirmed, it flashes the active (OpenWrt) partition. Then it reboots to the alternative partition (which is OEM) ... so a bit odd and confusing. I then told Linksys OEM firmware to swap back (no flash) => it did, and I can confirm, the sysupgrade was applied to the active partition, not backup.

Seems the notes need to change, or modify the code to flash the alternative partition?

Thanks!

Staying with the A/B syntax, it appears that only 'A' can be flashed with OpenWrt, I agree that it would be useful to have documentation to that effect for the multiple Linksys devices that use this scheme. If you are successful reaching the V1 committer, getting his buy-in would be nice. I previously emailed him but did not get a response.

Sure, will let you know. I can see an upside of this as well - it was just confusing me to start, given how the EA3500 works. And also a bit confusing to upgrade OpenWrt, then boot to OEM ... :laughing:.

Want to try to see if settings are saved - I have a bad feeling this won't work, as they are restored on reboot. Hmmm ... then again, they may, given how they are stored.

Thanks!

Hi,

FYI, I think I found what is "missing" (to be the same as other dual partition devices). Check out,

target/linux/kirkwood/base-files/etc/init.d/bootcount
target/linux/kirkwood/base-files/lib/upgrade/platform.sh

And then,

target/linux/mvebu/cortexa9/base-files/lib/upgrade/linksys.sh

Thoughts?

Thanks!

The v2 commit added ea7300-v2 to the bootcount and platform.sh files. See diffs of the last 2 entries in the commit.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=620f9c773413a0deaeda2bdc22d5e9cb89b9317f

Yes, sorry - I wasn't very clear (not even close :rofl:). I see that in the EA3500 (and some other Linksys dual partition devices), inside platform.sh, the dual platform devices call,

platform_do_upgrade_linksys "$1"

vs. other devices, that call,

nand_do_upgrade "$1"

In the EA7300v2 (the commit you mention), platform.sh calls,

nand_do_upgrade "$1"

So this needs to be updated, to match the other dual partition devices, agreed?

Thanks!

Both versions of the EA7300 have NAND flash and I was trusting the earlier commit to be accurate.

Could

platform_do_upgrade_linksys "$1"

be for NOR flash?

https://openwrt.org/docs/techref/flash.layout

Still digging! Trying to understand why it's not writing to the alternative partition. Odd, but I can't set u-boot variables, for example,

root@OpenWrt:~# fw_setenv boot_part 2
Can't open /dev/mtd1: Permission denied
Error: can't write fw_env to flash

Is this working for you?

Thanks!