Found the solution here, I was building the kernel module with the wrong gcc
version.
I was using gcc version 4.9 instead of the original gcc-4.8 from Ubuntu LTS
Trusty 14.04.5 :
$ sudo update-alternatives --config gcc
Il existe 5 choix pour l'alternative gcc (qui fournit /usr/bin/gcc).
Sélection CheminPriorité État
* 0/usr/bin/gcc-4.9 60mode automatique
1/usr/bin/gcc-4.8 60mode manuel
2/usr/bin/gcc-4.9 60mode manuel
3/usr/bin/gcc-5 60mode manuel
4/usr/bin/gcc-6 60mode manuel
5/usr/bin/gcc-7 60mode manuel
Appuyez sur pour conserver la valeur par défaut[*] ou choisissez le
numéro sélectionné :1
update-alternatives: utilisation de « /usr/bin/gcc-4.8 » pour fournir «
/usr/bin/gcc » (gcc) en mode manuel
Therefore I choose (1) for gcc-4.8 and run :
$ sudo dkms remove bcmwl/6.30.223.248+bdcom -k $(uname -r)
Uninstall Beginning
Module: bcmwl
Version: 6.30.223.248+bdcom
Kernel: 4.4.0-121-generic (x86_64)
-
Status: Before uninstall, this module version was ACTIVE on this kernel.
wl.ko:
- Uninstallation
- Deleting from: /lib/modules/4.4.0-121-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod
DKMS: uninstall completed.
--
Deleting module version: 6.30.223.248+bdcom
completely from the DKMS tree.
--
Done.
$ sudo dkms install bcmwl/6.30.223.248+bdcom -k $(uname -r)
Creating symlink /var/lib/dkms/bcmwl/6.30.223.248+bdcom/source ->
/usr/src/bcmwl-6.30.223.248+bdcom
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
applying patch 0001-MODULE_LICENSE.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 156 (offset -3 lines).
applying patch 0002-Makefile.patch...patching file Makefile
Hunk #1 succeeded at 113 with fuzz 1.
Hunk #2 succeeded at 132 with fuzz 2 (offset 1 line).
applying patch 0003-Make-up-for-missing-init_MUTEX.patch...patching file
src/wl/sys/wl_linux.c
Hunk #1 succeeded at 111 with fuzz 2 (offset 12 lines).
applying patch
0010-change-the-network-interface-name-from-eth-to-wlan.patch...patching file
src/wl/sys/wl_linux.c
Hunk #1 succeeded at 221 (offset -14 lines).
applying patch 0011-do-not-define-__devinit-as-__init-in-linux-3.8-as-
__.patch...patching file src/include/linuxver.h
applying patch 0012-add-support-for-Linux-3.15.patch...patching file
src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2071 (offset 230 lines).
applying patch 0013-gcc.patch...patching file Makefile
applying patch 0014-add-support-for-Linux-3.17.patch...patching file
src/wl/sys/wl_linux.c
Hunk #1 succeeded at 1313 (offset -38 lines).
applying patch 0015-add-support-for-Linux-3.18.patch...patching file
src/wl/sys/wl_cfg80211_hybrid.c
applying patch 0016-repair-make-warnings.patch...patching file
src/wl/sys/wl_cfg80211_hybrid.c
applying patch 0017-add-support-for-Linux-4.0.patch...patching file
src/wl/sys/wl_cfg80211_hybrid.c
applying patch 0018-cfg80211_disconnected.patch...patching file
src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2072 (offset 25 lines).
applying patch
0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch...patching file
src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2168 (offset 11 lines).
Building module:
cleaning build area
make KERNELRELEASE=4.4.0-121-generic -C /lib/modules/4.4.0-121-generic/build
M=/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build...
cleaning build area
DKMS: build completed.
wl.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.4.0-121-generic/updates/dkms/
depmod
DKMS: install completed.
$ sudo modprobe -v wl
insmod /lib/modules/4.4.0-121-generic/updates/dkms/wl.ko
$ echo $?
0
$ lsmod | grep -w wl
wl 6365184 0
cfg80211 561152 1 wl
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1766993
Title:
dpkg-reconfigure bcmwl-kernel-source : modprobe: ERROR: could not
insert 'wl': Exec format error
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1766993/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs