Build for Linksys EA9500


#83

Everything compiled OK similar size as your firmware file and I have now your build on one partition and mine on the other.
Still have issues with wifi. Here is a screenshot from my configuration page

31 PM

As you see I don't have a choice to change channels and so on.

The /etc/config/wireless looks like this

config wifi-device 'radio0'
option type 'mac80211'
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 country 'US'
option channel 'auto'
option legacy_rates '0'

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

root@EA9500-Lede:/etc/config# dmesg |grep mac
[ 4.348258] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[ 4.591385] bgmac_bcma bcma0:3: Found PHY addr: 30 (NOREGS)
[ 4.596999] bgmac_bcma bcma0:3: Support for Roboswitch not implemented
[ 4.603545] bgmac_bcma bcma0:3: Invalid MAC addr: 00:00:00:00:00:00
[ 4.609826] bgmac_bcma bcma0:3: Using random MAC: a6:30:bd:44:fb:c4
[ 4.630151] bgmac_bcma bcma0:4: Found PHY addr: 30 (NOREGS)
[ 4.635767] bgmac_bcma bcma0:4: Support for Roboswitch not implemented
[ 4.642317] bgmac_bcma bcma0:4: Invalid MAC addr: 00:00:00:00:00:00
[ 4.648602] bgmac_bcma bcma0:4: Using random MAC: f2:60:4f:f3:d4:6f
[ 4.656046] bgmac_bcma bcma0:5: Found PHY addr: 30 (NOREGS)
[ 4.661639] bgmac_bcma bcma0:5: Support for Roboswitch not implemented
[ 4.669338] bgmac_bcma bcma0:6: Unsupported core_unit 3
[ 4.674639] bgmac_bcma: probe of bcma0:6 failed with error -524
[ 22.665513] usbcore: registered new interface driver brcmfmac
[ 22.677104] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
[ 22.850131] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4366c-pcie.bin for chip 0x004366(17254) rev 0x000004
[ 23.052911] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[ 23.443133] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 23 2016 17:19:51 version 10.10.69.69 (r625687) FWID 01-8438621f
[ 27.148899] bgmac_bcma bcma0:5 eth2: Link is Up - 1Gbps/Full - flow control off

should I be worried about the error?

brcm/brcmfmac4366c-pcie.txt failed with error -2

Thanks


#84

Good work!

The error wrt .txt can be ignored. The brcmfmac module tries loads firmware first in .txt format then .bin format.

The problem with WiFi seems to be detection of pci lanes. Can you try to copy the December build's wireless config to your build? I doubt that will work. Maybe the device tree (dts) needs to have the pci lanes defined.


#85

Thanks for the help so far.
I did copy it and it did not help

you mentioned in an earlier reply

Also, make sure to edit /etc/rc.local file where I force the bootpartition to 0

I looked there and you don't have the boot partition but only the partialboots set to 0
Is there something I should set?
The changing of the partitions does not seem to work perfect

I end up going back to the serial connection and reload your build
What I noticed I can not upload my build over tftp like i can with yours. I get an error right away.
Did you have to do something to the firmware so it can be uploaded via tftp?
Thanks again for your patience.


#86

You can ignore the rc.local. My bad, somehow I remember setting it.

Can you try upgrading your firmware using UI.


#87

That's so far the only way I can load my firmware using the UI. that works

