Build for Linksys EA9500

Hello,

I just wanted to report that I've been running the November build for several weeks now and It's working comparably to the January build. The 5GHz range still seems pretty weak and barely makes it beyond the room the router is in. The only difference I've noticed is that perhaps the network is a bit more stable, as I did have to reset the 2.4GHz radio every couple weeks when devices would start to have trouble connecting on the January build.

Some devices seem to repeatedly lose connection on the 2.4GHz band (happens a lot with Android and Alexa devices) and can take a while to reconnect. I remember that this didn't seem to happen on the Bleeding Edge build and it had great 5GHz range as well. In addition, I can't get some 5GHz devices to connect at all on the January & November builds (Ring Pro Video Doorbell & a 1st gen Echo Show).

I'm not sure what the secret sauce was on the Bleeding Edge build, but I hope npcomplete can bring it back in some form, without the wired-wireless communication issues and possible antenna/radio damage issues that some may have experienced. The WiFi on that build was awesome.

I'm looking forward to official builds in the future. Hopefully npcomplete can make it happen.

Thanks,

1 Like

Any idea why my router keeps rebooting back to stock firmware? Seems to happen whenever I put my router back together and I can't get it to force swap partitions with the partial boot method.

You should ssh into openwrt and flash openwrt to both the partitions. Instructions here

I must have misunderstood. I thought it had support for dual booting. No problem. I'll just flash both partitions. Thanks!

Add: Thank you for all the work you've done for this project. I'd be at a loss without a custom firmware option.

1 Like

@npcomplete ! I've successfully flashed my USEA9500 with your current FW. It looks to me like almost everything's working well. I would like to THANK YOU for your time, this thread is an amazing read and allowed me to, without giving up, make my Linksys router function on OpenWRT.

I DO have one request. The only reason I took on this adventure in the first place is because I want to track ALL internet traffic and bandwidth use for every device on my network, and get an IP address report weekly/monthly for the use. bwmon requires a newer kernel... Do you have any plans to recompile this with the latest kernel?

Also - it doesn't seem like the second 5GHz wifi network actually broadcasts. It shows in the wireless overview, and I can edit all of its details, but it doesn't appear when searching for wifi networks. I thought this was addresses before, but not sure if it's fixed in the latest FW.

Again, thank you for all the hard work and making this "easy" for someone who doesn't write code or understand all the hassles of tweaking for specific hardware.

Best regards!

2 Likes

Hi @npcomplete , If we're already on openwrt, do we also have to "replace" the .img with latest as well or do we just flash the latest .trx?

If already on OpenWrt, just flash trx

1 Like

Thanks for the prompt reply, much appreciated! I'll flash it tomorrow and run it for couple of days and i'll let you know how well it works on a non-US model. Thanks for keeping the project alive @npcomplete ..

1 Like

Hi @npcomplete

I have tried multiple old and new firmware.
Sometimes when I flash a new firmware, it seems that the wifi is working until I reboot the device then no wifi anymore.

I have built as well openwrt from master after merging your branch but it is the same issue.

Any idea for any fix to make any radio0 to radio1 to work?

Thank you,

iw list

no output

root@OpenWrt:~# lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device d612
01:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 04)

Kernel Log:

System Log

Thanks for the logs. I think there is something wrong with wifi chips.

Wed Feb 17 23:26:59 2021 kern.err kernel: [ 20.740248] brcmfmac 0000:01:00.0: brcmf_pcie_download_fw_nvram: FW failed to initialize

Check your nvram as well, it might be corrupted.

Also your lspci shows no pci switches as it should:

root@OpenWrt:~# lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device d612
0000:01:00.0 PCI bridge: PLX Technology, Inc. PEX 8603 3-lane, 3-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ab)
0000:02:01.0 PCI bridge: PLX Technology, Inc. PEX 8603 3-lane, 3-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ab)
0000:02:02.0 PCI bridge: PLX Technology, Inc. PEX 8603 3-lane, 3-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ab)
0000:03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 04)
0000:04:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 04)
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device d612
0001:01:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 04)
1 Like

Thank you for all the hard work on this! literally doubled my speeds. Having an issue with the latest build...

My incoming vlan needs to be 35, but if I switch it to 35, it says that there is a kernel error.

Has anyone else had this problem?

Was really looking forward to have SQM working. I'll try to fix it again tomorrow night and see if I can find some logs or anything.

Thanks so much.

I have dumped my NVRAM here:
Original_EA9500v1

Should I try to flash my NVRAM with your files which you mentioned in this post?
Recovery Files

When I compared my dumped files to your files, it seems there is a difference in many blocks.
I am not sure this due to the mac addresses, different versions (US/EU, v1/v1.1), or corrupt NVRAM on my side.

You can certainly try using recovery files, make sure to update the mac addresses back to your router.

1 Like

I have tried that and it seems I have an issue that it is no longer booting:

I have been trying to connect via the JTAG with raspberry pi via openocd. I have yet succeed as there is no cfg file for this SoC.

Init Arena
Init Devs.
Boot partition size = 262144(0x40000)
DDR Clock: 400 MHz
Warning: invalid DDR setting of 0 MHz ignored. DDR frequency will be set to 400 MHz.
Warning: invalid CPU setting of 0 MHz ignored. armclock frequency will be set to 800 MHz.
CPU type 0x0: 800MHz
Tot mem: 262144 KBytes

CFE mem:    0x00F00000 - 0x01799D2C (9018668)
Data:       0x00F601E0 - 0x00F608A8 (1736)
BSS:        0x00F608B8 - 0x00F97D2C (226420)
Heap:       0x00F97D2C - 0x01797D2C (8388608)
Stack:      0x01797D2C - 0x01799D2C (8192)
Text:       0x00F00000 - 0x00F52488 (337032)
Boot:       0x0179A000 - 0x017DA000
Reloc:      I:00000000 - D:00000000

Boot version: v0.5.1__7.14.131.35

