Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel 4.2 fix #6

Closed
s7dhansh opened this issue Aug 10, 2015 · 21 comments
Closed

Kernel 4.2 fix #6

s7dhansh opened this issue Aug 10, 2015 · 21 comments

Comments

@s7dhansh
Copy link

Can you please add this fix?

https://gist.github.com/boesing/ae0777c0095a1d8d317f

Thank you.

@longsleep
Copy link
Owner

Please try branch linux-4.2 and let me know if that works for you.

@s7dhansh
Copy link
Author

Hey, thanks for replying.
The 4.2 has another issue related to 'workqueue' due to which bcmwl
installation fails even after fixing the cfg function issue.
For fixing that, I need to compile the kernel after applying a patch. Not
getting enough time these days. Once I am free will try it definitely.

On Tue, Aug 11, 2015, 2:22 AM Simon Eisenmann notifications@github.com
wrote:

Please try branch linux-4.2 and let me know if that works for you.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@longsleep
Copy link
Owner

I guess you mean

FATAL: modpost: GPL-incompatible module wl.ko uses GPL-only symbol 'flush_workqueue'
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1389: recipe for target 'modules' failed
make: *** [modules] Error 2

You can workaround this, by changing the module license to GPL in https://github.com/longsleep/bcmwl-ubuntu/blob/master/debian/patches/0001-MODULE_LICENSE.patch before you build the debian package. No need to compile the Kernel. Just make sure to report this to the Kernel developers so they can make the symbol available for non-GPL modules.

@s7dhansh
Copy link
Author

Yes.
Oh Thanks. I did it. The kernel was installed successfully. Thank you.

Sudhanshu

On Tue, Aug 11, 2015 at 2:12 PM, Simon Eisenmann notifications@github.com
wrote:

I guess you mean

FATAL: modpost: GPL-incompatible module wl.ko uses GPL-only symbol 'flush_workqueue'
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1389: recipe for target 'modules' failed
make: *** [modules] Error 2

You can workaround this, by changing the module license to GPL in
https://github.com/longsleep/bcmwl-ubuntu/blob/master/debian/patches/0001-MODULE_LICENSE.patch
before you build the debian package. No need to compile the Kernel. Just
make sure to report this to the Kernel developers so they can make the
symbol available for non-GPL modules.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@longsleep
Copy link
Owner

The following Kernel commit causes the GPL problem. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/workqueue.c?id=37b1ef31a568fc02e53587620226e5f3c66454c8 - I do not see any easy way to make this work again.

@s7dhansh
Copy link
Author

They were supposed to fix it in 4.2rc6 :
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-rc6-unstable/0002-debian-changelog.patch
See the Tim Gardner fix: 'workqueue: Make flush_workqueue() available again
to non GPL modules'

But somehow it wasn't working. I did not dig much though.

I hope it will be fixed in the next releases though.

Sudhanshu

On Wed, Aug 12, 2015 at 12:49 AM, Simon Eisenmann notifications@github.com
wrote:

The following Kernel commit causes the GPL problem.
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/workqueue.c?id=37b1ef31a568fc02e53587620226e5f3c66454c8

  • I do not see any easy way to make this work again.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@astephanh
Copy link

Hi, running on MacBookAir7,1 the shutdown always crashes the kernel with null pointer dereference error.

@longsleep
Copy link
Owner