I did load yours with serial (I moded the router and add a 3.5mm headphone jack to it so I don't need to open it anymore )
flash -noheader 192.168.1.10:/ea9500.trx nflash0.trx
flash -noheader 192.168.1.10:/ea9500.trx nflash1.trx
flash -noheader 192.168.1.10:/ea9500.trx nflash0.trx2
flash -noheader 192.168.1.10:/ea9500.trx nflash1.trx2

Than I loaded my firmware with the UI from your firmware


#88

I can't see any reason why your firmware cannot be loaded via serial. Are you switching to correct partition after you flash via serial?


#89

I found the problem
The computer I compiled the firmware and transfer the firmware is not the same
So when I copied it to my transfer computer the tftpserver did not have the right to transfer

chmod 0777 filename did the trick

my bad

Now it worked and I got it installed. I do have wireless working "only on one antenna so far", but a step in the right direction.

Thanks


#90

Great job with the new build!! I installed it and I got perfect performance on both 5Ghz Antennas. I could not get this on the last build.

It's been running since this morning.

What did you change on the Wi-Fi setup? To get the performance boosted?


#91

I'm glad it is has improved. Although, I haven't changed anything specific to wifi. However, wifi stub (brcmfmac) is actively being developed and improved with every kernel bump.

Cheers!


#92

Can you share your .config again? greatly appreciated.
I want to compile again so I can compile other packages myself

Thanks


#93

I'm cleaning up few things. Will upload the patch by weekend.
Uploaded!


#94

When I'm applying the patch i get the following error

patch -p1 < ea9500-4.14.patch
The next patch would create the file ea9500-4.14.patch,
which already exists!  Assume -R? [n] y
patching file ea9500-4.14.patch
Not deleting file ea9500-4.14.patch as content differs from patch
patching file package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch
patching file target/linux/bcm53xx/Makefile
patching file target/linux/bcm53xx/base-files/etc/board.d/01_leds
patching file target/linux/bcm53xx/base-files/etc/board.d/02_network
patching file target/linux/bcm53xx/config-4.14
patching file target/linux/bcm53xx/image/Makefile
patching file target/linux/bcm53xx/patches-4.14/9999-ARM-BCM5301X-Specify-switches-for-Linksys-Panamera.patch
patching file target/linux/generic/config-4.14

Should this be a problem? Or is it ok?


#95

Re download the patch and when applying just say 'n' and continue


#96

Thanks

But my my make process stops with errors -- any idea

 CC [M]  /home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.o
/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.c: In function 'jool_init':
/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.c:155:10: error: implicit declaration of function 'nf_register_hooks'; did you mean 'nf_register_net_hooks'? [-Werror=implicit-function-declaration]
  error = nf_register_hooks(nfho, ARRAY_SIZE(nfho));
          ^~~~~~~~~~~~~~~~~
          nf_register_net_hooks
/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.c: In function 'jool_exit':
/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.c:187:2: error: implicit declaration of function 'nf_unregister_hooks'; did you mean 'nf_unregister_net_hooks'? [-Werror=implicit-function-declaration]
  nf_unregister_hooks(nfho, ARRAY_SIZE(nfho));
  ^~~~~~~~~~~~~~~~~~~
  nf_unregister_net_hooks
cc1: some warnings being treated as errors
scripts/Makefile.build:320: recipe for target '/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.o' failed
make[5]: *** [/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful/nf_hook.o] Error 1
Makefile:1506: recipe for target '_module_/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful' failed
make[4]: *** [_module_/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/mod/stateful] Error 2
make[4]: Leaving directory '/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/linux-4.14.20'
Makefile:113: recipe for target '/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/.built' failed
make[3]: *** [/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/jool-997a81bb5f5e9d82aa122fd37b7c890e44a245dd/.built] Error 2
make[3]: Leaving directory '/home/gunter/lede1/feeds/packages/net/jool'
package/Makefile:106: recipe for target 'package/feeds/packages/jool/compile' failed
make[2]: *** [package/feeds/packages/jool/compile] Error 2
make[2]: Leaving directory '/home/gunter/lede1'
package/Makefile:102: recipe for target '/home/gunter/lede1/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.package_compile' failed
make[1]: *** [/home/gunter/lede1/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/gunter/lede1'
/home/gunter/lede1/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

#97

Quick fix is to disable jool package in .config.
If you care about it, then modify the jool/Makefile and remove the version and hash.


#98

I was not successful compiling my own firmware with the latest kernel yet.
Still running into errors

You send me a link earlier

Just extract this5 to your source root (next to target folder) then rebuild. You will also need to enable ip-bridge and ip-full packages. Cheers!

Do I need to use the same link, or did you change something?

Also question about the 2 partition. I loaded you December build on one and the new one on the other.

I uploaded your new build

flash -noheader 192.168.1.10:/ea9500.trx nflash0.trx
flash -noheader 192.168.1.10:/ea9500.trx nflash1.trx

than I changed the ip to 192.168.2.11

Now I loaded your December build

flash -noheader 192.168.1.10:/ea9500.trx nflash0.trx2
flash -noheader 192.168.1.10:/ea9500.trx nflash1.trx2

entered this code
nvram set bootpartition=1 && nvram set partialboots=0 && nvram commit
to load the December build

It boots up the December (kernel 4.9) build, but it already has the ip of the new build. Am I missing something on how to switch partitions? Or they are sharing some of the parameter in the nvram which I also need to change?

Sorry for all this questions.

Thanks


#99
  1. Yes please use the same link for files. The link above it same
  2. I've not played with dual partitions that much unfortunately. It could be that it does share the config some how.

#100

Hi there

Got further, but now I'm stuck with appliing this patch

Applying ./patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch.orig using plaintext: 
patching file drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
Hunk #1 succeeded at 63 with fuzz 2 (offset 40 lines).
Hunk #2 succeeded at 114 with fuzz 2 (offset 42 lines).

Applying ./patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch.rej using plaintext: 
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch
|+++ package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch failed!  Please fix ./patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch.rej!
Makefile:1843: recipe for target '/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/backports-2017-11-01/.prepared_f2ba43d031cc91e0925a1ae573783550_6664517399ebbbc92a37c5bb081b5c53' failed
make[3]: *** [/home/gunter/lede1/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx/backports-2017-11-01/.prepared_f2ba43d031cc91e0925a1ae573783550_6664517399ebbbc92a37c5bb081b5c53] Error 1
make[3]: Leaving directory '/home/gunter/lede1/package/kernel/mac80211'
package/Makefile:106: recipe for target 'package/kernel/mac80211/compile' failed
make[2]: *** [package/kernel/mac80211/compile] Error 2
make[2]: Leaving directory '/home/gunter/lede1'
package/Makefile:102: recipe for target '/home/gunter/lede1/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.package_compile' failed
make[1]: *** [/home/gunter/lede1/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/gunter/lede1'
/home/gunter/lede1/include/toplevel.mk:216: recipe for target 'world' failed

#101

Give me couple of hours. I'll try the patch on a clean git clone and fix it if it's broken.


#102

i erased the file
./patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch.rej
and compiled again and it worked.
I'm up and running with my compiled firmware with functional wifi for the first time. Before I could never get the wifi working

Thanks for all the help