openwrt icon indicating copy to clipboard operation
openwrt copied to clipboard

ath79: add support for Linksys EA4500 v3

Open InsaneKnight opened this issue 3 years ago • 4 comments

ath79: add support for Linksys EA4500 v3

Add support for the Linksys EA4500 v3 wireless router

Hardware

SoC: Qualcomm Atheros QCA9558 RAM: 128M DDR2 (Winbond W971GG6KB-25) FLASH: 128M SPI-NAND (Spansion S34ML01G100TFI00) WLAN: QCA9558 3T3R 802.11 bgn QCA9580 3T3R 802.11 an ETH: Qualcomm Atheros QCA8337 UART: 115200 8n1, same as ea4500 v2 USB: 1 single USB 2.0 host port BUTTON: Reset - WPS LED: 1x system-LED LEDs besides the ethernet ports are controlled by the ethernet switch

Installation

  1. Connect to the serial console. Power up the device and interrupt autoboot when prompted

  2. Connect a TFTP server reachable at 192.168.1.0/24 (e.g. 192.168.1.66) to the ethernet port. Serve the OpenWrt initramfs image as "openwrt.bin"

  3. To test OpenWrt only, go to step 4 and never execute step 5; To install, auto_recovery should be disabled first:

   ath> setenv auto_recovery no
   ath> saveenv
  1. Boot the initramfs image using U-Boot
   ath> setenv serverip 192.168.1.66
   ath> tftpboot 0x84000000 openwrt.bin
   ath> bootm
  1. Copy the OpenWrt factory image to the device using scp and write to the NAND flash
   # mtd write /path/to/openwrt/factory.bin firmware

Signed-off-by: Edward Chow [email protected]

InsaneKnight avatar Sep 11 '22 14:09 InsaneKnight

@hauke I have added my name to the Signed-off-by line. Could you please approve the formality test once again?

InsaneKnight avatar Sep 14 '22 00:09 InsaneKnight

I have ea4500 v3,looking forward to testing it!

jack338c avatar Sep 16 '22 10:09 jack338c

@hauke @aparcar Isn't the condition satisfied to start reviewing this commit?

@jack338c How does openwrt with this commit work on your ea4500 v3?

InsaneKnight avatar Oct 06 '22 15:10 InsaneKnight

@hauke @aparcar Isn't the condition satisfied to start reviewing this commit?

@jack338c How does openwrt with this commit work on your ea4500 v3?

I did't compile the firemware,.can't test it yet

jack338c avatar Oct 06 '22 19:10 jack338c

The kernel size may reach to 3MiB soon, so it is better to retain the previous 4MiB partition, just like other devices in ath79/nand. And maybe we need to keep qca,no-eeprom; in pcie wifi node.

DragonBluep avatar Oct 25 '22 12:10 DragonBluep

The kernel size may reach to 3MiB soon, so it is better to retain the previous 4MiB partition,

Got it.

And maybe we need to keep qca,no-eeprom; in pcie wifi node.

This is conflict with nvmem-cell-names = "calibration", if both are set, the calibration data can only be loaded from file system.

InsaneKnight avatar Oct 25 '22 12:10 InsaneKnight

okay, thanks for your explanation.

DragonBluep avatar Oct 25 '22 12:10 DragonBluep

As written in the commit message, it has a dual firmware flash layout in its stock firmware like many other routers produced by Linksys. If you guys prefer dual firmware layout, please let me know how to handle it.

InsaneKnight avatar Oct 25 '22 12:10 InsaneKnight

@InsaneKnight It seems that currently we only support fit image dual-boot 7a6d0748247e23fe976bc400e9802db903d20b47 aa94e34c1d7ce40684ec01b8ddc056548ecd34f0 howerver EA4500 only support legacy image. You may need @yangfl's patch #10674 if you're really interested.

DragonBluep avatar Oct 25 '22 15:10 DragonBluep

@DragonBluep Well, let's just disable dual-boot to get a ready-to-use device with more usable space, without boot count mechanism wearing the flash in each boot.

InsaneKnight avatar Oct 25 '22 17:10 InsaneKnight

在 2022/10/29 21:03, DragonBluep 写道:

@.**** commented on this pull request.


Maybe you can try whether this factory image can work: |LINKSYS_HWNAME := EA4500V3 IMAGES += factory.img IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME) |

I would try, but it seems that dual boot should be disabled first before flashing. A factory image flashed to the secondary partitions may not work.

InsaneKnight avatar Oct 29 '22 13:10 InsaneKnight

@DragonBluep

Factory images prove working. If a factory image is installed to the secondary partitions, it will panic for unability to find the root fs, and the router will switch back to the stock firmware on the primary partitions. If this happens, one can install a stock firmware first (to the secondary partitions), and then install the openwrt factory image (to the primary partitions this time).

Dual boot will be disabled automatically by setting auto_recovery to "no" after the first boot of

openwrt.

InsaneKnight avatar Oct 30 '22 07:10 InsaneKnight

Thank you for your patch, I applied it to master in 50f727b7737d118f7d44986181e305af0624c41d.

hauke avatar Oct 30 '22 23:10 hauke