package/wilc-driver: fix build failure up to Linux 6.1
PATCH 1/1 package/wilc-driver: fix build failure up to Linux 6.1
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aa
--- ...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+) create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch new file +34 -0
@@ -0,0 +1,34 @@ +From f80e4343fa0a4d8b22933d1704c85a771fe234a4 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti <[email protected]> +Date: Wed, 28 Dec 2022 19:56:46 +0100 +Subject: [PATCH] cfg80211.c: fix missing prandom_u32() with Linux >= 6.1.0 + +prandom_u32() previously was only calling get_random_u32() so it's been +dropped with Linux 6.1.0. So let's directly call get_random_u32() if Linux +version >= 6.1.0. + +[Upstream status: https://github.com/embeddedTS/wilc3000-external-module/pull/2] +Signed-off-by: Giulio Benetti <[email protected]> +--- + cfg80211.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/cfg80211.c b/cfg80211.c +index 016aa06..41edd02 100644 +--- a/cfg80211.c ++++ b/cfg80211.c +@@ -1422,7 +1422,11 @@ static int mgmt_tx(struct wiphy *wiphy, + const u8 *vendor_ie; + int ret = 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) ++ *cookie = get_random_u32(); ++#else + *cookie = prandom_u32(); ++#endif + priv->tx_cookie = *cookie; + mgmt = (const struct ieee80211_mgmt *)buf; + +-- +2.34.1 +
package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch new file +44 -0
44 lines not on this page · raw message
package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch new file +98 -0
98 lines not on this page · raw message
package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch new file +216 -0
216 lines not on this page · raw message
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines · On Wed, 28 Dec 2022 21:53:23 +0100 Giulio Benetti…
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>
Quoted 10 lines
--- ...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+) create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
Applied to master, thanks. However, it is worth mentioning that the real "upstream" for this driver is the linux4sam Linux tree at
https://github.com/linux4sam/linux-at91. They are currently based on 5.15, but I suppose they will rebase soon on 6.1, so they might be interested in your fixes. I don't know if/when the out-of-tree variant of the WILC driver at
https://github.com/embeddedTS/wilc3000-external-module gets synced from the linux4sam tree.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Quoted 25 lines
Il giorno 29 dic 2022, alle ore 09:58, Thomas Petazzoni <[email protected]> ha scritto:
On Wed, 28 Dec 2022 21:53:23 +0100
Quoted 15 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>---
...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+)Quoted 4 lines
create mode 100644
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patchcreate mode 100644package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patchcreate mode 100644package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patchcreate mode 100644package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
Quoted 3 lines
Applied to master, thanks. However, it is worth mentioning that the real "upstream" for this driver is the linux4sam Linux tree at
https://github.com/linux4sam/linux-at91.
Ah, yes
Quoted 2 lines
They are currently based on
5.15, but I suppose they will rebase soon on 6.1,
I think so too
Quoted 2 lines
so they might be
interested in your fixes.
How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
Quoted 4 lines
I don't know if/when the out-of-tree variant
of the WILC driver at
https://github.com/embeddedTS/wilc3000-external-module gets synced from the linux4sam tree.
I’ve compared the two drivers and they are pretty the same, not completely but very close excluding the various #ifdef’s. I don’t either know how that repo is handled but I can monitor it.
Best regards
Giulio
Quoted 8 lines
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 39 lines
Il giorno 29 dic 2022, alle ore 23:04, Giulio Benetti <[email protected]> ha scritto:
Hi Thomas,
Quoted 25 lines
Il giorno 29 dic 2022, alle ore 09:58, Thomas Petazzoni <[email protected]> ha scritto:
On Wed, 28 Dec 2022 21:53:23 +0100
Quoted 15 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>---
...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+)Quoted 4 lines
create mode 100644
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patchcreate mode 100644package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patchcreate mode 100644package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patchcreate mode 100644package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patchQuoted 3 lines
Applied to master, thanks. However, it is worth mentioning that the real "upstream" for this driver is the linux4sam Linux tree at
https://github.com/linux4sam/linux-at91.Ah, yes
Quoted 2 lines
They are currently based on
5.15, but I suppose they will rebase soon on 6.1,
Quoted 6 lines
I think so too
Quoted 2 lines
so they might be
interested in your fixes.How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
They don’t have the Issue available in GitHub, I send an email to the maintainer then.
Best regards
Giulio
Quoted 6 lines
Quoted 5 lines
I don't know if/when the out-of-tree variant
of the WILC driver at
https://github.com/embeddedTS/wilc3000-external-module gets synced from the linux4sam tree.
Quoted 14 lines
I’ve compared the two drivers and they are pretty the same, not completely but very close excluding the various #ifdef’s. I don’t either know how that repo is handled but I can monitor it.
Best regards
GiulioQuoted 8 lines
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 3 lines · On Thu, 29 Dec 2022 23:06:55 +0100 Giulio Benetti…
Quoted 1 line
How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
They don’t have the Issue available in GitHub, I send an email to the maintainer then.
Open a pull request.
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
Quoted 8 lines · Thomas Petazzoni via buildroot
Quoted 3 lines · On Thu, 29 Dec 2022 23:06:55 +0100 Giulio Benetti…
Quoted 1 line
How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
They don’t have the Issue available in GitHub, I send an email to the maintainer then.
Open a pull request.
Do you mean once they create a branch for 6.1?
Or even against 5.15, 5.10 etc. if there are changes that regard those versions?
Sorry but it's not clear to me what you mean.
Best regards
Signature · 6 lines
Giulio Benetti CEO/CTO@Benetti Engineering sas _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · On Sat, 31 Dec 2022 18:51:34 +0100 Giulio Benetti…
Quoted 1 line
Open a pull request.
Do you mean once they create a branch for 6.1?
Or even against 5.15, 5.10 etc. if there are changes that regard those versions?Sorry but it's not clear to me what you mean.
You have a point. Indeed, until they start moving to 6.1, there's not much you can do :-/
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas, Kris, All,
Quoted 5 lines · Thomas Petazzoni via buildroot
Quoted 2 lines · On Sat, 31 Dec 2022 18:51:34 +0100 Giulio Benetti…
Quoted 1 line
Open a pull request.
Quoted 8 lines
Quoted 5 lines
Do you mean once they create a branch for 6.1?
Or even against 5.15, 5.10 etc. if there are changes that regard those versions?Sorry but it's not clear to me what you mean.
You have a point. Indeed, until they start moving to 6.1, there's not much you can do :-/
linux-6.1-mchp branch is out:
https://github.com/linux4sam/linux-at91/tree/linux-6.1-mchp
I've already built with WILC1000 support and it built successfully, so no need for other patches on my side.
Kris, if you're interested you can merge their changes into your repository for WILC1000 if there is some enhancement.
Best regards
Signature · 6 lines
Giulio Benetti CEO/CTO@Benetti Engineering sas _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
All,
I accidentally replied out of the thread and I wanted to follow up here just to make sure it got organized in the right place. See my previous message here:
https://lists.buildroot.org/pipermail/buildroot/2023-January/659164.html
Quoted 43 lines · Giulio Benetti
Hi Thomas,
Quoted 25 lines
Il giorno 29 dic 2022, alle ore 09:58, Thomas Petazzoni <[email protected]> ha scritto:
On Wed, 28 Dec 2022 21:53:23 +0100
Quoted 15 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>---
...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+)Quoted 4 lines
create mode 100644
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patchcreate mode 100644package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patchcreate mode 100644package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patchcreate mode 100644package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patchQuoted 3 lines
Applied to master, thanks. However, it is worth mentioning that the real "upstream" for this driver is the linux4sam Linux tree at
https://github.com/linux4sam/linux-at91.Ah, yes
Quoted 2 lines
They are currently based on
5.15, but I suppose they will rebase soon on 6.1,I think so too
Quoted 2 lines
so they might be
interested in your fixes.How can I point my fixes? Do you think it’s enough to open an Issue in linux-at91 GitHub?
Quoted 7 lines
Quoted 4 lines
I don't know if/when the out-of-tree variant
of the WILC driver at
https://github.com/embeddedTS/wilc3000-external-module gets synced from the linux4sam tree.I’ve compared the two drivers and they are pretty the same, not completely but very close excluding the various #ifdef’s. I don’t either know how that repo is handled but I can monitor it.
The external is currently a release tag (or a few) behind. The latest changes in the linux4sam kernel tree remove a lot of the #ifdefs as you noted which ends up preventing it from compiling against older kernels.
We've tested the external tree against 4.9, 5.10, and 5.15 with success.
-Kris
Quoted 13 lines
Best regards
GiulioQuoted 8 lines
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>
Quoted 11 lines
--- ...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+) create mode 100644 package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patch create mode 100644 package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patch create mode 100644 package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patch create mode 100644 package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patch
Giulio, all,
I figure this is the most appropriate place to have a discussion on this topic as these patches were also pushed to our github repo:
https://github.com/embeddedTS/wilc3000-external-module/
I want to note that we are not intending on doing any maintenance or patch work on this driver, except to keep this driver functional on our platforms. It is maintained as a buildable external module of this folder tree:
https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchip
We did this because during the Microchip takeover they abandoned their maintained external tree as well as halted any plans to bring WILC3000 support to the kernel upstream. Our fork gives us easy access to building the modules without having to keep pulling changes in to all of our kernels.
I'm not sure the best way to go about handling these patches as Microchip is currently only maintaining support for 5.15 it appears. I also don't want to pollute our external module tree with fixes that arn't in the upstream we're pulling in.
Giulio, would you be willing to attempt pushing these changes to the Microchip repo?
Does it make more sense to just leave these as patches to the driver in Buildroot?
Would it make sense to instead apply some limits to the package or external module to only build on already compatible kernel versions?
-Kris
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Kris, Thomas, All,
Quoted 24 lines · Kris Bahnsen
Quoted 15 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>--- ...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+)Quoted 5 lines
create mode 100644
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patchcreate mode 100644package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patchcreate mode 100644package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patchcreate mode 100644package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patchGiulio, all,
Quoted 7 lines
I figure this is the most appropriate place to have a discussion on this topic as these patches were also pushed to our github repo:
https://github.com/embeddedTS/wilc3000-external-module/I want to note that we are not intending on doing any maintenance or patch work on this driver, except to keep this driver functional on our platforms.
Oh, I thought the goal was to keep the module successfully building
through all Linux versions like we usually have in Buildroot for other
packages. For example all the Wi-Fi modules(i.e. rtlxxx packages) and gpu(mali-driver, sunxi-mali-utgard, kernel-module-imx-gpu-viv etc.) or other out of tree drivers.
Quoted 3 lines
It is maintained as a buildable external module
of this folder tree:
https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchip
The problem is that with that we can't build for older Linux versions and this is one of our goals. Someone can be interested in having it running on Linux 4.x or earlier.
Quoted 6 lines
We did this because during the Microchip takeover they abandoned their maintained external tree as well as halted any plans to bring WILC3000 support to the kernel upstream. Our fork gives us easy access to building the modules without having to keep pulling changes in to all of our kernels.
Quoted 7 lines
I'm not sure the best way to go about handling these patches as Microchip is currently only maintaining support for 5.15 it appears. I also don't want to pollute our external module tree with fixes that arn't in the upstream we're pulling in.
Giulio, would you be willing to attempt pushing these changes to the Microchip repo?
Yes, this is the idea once they create the 6.1 branch, at least I expect they will do it soon since it's the new Linux LTS version. Then for sure I will open a PR without all the #ifdef's I've created in the PR I've opened to your Repo. Of course those patches will be usable only for Linux 6.1 and that's it.
Quoted 2 lines
Does it make more sense to just leave these as patches to the driver in Buildroot?
Not very much, because they must be reworked over the time and they will continue to increase along with Linux versions. For sure we hope WILC1000/3000 will be totally upstreamed at a certain point. But anyway we will need your repository(or a fork of it) to keep all the #ifdef's for LINUX_VERSION to support it on old Linux versions.
Quoted 3 lines
Would it make sense to instead apply some limits to the package or external module to only build on already compatible kernel versions?
I'd like to support the driver for any possible Linux version like we do for the other drivers in Buildroot.
I understand that there is an effort on your side to test the changes you pull, but this will keep your repository aligned with the latest Linux versions and it will be build-tested a lot with our autobuilders.
This is my 2 cents. I leave the last answers to the maintainers, Thomas is one of them.
Best regards!
Signature · 6 lines
Giulio Benetti CEO/CTO@Benetti Engineering sas _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Giulio,
Quoted 35 lines · Giulio Benetti
Hi Kris, Thomas, All,
Quoted 24 lines · Kris Bahnsen
Quoted 15 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>--- ...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+)Quoted 5 lines
create mode 100644
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patchcreate mode 100644package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patchcreate mode 100644package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patchcreate mode 100644package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patchGiulio, all,
Quoted 7 lines
I figure this is the most appropriate place to have a discussion on this topic as these patches were also pushed to our github repo:
https://github.com/embeddedTS/wilc3000-external-module/I want to note that we are not intending on doing any maintenance or patch work on this driver, except to keep this driver functional on our platforms.
Quoted 5 lines
Oh, I thought the goal was to keep the module successfully building through all Linux versions like we usually have in Buildroot for other packages. For example all the Wi-Fi modules(i.e. rtlxxx packages) and
gpu(mali-driver, sunxi-mali-utgard, kernel-module-imx-gpu-viv etc.)or other out of tree drivers.
Not quite. We decided to carve the tree from Microchip and make it externally buildable. We submitted it to Buildroot because it had appeared that the WILC support was neglected by Microchip. We took that opportunity to at least keep the firmware up to date while also giving any supported platforms a more up-to-date access to a driver.
We've been mostly relying on upstream from Microchip (and have an outstanding driver bug open with them for the WILC3000 that has been in process for the better part of 4 months) and touching bits that make sense to touch that do not impact function.
Quoted 8 lines
Quoted 4 lines
It is maintained as a buildable external module
of this folder tree:
https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchipThe problem is that with that we can't build for older Linux versions and this is one of our goals. Someone can be interested in having it running on Linux 4.x or earlier.
Which is why we havn't pulled in their latest round of changes and any feature updates from them we now have to carefully navigate.
Quoted 12 lines
Quoted 12 lines
We did this because during the Microchip takeover they abandoned their maintained external tree as well as halted any plans to bring WILC3000 support to the kernel upstream. Our fork gives us easy access to building the modules without having to keep pulling changes in to all of our kernels.
I'm not sure the best way to go about handling these patches as Microchip is currently only maintaining support for 5.15 it appears. I also don't want to pollute our external module tree with fixes that arn't in the upstream we're pulling in.
Quoted 8 lines
Quoted 2 lines
Giulio, would you be willing to attempt pushing these changes to the Microchip repo?
Yes, this is the idea once they create the 6.1 branch, at least I expect they will do it soon since it's the new Linux LTS version. Then for sure I will open a PR without all the #ifdef's I've created in the PR I've opened to your Repo. Of course those patches will be usable only for Linux 6.1 and that's it.
If we pull future patches in from linux4wilc tree, we will be careful not to upset the existing #ifdef madness to keep backward compatible support. But we do want to avoid getting ahead of linux4wilc if we can so if those changes do come in eventually, we can avoid an excessive amount of conflicts.
Quoted 9 lines
Quoted 3 lines
Does it make more sense to just leave these as patches to the driver in Buildroot?
Not very much, because they must be reworked over the time and they will continue to increase along with Linux versions. For sure we hope WILC1000/3000 will be totally upstreamed at a certain point. But anyway we will need your repository(or a fork of it) to keep all the #ifdef's for
LINUX_VERSIONto support it on old Linux versions.
Unfortunately, while WILC1000 support is upstream, WILC3000 will not be upstreamed (according to a conversation with Microchip a few months back). This means unless they have a change of heart, someone else takes ownership, or we take ownership of the driver, it will likely remain locked to Microchip's kernel and this external module will continue to exist as needed.
Quoted 8 lines
Quoted 4 lines
Would it make sense to instead apply some limits to the package or external module to only build on already compatible kernel versions?
I'd like to support the driver for any possible Linux version like we do for the other drivers in Buildroot.
Quoted 6 lines
I understand that there is an effort on your side to test the changes you pull, but this will keep your repository aligned with the latest Linux versions and it will be build-tested a lot with our autobuilders.
This is my 2 cents. I leave the last answers to the maintainers, Thomas is one of them.
We're not opposed to the idea, just hesitant to taking on that kind of ownership.
We're doing some porting work at the moment, to get our LTS platforms all up to kernel 5.10. From there, we may start pushing basic support for various platforms to upstream kernel. I think once we get there we would be more receptive to ownership of the WILC3000 driver to keep our platforms running.
Quoted 2 lines
Best regards!
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Kris,
Quoted 88 lines · Kris Bahnsen via buildroot
Giulio,
Quoted 35 lines · Giulio Benetti
Hi Kris, Thomas, All,
Quoted 24 lines · Kris Bahnsen
Quoted 15 lines · Giulio Benetti
Add patches pending upstream[0] to handle various data types and api changes up to Linux 6.1.
[0]: https://github.com/embeddedTS/wilc3000-external-module/pull/2
Fixes:
http://autobuild.buildroot.net/results/6aa7475a21a6060e9fce3552f73e6e7100a8b2aaSigned-off-by Giulio Benetti <[email protected]>--- ...missing-prandom_u32-with-Linux-6.1.0.patch | 34 +++ ...fix-build-failure-on-remove-callback.patch | 44 ++++ ...uild-failure-with-Linux-5.19-and-6.1.patch | 98 ++++++++ ...on_parameters-Linux-6.1-build-failur.patch | 216 ++++++++++++++++++ 4 files changed, 392 insertions(+)Quoted 5 lines
create mode 100644
package/wilc-driver/0001-cfg80211.c-fix-missing-prandom_u32-with-Linux-6.1.0.patchcreate mode 100644package/wilc-driver/0002-spi.c-fix-build-failure-on-remove-callback.patchcreate mode 100644package/wilc-driver/0003-cfg80211.c-fix-build-failure-with-Linux-5.19-and-6.1.patchcreate mode 100644package/wilc-driver/0004-Fix-struct-station_parameters-Linux-6.1-build-failur.patchGiulio, all,
Quoted 7 lines
I figure this is the most appropriate place to have a discussion on this topic as these patches were also pushed to our github repo:
https://github.com/embeddedTS/wilc3000-external-module/I want to note that we are not intending on doing any maintenance or patch work on this driver, except to keep this driver functional on our platforms.
Quoted 5 lines
Oh, I thought the goal was to keep the module successfully building through all Linux versions like we usually have in Buildroot for other packages. For example all the Wi-Fi modules(i.e. rtlxxx packages) and
gpu(mali-driver, sunxi-mali-utgard, kernel-module-imx-gpu-viv etc.)or other out of tree drivers.Not quite. We decided to carve the tree from Microchip and make it externally buildable. We submitted it to Buildroot because it had appeared that the WILC support was neglected by Microchip. We took that opportunity to at least keep the firmware up to date while also giving any supported platforms a more up-to-date access to a driver.
We've been mostly relying on upstream from Microchip (and have an outstanding driver bug open with them for the WILC3000 that has been in process for the better part of 4 months) and touching bits that make sense to touch that do not impact function.
Quoted 8 lines
Quoted 4 lines
It is maintained as a buildable external module
of this folder tree:
https://github.com/linux4sam/linux-at91/tree/master/drivers/net/wireless/microchipThe problem is that with that we can't build for older Linux versions and this is one of our goals. Someone can be interested in having it running on Linux 4.x or earlier.
Which is why we havn't pulled in their latest round of changes and any feature updates from them we now have to carefully navigate.
Quoted 12 lines
Quoted 12 lines
We did this because during the Microchip takeover they abandoned their maintained external tree as well as halted any plans to bring WILC3000 support to the kernel upstream. Our fork gives us easy access to building the modules without having to keep pulling changes in to all of our kernels.
I'm not sure the best way to go about handling these patches as Microchip is currently only maintaining support for 5.15 it appears. I also don't want to pollute our external module tree with fixes that arn't in the upstream we're pulling in.
Quoted 8 lines
Quoted 2 lines
Giulio, would you be willing to attempt pushing these changes to the Microchip repo?
Yes, this is the idea once they create the 6.1 branch, at least I expect they will do it soon since it's the new Linux LTS version. Then for sure I will open a PR without all the #ifdef's I've created in the PR I've opened to your Repo. Of course those patches will be usable only for Linux 6.1 and that's it.
Quoted 5 lines
If we pull future patches in from linux4wilc tree, we will be careful not to upset the existing #ifdef madness to keep backward compatible support. But we do want to avoid getting ahead of linux4wilc if we can so if those changes do come in eventually, we can avoid an excessive amount of conflicts.
I understand
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Does it make more sense to just leave these as patches to the driver in Buildroot?
Not very much, because they must be reworked over the time and they will continue to increase along with Linux versions. For sure we hope WILC1000/3000 will be totally upstreamed at a certain point. But anyway we will need your repository(or a fork of it) to keep all the #ifdef's for
LINUX_VERSIONto support it on old Linux versions.
Quoted 6 lines
Unfortunately, while WILC1000 support is upstream, WILC3000 will not be upstreamed (according to a conversation with Microchip a few months back). This means unless they have a change of heart, someone else takes ownership, or we take ownership of the driver, it will likely remain locked to Microchip's kernel and this external module will continue to exist as needed.
Ok
Quoted 15 lines
Quoted 8 lines
Quoted 4 lines
Would it make sense to instead apply some limits to the package or external module to only build on already compatible kernel versions?
I'd like to support the driver for any possible Linux version like we do for the other drivers in Buildroot.
Quoted 6 lines
I understand that there is an effort on your side to test the changes you pull, but this will keep your repository aligned with the latest Linux versions and it will be build-tested a lot with our autobuilders.
This is my 2 cents. I leave the last answers to the maintainers, Thomas is one of them.
Quoted 8 lines
We're not opposed to the idea, just hesitant to taking on that kind of ownership.
We're doing some porting work at the moment, to get our LTS platforms all up to kernel 5.10. From there, we may start pushing basic support for various platforms to upstream kernel. I think once we get there we would be more receptive to ownership of the WILC3000 driver to keep our platforms running.
Sorry for the late reply.
Ok then, PR is there pending whenever and if you want to merge or ask for changes.
Best regards
Signature · 6 lines
Giulio Benetti CEO/CTO@Benetti Engineering sas _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot