Build updated ath10k modules on the 19.07.3 tag ... how :)

My goal is to build the tagged version 19.07.3 with more recent ath10k modules and firmware.

  1. I looked at the master branch package/kernel/ath10k-ct/Makefile and modified the one in 19.07./3 to match the PKG_SOURCE_VERSION thinking that would provide me with the more updated code.
    Is this correct?
---
 package/kernel/ath10k-ct/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index c46c3a834e..52caa5c70d 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2019-09-09
-PKG_SOURCE_VERSION:=5e8cd86f90dac966d12df6ece84ac41458d0e95f
-PKG_MIRROR_HASH:=dc1097f3a7b4b7e346918f206746d00a0b7df07ae3be9b89be55dfaef3cbbe45
+PKG_SOURCE_DATE:=2020-04-29
+PKG_SOURCE_VERSION:=3637be6f6baf99e85a7f0b27f80a99a2f2a5f78d
+PKG_MIRROR_HASH:=97cf22a4a57381c7eb7a9b8a8b1e347e9711ce51c89db971b4ab9a35af476ece
 
 # Build the 4.19 ath10k-ct driver version.  Other options are "-4.16", or
 # leave un-defined for 4.7 kernel.  Probably this should match as closely as
-- 
2.27.0

I build and installed the image, but found that I did not get updated ath10k-ct modules per dmesg. What am I missing?

# dmesg | grep ath10k | grep ver
[   11.918171] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x46.
[   12.420962] ath10k_pci 0000:01:00.0: firmware ver 10.4b-ct-9984-fW-013-d81f62d97 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 46b728ef
[   20.898253] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[   21.031071] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x46.
[   21.457890] ath10k_pci 0001:01:00.0: firmware ver 10.4b-ct-9984-fW-013-d81f62d97 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 46b728ef
[   30.088560] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1

Place the files under files/ and they will be packaged into your firmware image.

files/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
files/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin

Thanks for the tip. That takes care of the firmware files but I am more interested in getting the most updated commit of ath10k-ct so I can compile the kernel modules against that. Modifying the Makefile as I showed didn't seem to do it.

You do not have to. Just build with the default packages and then overwrite the individual files with the latest.

I don't think that's right for the modules. I believe they need to be compiled. The firmware can be dropped in. Please correct me if I am mistaken.

It works for me and I use this same approach to build my firmware: the image builder pulls all packages and kernel modules and then overwrites the firmware and board files.
I also used to replace these two files on a running router all the time. Just do not overwrite them: rename the installed ones, copy the new ones, and reboot.

Again, for firmware, I think that approach works, but for modules, I think they need to be compiles.

@hnyman - Can you clarify?

You may think anything, but this approach works. Ath10k kmod does not need to be recompiled.

If you want the updated -ct driver (in addition to firmware files), you need to compile that along the kernel.

Or if you use imagebuilder, you need to in use driver kmod compiled along the kernel used in imagebuilder. The kmod used needs to match the kernel.

But if you want the quite updated thing, I suggest that you use master instead of 19.07. master works quite ok, and has much more updated mac80211 core driver, hostapd and of course ath10k-ct.

Note that handling ath10k-ct firmware files versioning and makefiles has changed in master.

Ps. And make sure to clearly specify if it is about ath10k-ct or the old mainline ath10k.

1 Like

@hnyman - OK , I thought so.

OK. I do not understand the difference between these two. I am experiencing issues with iphones under 19.07.3 and want to try a more updated ath10k driver/firmware to see if my issues have been addressed upstream.

  1. Is 19.07.3 using ath10k-ct?
  2. Which of the two option, "ath10k-ct" or "old mainline ath10k" would you point me to when compiling master?

I suggest that you try my r7800 community builds, as you can test three driver options.

  • 19.07 with -ct. Somewhat aged version of CT driver and firmware. Old hostapd and mac80211.
  • Master with -ct. Up-to-date everything.
  • Master with mainline ath10k. Up-to-date everything.

See which works best for you.

Mainline ath10k is in upstream Linux sources while -ct is an semiofficial sidetrack that is more actively developed. Both have had troubles, and there has been extensive discussion on r7800 exploration thread in the last two years. Read that thread. Both work ok with all my own client devices.

Master is better than 19.07 on my personal opinion.

@hnyman - OK! Thank you for that helpful reply.

I want to initially try the semiofficial sidetrack, and you've convinced me to build master. So, in the spirit of learning, I would like to build master-r13474-2f5a242f67 as you did and are currently offering. Is this correct to build:

git clone https://git.openwrt.org/openwrt/openwrt.git
git checkout 2f5a242f67
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig

I will setup the menuconfig for my R7800 and include some stuff I like to use (kmod-usb-storage, kmod-fs-ext4, luci-app-aqm, etc.), then build. Thanks!

No need to checkout the exact commit. Just build from the master's head.

(But otherwise the command looks ok)

1 Like

Thanks again, build was successful and it is running smoothly so far :smiling_face_with_three_hearts:

I think I finally figured out the answer to my original question, how to build 19.07.3 with the updated ath10k-ct and ath10k-ct-firmware:

I modified the corresponding Makefile for each of the packages and then built against the 19.07 branch. You can apply this patch on top of the 19.07 branch if you wish.

2 Likes

Hope your wifi is stable during the last days?
thank you for providing this patch to us, i will give it a try.
But at first I had maybe a stupid question, when i had to do the patch?
before i run make (after finishing menuconfig)
or before ./scripts/feeds install -a ?
feels like it's been ages since I used a patch ...

You can apply the patch prior to building and after you updated your feeds.

patch -Np1 -i /path/to/downloaded.patch

As an FYI, I forked and modified those files in an attempt to troubleshoot an ongoing issue with some iphones on my network with the ath10k-ct driver/firmware. I have since just built and am using master with "old" mainline ath10k drivers. The -ct stuff (most updated version) causes problems for me.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.