Build for Linksys EA9500

You have to edit the dts patch and remove the BCH section.

Is this the change?

diff --git a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
index b6750f70dffb..ea1b3f5eff29 100644
--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
@@ -7,7 +7,7 @@
/dts-v1/;

#include "bcm47094.dtsi"
-#include "bcm5301x-nand-cs0-bch8.dtsi"
+#include "bcm5301x-nand-cs0-bch1.dtsi"

/ {
compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708";

Could I just change the 8 with 1 and recompile?

Correct, that's what you want to get rid of.

@npcomplete - since each and every one of us has already passed the "flash from scratch" I would suggest everything possible to bring your commits to the official community build branches -- even if we need to flash it again. I already love how the device behaves under a clean OS, started to get addicted to the freedom.
Let's call your next build "phoenix" that rises from ashes to redevelop itself :slight_smile:
How high are the chances that Lede/OpenWRT will incorporate the changes and start to build some official builds?

Thanks for your message and I agree to what you say. People using these builds have already flashed using serial cable. However, it's been over a year of smooth updates and the new build will break the norm people have been used to. Hence my hesitation and need to get everyone's approval.

I have been sending patches that should be accepted upstream. Mind you this is a slow process and I will try to create these builds till the patches are merged into OpenWrt.

That being said, I will wait for people to vote and plan to release a build on Cinco de Mayo :slight_smile:

1 Like

Instructions for flashing May 3rd build:

  1. Enter CFE prompt and use Serial cable to flash and reboot
    flash -noheader 192.168.1.10:/openwrt.trx nflash0.trx
  2. You will see a lot of ECC errors, don't worry, let the router do it's thing until you see log stop moving.
  3. Reboot the router and enter CFE prompt.
  4. Flash using serial cable again and reboot.
  5. When the log stops moving. Run this:
    cat /dev/mtd1 > /tmp/nvram && mtd write /tmp/nvram /dev/mtd1
  6. Reboot and you should be all set.
2 Likes

I did it no problems so far just followed your instructions.

:slight_smile:

1 Like

For building from source is the change to the file:

arch/arm/boot/dts/bcm47094-linksys-panamera.dts

@@ -7,7 +7,7 @@
-#include “bcm5301x-nand-cs0-bch8.dtsi”

+#include “bcm5301x-nand-cs0-bch1.dtsi”

The only change you did? Does this create the new /dev/mtd1 file?

what does this command really do?

cat /dev/mtd1 > /tmp/nvram && mtd write /tmp/nvram /dev/mtd1

It saves the /dev/mtd1 file into /tmp/nvram and then writes it back into /dev/mtd1 ? what do I misunderstand here? if I read the values from one location and than save it back isn't it just the same values again? I probably don't know what mtd exactly does.

Thanks for all the work you do here.

@linbox delete these exact lines from the patch:

+@@ -7,7 +7,7 @@
+ /dts-v1/;
+ 
+ #include "bcm47094.dtsi"
+-#include "bcm5301x-nand-cs0-bch8.dtsi"
++#include "bcm5301x-nand-cs0-bch1.dtsi"
+ 
+ / {
+   compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708";

Using wrong ECC i.e BCH-1 caused two mtd partitions, nvram and firmware to incorrectly store ECC checksum for blocks of data stored on flash chip. This hardware supports 8 bit ECC checksum which is more error tolerant and we must be using that instead.

nvram partition corresponds to mtd1 partition while firmware corresponds to mtd3. CFE environment works in ECC BCH-8 mode as intended by the manufacturer while our previous firmware was BCH-1. Hence the only way to correctly write the flash is using software that talks BCH-8 i.e. CFE or serial port method.

Now, once we have the BCH-8 firmware on the router, we can fix the nvram partition. To do this we have to re-write the nvram in BCH-8 mode.

cat /dev/mtd1 > /tmp/nvram && mtd write /tmp/nvram /dev/mtd1

All we are doing here is reading nvram to ram and re-writing it in BCH-8 mode where the ECC checksum is recalculated correctly.

1 Like

A post was split to a new topic: Power supply for Linksys EA9500

Just want to ask, we got our router RMA'd recently, and we got given a V2 unit :frowning_face: am I correct when i say it's not supported by this ROM?

Thanks!

Nope unfortunately, V2 is a 64bit quad core router - completely new architecture. Btw, I own a Asus GT-AC5300 which uses the same SoC/architecture. When I have enough time I'll take stab at that - but no promises :wink:

i have a second EA9500 and i also upgraded that one, but I'm getting still this errors in the kernel log

[    1.623614] mtd_read error while parsing (offset: 0x5200000): -74
[    1.630408] mtd_read error while parsing (offset: 0x5220000): -74
[    1.637195] mtd_read error while parsing (offset: 0x5240000): -74
[    1.643985] mtd_read error while parsing (offset: 0x5260000): -74
[    1.650773] mtd_read error while parsing (offset: 0x5280000): -74
[    1.657562] mtd_read error while parsing (offset: 0x52A0000): -74
[    1.664354] mtd_read error while parsing (offset: 0x52C0000): -74

[   16.551340] print_req_error: I/O error, dev mtdblock6, sector 198400
[   16.558410] print_req_error: I/O error, dev mtdblock6, sector 198400
[   16.564783] Buffer I/O error on dev mtdblock6, logical block 24800, async page read
[   16.580331] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   16.592238] block: extroot: not configured
[   16.611400] mount_root: switching to ubifs overlay
[   16.640108] urandom-seed: Seeding with /etc/urandom.seed
[   16.687093] procd: - early -
[   16.690396] procd: - watchdog -
[   16.988309] print_req_error: I/O error, dev mtdblock6, sector 198400
[   16.995375] print_req_error: I/O error, dev mtdblock6, sector 198400
[   17.001742] Buffer I/O error on dev mtdblock6, logical block 24800, async page read
[   17.243600] print_req_error: I/O error, dev mtdblock6, sector 198400

Wed Dec 31 19:00:27 1969 kern.info kernel: [   21.085954] pci 0001:00:00.0: enabling device (0140 -> 0142)
Wed Dec 31 19:00:27 1969 kern.info kernel: [   21.091773] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
Wed Dec 31 19:00:27 1969 kern.info kernel: [   21.224267] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4366c-pcie.bin for chip 0x004366(17254) rev 0x000004
Wed Dec 31 19:00:27 1969 kern.warn kernel: [   21.240028] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
Wed Dec 31 19:00:27 1969 kern.err kernel: [   24.052205] brcmfmac: brcmf_pcie_download_fw_nvram: FW failed to initialize
Wed Dec 31 19:00:27 1969 kern.err kernel: [   26.345692] Error: Driver 'gpio-keys' is already registered, aborting...
Wed Dec 31 19:00:27 1969 kern.info kernel: [   26.379112] l2tp_ppp: PPPoL2TP kernel driver, V2.0
Wed Dec 31 19:00:27 1969 kern.err kernel: [   26.387330] Error: Driver 'gpio-keys' is already registered, aborting...
Wed Dec 31 19:00:27 1969 user.err kernel: [   26.420277] kmodloader: 1 module could not be probed
Wed Dec 31 19:00:27 1969 user.err kernel: [   26.425364] kmodloader: - gpio_keys - 0
Wed Dec 31 19:00:27 1969 kern.warn kernel: [   26.460228] pci_generic_config_write32: 9 callbacks suppressed
Wed Dec 31 19:00:27 1969 kern.warn kernel: [   26.460239] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
Wed Dec 31 19:00:27 1969 daemon.notice procd: /etc/rc.d/S19btrfs-scan: Scanning for Btrfs filesystems
Wed Dec 31 19:00:27 1969 kern.warn kernel: [   27.423069] print_req_error: 8 callbacks suppressed
Wed Dec 31 19:00:27 1969 kern.err kernel: [   27.423075] print_req_error: I/O error, dev mtdblock6, sector 198400
Wed Dec 31 19:00:27 1969 kern.err kernel: [   27.435070] print_req_error: I/O error, dev mtdblock6, sector 198400
Wed Dec 31 19:00:27 1969 kern.err kernel: [   27.441440] Buffer I/O error on dev mtdblock6, logical block 24800, async page read

this router also only gives me 2 wireless networks.
I had this issue since I got this one 1 month ago.

This part of the log on the router that gives me 3 devices looks like this

Tue May  8 22:34:30 2018 kern.info kernel: [   24.258596] pci 0001:00:00.0: enabling device (0140 -> 0142)
Tue May  8 22:34:30 2018 kern.info kernel: [   24.264631] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
Tue May  8 22:34:30 2018 kern.info kernel: [   24.440159] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4366c-pcie.bin for chip 0x004366(17254) rev 0x000004
Tue May  8 22:34:30 2018 kern.warn kernel: [   24.454003] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
Tue May  8 22:34:30 2018 kern.warn kernel: [   24.844853] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2
Tue May  8 22:34:30 2018 kern.info kernel: [   24.855270] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available(err=-2), device may have limited channels available
Tue May  8 22:34:30 2018 kern.info kernel: [   24.866562] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 23 2016 17:19:51 version 10.10.69.69 (r625687) FWID 01-8438621f
Tue May  8 22:34:30 2018 user.info kernel: [   24.896052] kmodloader: done loading kernel modules from /etc/modules.d/*
Tue May  8 22:34:31 2018 user.notice : Added device handler type: tunnel
Tue May  8 22:34:31 2018 user.notice : Added device handler type: Network device
Tue May  8 22:3

Any idea or should your last image solve this?

Here is my /etc/config/wireless

root@EA9500b:/etc/config# cat wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path '18000000.axi/bcma0:7/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:01.0/0000:03:00.0'
	option htmode 'VHT80'
	option country '00'
	option legacy_rates '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'EA9500-5b'
	option encryption 'psk'
	option key 'xxxxxxx'
	option wps_pushbutton '0'

config wifi-device 'radio1'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path '18000000.axi/bcma0:7/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:02.0/0000:04:00.0'
	option htmode 'HT20'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

I'm not sure why this should happen. Did you upgrade to latest firmware using serial port as mentioned in the notes?

yes I did just as you have explained. I compiled my own firmware as well and have the same things with your and my firmware.

It seems to work otherwise and I don't need to have the 3rd wireless.

The errors worry me a little bit so

Do you think maybe reloading the original firmware could help.
How would you load this? The same commands over serial as we load lede onto the device?
I might give it a try.

Yes try it and let me know.

I'm out of town for a week but will try when i come back
should the regular serial command work with the original image

flash -noheader 192.168.1.10:/openwrt.trx nflash0.trx

as it is not a trx file

Download the Non-US firmware, strip out the 256 bytes at the end and save it as trx. It will work.

I just tried before I left out of town

Thanks That worked now I got 3 radios going! I could not log into the firmware somehow the username was Taylor? But I just uploaded LEDE again and so far so good
Still some of these

mtd_read error while parsing (offset: 0x52C0000): -74

but otherwise ok