How to install driver for broadcom 43142

@puneetse
thank you a lot , for guiding me almost step by step.
i use linux for fun. so if i manage to get this work out means clear linux forum teams are GREAT.

1 Like

That is expected when the kernel updates. The module needs to be built against the running kernel version.

DKMS (which I showed how to add this module to in a previous post) automates it for you.

1 Like

Thanks but if I not connected to internet the line ā€˜swupd bundle-add linux-devā€™ works ?

No. Youā€™ll need to find an alternate way to temporarily connect that system to the Internet.

If you donā€™t have alternative way to connect to the Internet, you can do the following:

  1. The packages included in the bundle is available in clearlinux/clr-bundle repository.

  2. Most packages are available in clearlinux-pkgs repository, you can review them to decide what should be installed. Or you can just install all packages.

  3. You can download the RPMs from ā€œhttps://download.clearlinux.org/releases/31540/clear/x86_64/os/Packagesā€. Just replace 31540 with the OS version you have.

  4. RPMs could be installed via rpm2cpio command. You can find some examples in this forum.

I do recommend that anyone who is using DKMS or any sort of out-of-tree kernel module, that you switch to using one of the LTS kernels. You will have to spend a lot less recompiling your kernel modules as those kernels update much less frequently.

After the update to 32650, ā€œmodprobe wlā€ fails with ā€œERROR:could not insert ā€˜wlā€™ : Exec format errorā€. Any help would be appreciated. Thank you.
(EDIT: I reverted to using the latest LTS kernel and now my wifi is working again using the solution on this thread.)

After attempting to update the broadcom drivers listed in this thread, to the newest 5.6 kernel, I get a make error, part of which statesā€¦ā€˜ioremap_nocacheā€™; did you mean ā€˜ioremap_cacheā€™?..
Doing a web search, I find that this driver needs a patch (https://salsa.debian.org/broadcom-sta-team/broadcom-sta/-/commit/8ce8c7f) to the kernel in order to bypass this ā€œmakeā€ error.
Is it possible for me to be able to patch the kernel to accomplish this with the linked patch?
Thank you.

It looks like that is a patches to the driver in that repository to support kernel 5.6, not a patch to the kernel itself. Youā€™ll probably need to apply the patch to the source code in that repository.

you had said DKMS automates the install for me.

$ git clone https://github.com/antoineco/broadcom-wl.git
$ sudo cp -R broadcom-wl/ /usr/src/broadcom-wl-6.30.223.271
$ sudo dkms install -m broadcom-wl -v 6.30.223.271

why particular 6.30.223.271 was used?

and is cp -R broadcom-wl should be done after make?

To clarify DKMS will automate rebuilding the existing driver version against new kernel versions. You still need to update the driver source code and tell DKMS about if there is a breaking change between it and the kernel.

The 6.30.223.271 number came from the github repository you linked with the out-of-tree driver.

You should not run make manually if youā€™re using DKMS. Only copy the source to /usr/src and have proper dkms.conf file. DKMS will call make and do the build of the driver.

How to create proper dkms.conf file?

I found that dell has its dkms github page. My laptop is dell with broadcom 43142.

Youā€™ll need to do some research and try for yourself to get familiar with dkms.conf syntax and consult with upstream repo maintainers. Some repo maintainers provide a dkms.conf that just works. Some do not.

The Clear Linux documentation shows some examples https://docs.01.org/clearlinux/latest/guides/kernel/kernel-modules-dkms.html

ok, thank you for your reply. I think this is a bit beyond my ability, so I will continue to use the lts2019 5.4.38 kernel which works perfectly with this driver.
cheers.

I suggest people to use the lts kernel, when they use dkms module.

Yes, Iā€™ve found that this is really the proper solution when using dkms.

Thanks for the hints in here. I installed Clear Linux today for the first time and ran into the same problem.
lspci lists among others
05:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)

I followed the instructions as above:

sudo swupd bundle-add linux-dev
git clone https://github.com/antoineco/broadcom-wl.git
cd broadcom-wl/
make
sudo make install
sudo depmod -A
sudo modprobe -r bcma
sudo -s
mkdir /etc/modprobe.d
echo "blacklist bcma" > /etc/modprobe.d/broadcom.conf
mkdir /etc/modules-load.d
echo "wl" > /etc/modules-load.d/wl.conf
depmod -a
modprobe wl
but then run into this error message:
modprobe: ERROR: could not insert 'wl': Key was rejected by service

I searched for this error message but did not find anything that helps with that. It also didn't change after adding echo "module.sig_unenforce" | sudo tee /etc/kernel/cmdline.d/allow-unsigned-modules.conf

Any hints are greatly appreciated, also please let me know any missing information that I should include.

Sorry for troubling you. I rebooted, made a make clean, then followed all again (fourth time), rebooted once again and now the driver works. No idea why but no need to reply any more.

You need sudo for this.

Thank you but some lines above was
sudo -s
Therefore, it works as is.