Loader:raw, invalid tftp target filename (:)!
Could not load :: Invalid parameter
Loader:raw Filesys:raw Dev:nflash0.os File: Options:(null)
Loading: ... 2474269 bytes read
Entry at 0x00008000
Starting program at 0x00008000
cfe_start: launch kernel with blue LED7 is on!

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.98 (vivek@ubuntu) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15798-95359dac82)) #0 SMP Mon Feb 15 15:54:28 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Linksys EA9500
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu s26764 r8192 d22388 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65248
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 250888K/262144K available (5127K kernel code, 152K rwdata, 1272K rodata, 1024K init, 292K bss, 11256K reserved, 0K cma-reserved, 131072K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x0a130000 -> 0x3a530000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e530001
[    0.000000] random: get_random_bytes called from start_kernel+0x2f0/0x4a0 with crng_init=0
[    0.000013] sched_clock: 64 bits at 400MHz, resolution 2ns, wraps every 4398046511103ns
[    0.000037] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x5c4093a7d1, max_idle_ns: 440795210635 ns
[    0.000067] Switching to timer-based delay loop, resolution 2ns
[    0.000379] Calibrating delay loop (skipped), value calculated using timer frequency.. 800.00 BogoMIPS (lpj=4000000)
[    0.000395] pid_max: default: 32768 minimum: 301
[    0.000563] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000576] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001552] CPU: Testing write buffer coherency: ok
[    0.001608] CPU0: Spectre v2: using BPIALL workaround
[    0.002040] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002700] Setting up static identity map for 0x100000 - 0x10003c
[    0.002887] rcu: Hierarchical SRCU implementation.
[    0.003279] smp: Bringing up secondary CPUs ...
[    0.004262] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004274] CPU1: Spectre v2: using BPIALL workaround
[    0.004428] smp: Brought up 1 node, 2 CPUs
[    0.004444] SMP: Total of 2 processors activated (1600.00 BogoMIPS).
[    0.004453] CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x13)
[    0.004458] CPU: This may indicate a broken bootloader or firmware.
[    0.008076] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.008109] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.008328] pinctrl core: initialized pinctrl subsystem
[    0.009133] NET: Registered protocol family 16
[    0.010132] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.030479] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.033094] clocksource: Switched to clocksource arm_global_timer
[    0.033937] thermal_sys: Registered thermal governor 'step_wise'
[    0.034593] NET: Registered protocol family 2
[    0.036010] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.036062] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.036087] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.036112] TCP: Hash tables configured (established 1024 bind 1024)
[    0.036326] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.036382] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.036698] NET: Registered protocol family 1
[    0.036743] PCI: CLS 0 bytes, default 64
[    0.038599] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.044173] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.044190] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.049721] bounce: pool size: 64 pages
[    0.054563] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.057168] printk: console [ttyS0] disabled
[    0.057299] 18000300.serial: ttyS0 at MMIO 0x18000300 (irq = 18, base_baud = 7812500) is a 16550
[    0.506728] printk: console [ttyS0] enabled
[    0.511846] bcm2835-rng 18004000.rng: hwrng registered
[    0.518294] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xf1
[    0.524733] nand: Toshiba NAND 128MiB 3,3V 8-bit
[    0.529365] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.536993] iproc_nand 18028000.nand: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[    0.546957] Scanning device for bad blocks
[    0.571548] random: fast init done
[    1.095431] Bad eraseblock 768 at 0x000006000000
[    1.355597] 6 fixed-partitions partitions found on MTD device brcmnand.0
[    1.362348] Creating 6 MTD partitions on "brcmnand.0":
[    1.367521] 0x000000000000-0x000000080000 : "boot"
[    1.373506] 0x000000080000-0x000000180000 : "nvram"
[    1.379603] 0x000000180000-0x000000200000 : "devinfo"
[    1.385899] 0x000000200000-0x000001f00000 : "firmware"
[    1.393160] 2 trx partitions found on MTD device firmware
[    1.398582] Creating 2 MTD partitions on "firmware":
[    1.403636] 0x00000000001c-0x000000400000 : "linux"
[    1.409674] 0x000000400000-0x000001d00000 : "ubi"
[    1.415625] 0x000001f00000-0x000003c00000 : "failsafe"
[    1.422135] 0x000005200000-0x000008000000 : "system"
[    1.429221] bcm_iproc 18029200.spi: using bspi-mspi mode
[    1.436587] libphy: iProc MDIO bus: probed
[    1.440814] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus at 0x(ptrval)
[    1.448301] libphy: mdio_mux: probed
[    1.452243] libphy: mdio_mux: probed
[    2.250162] b53_common: found switch: BCM53125, rev 4
[    2.271291] libphy: Fixed MDIO Bus: probed
[    2.275492] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[    2.281982] bcma-host-soc 18000000.axi: bus0: Found chip with id 53030, rev 0x00 and package 0x00
[    2.291041] bcma-host-soc 18000000.axi: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
[    2.301730] bcma-host-soc 18000000.axi: bus0: Core 1 found: Chipcommon B (manuf 0x4BF, id 0x50B, rev 0x05, class 0x0)
[    2.312551] bcma-host-soc 18000000.axi: bus0: Core 2 found: DMA (manuf 0x4BF, id 0x502, rev 0x04, class 0x0)
[    2.322642] bcma-host-soc 18000000.axi: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.333133] bcma-host-soc 18000000.axi: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.343624] bcma-host-soc 18000000.axi: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.354150] bcma-host-soc 18000000.axi: bus0: Core 6 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.364582] bcma-host-soc 18000000.axi: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.375184] bcma-host-soc 18000000.axi: bus0: Core 8 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.385795] bcma-host-soc 18000000.axi: bus0: Core 9 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.396446] bcma-host-soc 18000000.axi: bus0: Core 10 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x07, class 0x0)
[    2.408544] bcma-host-soc 18000000.axi: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x07, class 0x0)
[    2.419015] bcma-host-soc 18000000.axi: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x07, class 0x0)
[    2.429488] bcma-host-soc 18000000.axi: bus0: Core 13 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
[    2.439777] bcma-host-soc 18000000.axi: bus0: Core 14 found: I2S (manuf 0x4BF, id 0x834, rev 0x03, class 0x0)
[    2.449898] bcma-host-soc 18000000.axi: bus0: Core 15 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
[    2.461340] bcma-host-soc 18000000.axi: bus0: Core 16 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
[    2.474160] bcma-host-soc 18000000.axi: bus0: Core 17 found: ROM (manuf 0x4BF, id 0x508, rev 0x08, class 0x0)
[    2.484317] bcma-host-soc 18000000.axi: bus0: Core 18 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
[    2.496013] bcma-host-soc 18000000.axi: bus0: Core 19 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)
[    2.507475] bcma-host-soc 18000000.axi: bus0: Flash type not supported
[    2.514633] bgmac_bcma bcma0:3: Found PHY addr: 0

Are you able to get to CFE prompt?

No, it is stacked at this stage for a longtime.
The terminal doesn't respond to ctrl+c to enter CFE for flashing it once more.

I tried to reboot multiple times but it is the same output.

[    2.514757] bgmac_bcma bcma0:3: Found PHY addr: 0

Can you try switching the router off for 5 minutes and unplug the power brick from the router?

1 Like

It worked. Need to click Ctrl+C very fast after powering the TTL cable to enter the CFE.

I think as you have said it might be corrupted NVRAM. Since in the first boot after flashing radio0 and radio1 were working:

After reboot (this wifi was no longer working):

Here are the logs after the first boot from flashing then after reboot:
EA9500 Logs after flashing then once more after rebooting

I tried to reflash once more the NVRAM and firmware: then I got this message:

Found a Toshiba NAND flash:
Total size:  128MB
Block size:  128KB
Page Size:   2048B
OOB Size:    64B
Sector size: 512B
Spare size:  16B
ECC level:   8 (8-bit)
Device ID: 0x98 0xf1 0x80 0x15 0xf2 0x16
find_nvram: initializing NVRAM from DEVINFO ...
Corrupted NVRAM found, default devinfo copied into NVRAM.
find_nvram: no nvram found
find_devinfo: devinfo block not found!
find_nvram: initializing NVRAM from DEVINFO ...
Corrupted NVRAM found, default devinfo copied into NVRAM.
find_nvram: no nvram found


CFE version 7.14.131.35 (r612453) based on BBP 1.0.37 for BCM947XX (32bit,SP,)
Build Date: Fri Jan 22 18:07:59 CST 2016 (proc@ubuntu12d04LTS), for the EA9500 board
Copyright (C) 2000-2008 Broadcom Corporation.
Copyright (C) 2016 Arcadyan Corporation.

Flashing all LEDs ...

Init Arena
Init Devs.
Boot partition size = 262144(0x40000)
DDR Clock: 400 MHz
Warning: invalid DDR setting of 0 MHz ignored. DDR frequency will be set to 400 MHz.
Warning: invalid CPU setting of 0 MHz ignored. armclock frequency will be set to 800 MHz.
find_nvram: initializing NVRAM from DEVINFO ...
Corrupted NVRAM found, default devinfo copied into NVRAM.
find_nvram: no nvram found
find_nvram: initializing NVRAM from DEVINFO ...
Corrupted NVRAM found, default devinfo copied into NVRAM.
find_nvram: no nvram found
find_nvram: initializing NVRAM from DEVINFO ...
Corrupted NVRAM found, default devinfo copied into NVRAM.
find_nvram: no nvram found
find_nvram: initializing NVRAM from DEVINFO ...
Corrupted NVRAM found, default devinfo copied into NVRAM.
find_nvram: no nvram found
CPU type 0x0: 800MHz
Tot mem: 262144 KBytes

In case someone face this issue that the ping gives this error:

CFE> ping 192.168.1.10
Could not transmit echo request
192.168.1.10 (192.168.1.10): 0 packets sent, 0 received
*** command status = 1

Check the environment variables, if it is like that it means the router is missing the IP and device and you cannot ping it:

CFE> printenv
Variable Name        Value
-------------------- --------------------------------------------------
BOOT_CONSOLE         uart0
CFE_VERSION          1.0.37
CFE_BOARDNAME        BCM947XX
CFE_MEMORYSIZE       262144
STARTUP              go;

Do the following then reboot:

setenv -p NET_DEVICE eth0
setenv -p NET_IPADDR           192.168.1.1
setenv -p NET_NETMASK          255.255.255.0
setenv -p NET_GATEWAY          0.0.0.0
setenv -p NET_NAMESERVER       0.0.0.0
nvram erase
devinfo commit
reboot

After reboot, make sure to see this message:

Device eth0:  hwaddr 60-38-E0-71-A7-F3, ipaddr 192.168.1.1, mask 255.255.255.0
        gateway not set, nameserver not set

After that enter the CFE prompt. The ethernet device should be working now and TFTP server would work.

2 Likes

Hi friends, first I want to thank all guys who worked so hard to make openwrt happen on Linksys EA9500.
I've just installed 2021-02-15 version on mu EA9500-EU v1 version, following npcomplete great tutorial.
I can see there is luci-app-openvpn installed, but I can install needed packages to make openvpn work. My question is, where can I found packages that match with this kernel version? Or is there a way to upload compatible packages?
Thanks for your help...