@s7dhansh - well that fix is in the ubuntu mainline builds, but has not been merged into the 4.2 kernel tree (see https://lkml.org/lkml/2015/8/4/802)
@astephanh - how does that relate to this issue?

@longsleep
Copy link
Owner

Should that patch be applied to the 4.2 tree, the bcmwl will need another fix at

#define flush_scheduled_work() flush_scheduled_tasks()
so it calls flush_workqueue directly.

@jbtrystram
Copy link

Hello,

the linux-4.2 branch compile successfully (after installing dh-modaliases and debhelper packages). however, i can't install the deb package :

Building initial module for 4.2.0-040200-generic
ERROR (dkms apport): kernel package linux-headers-4.2.0-040200-generic is not supported
Error! Bad return status for module build on kernel: 4.2.0-040200-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/make.log for more information.
modprobe: FATAL: Module wl not found.

any idea ?

@longsleep
Copy link
Owner

Well look into /var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/make.log - that should have all the ugly details.

@jbtrystram
Copy link

FATAL: modpost: GPL-incompatible module wl.ko uses GPL-only symbol 'flush_workqueue'

I see in the preview link you posted that is supposed to be done in 4.3 ?
No wifi until then ?:(

@longsleep
Copy link
Owner

@jbtrystram Well - if you compile yourself you can fix it by declaring this module a GPL module - see #6 (comment)

@jbtrystram
Copy link

changed to +MODULE_LICENSE("GPL"); in debian/patches/0001-MODULE-LISCENCE.patch
i have the same error when compliling :(

@longsleep
Copy link
Owner

@jbtrystram: Well then you did something wrong. Note that you need to rebuild the debian package and then install the newly built one. Check your change and make sure the changed file is in your installed Debian package.

@jbtrystram
Copy link

Works indeed :)
Was having some git-related issues.
Thanks for this awesome works and your help !

nokout added a commit to nokout/bcmwl-ubuntu that referenced this issue Sep 1, 2015
as per this issue in parent repo... longsleep#6
longsleep added a commit that referenced this issue Sep 4, 2015
Added support for Kernel 4.2 fixing #6 - Even if Kernel 4.2 does not have https://lkml.org/lkml/2015/8/4/775 - the Ubuntu Kernel has a local fix, so merging the 4.2 branch.
@longsleep
Copy link
Owner

I merged the 4.2 support. Note that the mainline kernel still has not allowed flush_workqueue to be used from non GPL Kernels. The Ubuntu 4.2 Kernel has the patch locally though.

@longsleep
Copy link
Owner

If you use Ubuntu 15.10 with Kernel 4.2 you no longer need my patched version. For older Ubuntu versions you can install the Ubuntu mainline Kernel (http://kernel.ubuntu.com/~kernel-ppa/mainline/) and use my ppa (https://launchpad.net/~longsleep/+archive/ubuntu/bcmwl) which i just updated for 15.04 and 14.04.

@longsleep
Copy link
Owner

I just saw that the fix for the license problem was merged to mainline kernel tree (see https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/workqueue.c?id=7d3e2eb1786fafa186eb8bc276edef75ba69e023) - so we can expect to have this resolved eventually.

@brunano21
Copy link

I saw that this issue is the same of mine here #10.
Any suggestion?

edcarter added a commit to edcarter/bcmwl-ubuntu that referenced this issue Sep 14, 2015
@edcarter
Copy link

@brunano21 I compiled the patch changing the licence to "GPL" and then hosted it on my git: https://github.com/edcarter/bcmwl-ubuntu/tree/master. The compiled binary is in the root so you can just download that and try it out.

cstrahan added a commit to cstrahan/nixpkgs that referenced this issue Sep 20, 2015
Also cherry-pick a licensing fix from torvalds/linux@7d3e2eb1786
necessary for building broadcom-sta on kernel 4.2.

For more details, see:
longsleep/bcmwl-ubuntu#6

Closes NixOS#9948
cstrahan added a commit to NixOS/nixpkgs that referenced this issue Sep 20, 2015
Also cherry-pick a licensing fix from torvalds/linux@7d3e2eb1786
necessary for building broadcom-sta on kernel 4.2.

For more details, see:
longsleep/bcmwl-ubuntu#6

Fixes #9948.
cstrahan added a commit to NixOS/nixpkgs that referenced this issue Sep 20, 2015
Also cherry-pick a licensing fix from torvalds/linux@7d3e2eb1786
necessary for building broadcom-sta on kernel 4.2.

For more details, see:
longsleep/bcmwl-ubuntu#6

Fixes #9948.

(cherry picked from commit f08fb6e)
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
Also cherry-pick a licensing fix from torvalds/linux@7d3e2eb1786
necessary for building broadcom-sta on kernel 4.2.

For more details, see:
longsleep/bcmwl-ubuntu#6

Fixes NixOS#9948.

(cherry picked from commit f08fb6e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants