Can't create kernel patch following instructions

I feel like the docs at are incomplete.

I have follow the steps until patch creation with quilt new generic/010-ath11k-fix-msi-vector.patch and quilt saying was created, the file is nowhere to be found, quilt edit generic/010-ath11k-fix-msi-vector.patch fails to save saying generic directory doesn't exist and quilt push -a fails similarly:

buildbot@70642b2c845e:~/build_dir/target-x86_64_musl/linux-x86_64/linux-5.15.120$ quilt push -a
Patch generic/010-ath11k-fix-msi-vector.patch does not exist
Applying patch generic/010-ath11k-fix-msi-vector.patch

I'm confused how am I supposed to edit the file, something is off.

I'm trying to apply to x86-64 build (I was able to build the same version as latest snapshot, just need to apply a patch on top now).

After you've created an empty patch, you have to do a

quilt edit <source file to patch>

Not the patch itself.
So in your case

quilt edit drivers/net/wireless/ath/ath11k/pci.c

But that won't help you anyway, due to OpenWrt is using the wireless backports package, and not the wireless drivers from the kernel.

That means, you need to create a patch for the mac80211 package.
Before creating your own patch, just try to put the patch you referencing in the patches/ath11k sub-directory and see if the patch is still applying.

make packge/kernel/mac80211/{clean,prepare} V=s
1 Like

But the sources I'm planning to edit are not in mac80211 package, they are in kmod-ath11k-pci :thinking:

I was looking at where to put my patch and placed it under package/kernel/mac80211/patches/ath11k/0000-ath11k-fix-msi-vector.patch.
Looks like make package/kernel/mac80211/{clean,prepare} V=s picked it up successfully, but kmod-ath11k and kmod-ath11k-pci disappeared from compiled packages.
I tried package/kmod-ath11k-pci and package/kernel/kmod-ath11k-pci, both are saying no rule to make target. Is there a way to compile just that package without the whole image?

kmod-ath11k-pci is part of the mac80211 package and it's built during mac80211 compile.

The kmod alone won't help you (you can't install that on an official Openwrt based image, because the kmod version differs from the official kernel version)
So you need to build a full image and install that.

I have already installed it on latest snapshot (sources I compiled from are either the same or have a few hours of difference in them, so should be close). It crashed though, so there is that.

Anyway, thanks for suggestions, docs are plentiful, but sometimes very hard to make use of without a forum.

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