Patches patch where?

Hi. I'm confused.
Take a look at the following image

You can see that for the ath9k driver (actually for any driver..) there are at least 2 versions of the same file. One is in "backports" folder and the other is in "linux-5*" folder. There are obviously differences.
So simple question - which one should I patch if I want to, considering that the patch will be applied during build as usual (and resides in the package patches folder for the specific driver/feature).

Thanks

Point to a patch you think is duplicated please.

Whatever is under {patches,backports,hacks}-5.1{0,5} is kernel specific.

1 Like

The thing is that in for example /openwrt/package/kernel/mac80211/patches/ath9k/111-whatever.patch

As I reviewed the other patches they follow this scheme
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c

Which means that it is already pointing somewhere from the mentioned files and I don't know where (and it is preconfigured).
And by your answer I get that this unknown (for me) probably variable/constant is set to either patches,backports,hacks excluding the chance that it is pointing to kernel folder?

I'm still not following what is the question

Easy, in the example which file would you modify/patch from the selected ones in the image ?
Borromini practically tells me to patch the backports folder residing files.

Correct we are using the backport to provide WiFi drivers.

And the various directory there are just to keep things organized... At the end everything is applied to the base backport source

2 Likes

That's what I needed to know.
So "--- a" in the patches is actually the backport folder / source. And that answers the 2nd question that there's somewhere a setting (inclusion path) of the image builder which is configured that "--- a" is backports.

Thanks

Ok now I missed you
What do you mean with --a?

Well there's relative path after "--a" (or "--b" it doesn't matter). So the question was where does the "a" (or "b") files relate to. And I got that's always the backports folder (at least for WiFi drivers).

Of course I still don't know where is the variable in order to have "relative" path and how it is chosen. But anyway you helped for this specific case :slight_smile:

@Rick123 There's two major patch sets at play here:

  • Kernel patches in target/linux/
  • Wireless stack patches in package/kernel/mac80211/

For all those patches, the paths they contain match the paths of the codebase they apply to. For the former, it's the exploded kernel tarball, for the latter, it's the wireless stack backports.

1 Like

Thank you so much man! Nice support from both of you :slight_smile:

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