Files
clear-linux-documentation/tutorials/broadcom.html
2024-11-04 18:48:51 +00:00

349 lines
20 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Broadcom* Drivers &#8212; Documentation for Clear Linux* project</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/bizstyle.css?v=5283bb3d" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../_static/copybutton.js?v=a56c686a"></script>
<script src="../_static/bizstyle.js"></script>
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/tutorials/broadcom.html" />
<link rel="icon" href="../_static/favicon.ico"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Docker*" href="docker.html" />
<link rel="prev" title="Apache* Hadoop*" href="apache-hadoop.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--[if lt IE 9]>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="docker.html" title="Docker*"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="apache-hadoop.html" title="Apache* Hadoop*"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Documentation for Clear Linux* project</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Broadcom* Drivers</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="broadcom-drivers">
<span id="broadcom"></span><h1>Broadcom* Drivers<a class="headerlink" href="#broadcom-drivers" title="Link to this heading"></a></h1>
<p>Broadcom manufactures wireless network interfaces, including devices that
support WiFi and Bluetooth® technology.</p>
<p>Broadcom wireless devices on Linux* have a lot of different combinations of
possible required software depending on the exact model of your device. These
combinations of software can overlap and conflict, creating an additional
challenge to get working.</p>
<p>As with most hardware devices, two components are needed for complete
functionality: a device driver and device firmware. These instructions show
how to identify Broadcom wireless hardware and configure a Clear Linux OS system with
the correct drivers and firmware for functionality.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>The Linux community has documented solutions and caveats for using specific
Broadcom devices on Linux over time. It is worth doing research on your
particular device model to see what others have already encountered.</p>
</div>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#identify-your-device-model" id="id1">Identify your device model</a></p></li>
<li><p><a class="reference internal" href="#drivers" id="id2">Drivers</a></p></li>
<li><p><a class="reference internal" href="#firmware" id="id3">Firmware</a></p></li>
<li><p><a class="reference internal" href="#troubleshooting" id="id4">Troubleshooting</a></p></li>
</ul>
</nav>
<section id="identify-your-device-model">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Identify your device model</a><a class="headerlink" href="#identify-your-device-model" title="Link to this heading"></a></h2>
<p>Broadcom device models start with BCM in the name and are identified by the
PCI vendor ID 14e4. To identify the exact model of Broadcom device you have
installed:</p>
<ol class="arabic">
<li><p>Run the commands below:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>lspci<span class="w"> </span>-vnn<span class="w"> </span>-d<span class="w"> </span>14e4:
</pre></div>
</div>
</li>
</ol>
<p>Once the device model has been identified, you can cross-reference which
drivers support it.</p>
</section>
<section id="drivers">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Drivers</a><a class="headerlink" href="#drivers" title="Link to this heading"></a></h2>
<section id="brcmfmac-and-brcmsmac">
<h3>brcmfmac and brcmsmac<a class="headerlink" href="#brcmfmac-and-brcmsmac" title="Link to this heading"></a></h3>
<p><em>brcmfmac</em> and <em>brcmsmac</em>, historically known as <em>brcm80211</em>, are open-source
drivers for some newer Broadcom devices. These drivers are available in the
upstream Linux kernel, are enabled in the Clear Linux OS kernels, and will be
automatically loaded if a compatible device is detected.</p>
<ol class="arabic">
<li><p>See if your device is listed on the support matrix of this driver:
<a class="reference external" href="https://wireless.wiki.kernel.org/en/users/Drivers/brcm80211#supported_chips">https://wireless.wiki.kernel.org/en/users/Drivers/brcm80211#supported_chips</a></p>
<p>It is important to note that not all functionality is developed for these
drivers yet. If you are looking for specific functionality, be sure to
review the “To be done” list.</p>
</li>
<li><p>The firmware for cards supported by the <em>brcmfmac</em> and <em>brcmsmac</em> drivers
are usually made available. Continue reading the <a class="reference internal" href="#firmware">Firmware</a> section of
this document.</p></li>
</ol>
</section>
<section id="b43-and-b43legacy">
<h3>b43 and b43legacy<a class="headerlink" href="#b43-and-b43legacy" title="Link to this heading"></a></h3>
<p><em>b43</em> and <em>b43legacy</em> are community reverse-engineered open-source drivers for
some newer and older Broadcom devices. These drivers are available in the
upstream Linux kernel, are enabled in the Clear Linux OS kernels, and will be
automatically loaded if a compatible device is detected.</p>
<ol class="arabic simple">
<li><p>See if your device is listed on the support matrix of this driver:
<a class="reference external" href="https://wireless.wiki.kernel.org/en/users/Drivers/b43#list_of_hardware">https://wireless.wiki.kernel.org/en/users/Drivers/b43#list_of_hardware</a></p></li>
<li><p>The firmware for cards supported by the <em>b43</em> and <em>b43legacy</em> drivers
usually needs to be sourced and installed manually. Continue reading the
<a class="reference internal" href="#firmware">Firmware</a> section of this document.</p></li>
</ol>
</section>
<section id="broadcom-wl">
<h3>broadcom-wl<a class="headerlink" href="#broadcom-wl" title="Link to this heading"></a></h3>
<p><em>broadcom-wl</em>, also known as <em>broadcom-sta</em> or <em>wl</em>, is the proprietary closed
source driver from Broadcom and tends to work only for older devices. It is
also unmaintained and needs to be patched to work with newer kernels (&gt;=4.7).
As such, it is not part of the Linux kernel, cannot be distributed by Clear Linux OS,
and has to be built as an out-of-tree kernel module.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>It is recommended to use the <a class="reference internal" href="../guides/clear/compatible-kernels.html#compatible-kernels"><span class="std std-ref">LTS kernel</span></a> if you
have to use this driver.</p>
</div>
<ol class="arabic">
<li><p>See if your device is supported and download the <strong>Linux* STA 64-bit
driver</strong> from
<a class="reference external" href="https://www.broadcom.com/support/download-search?pg=&amp;pf=Wireless+LAN+Infrastructure">Broadcoms download website</a>
or another trusted source.</p></li>
<li><p>Extract the downloaded archive into a separate folder. For example:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir<span class="w"> </span>./broadcom-wl/
tar<span class="w"> </span>xvf<span class="w"> </span>./hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz<span class="w"> </span>-C<span class="w"> </span>broadcom-wl/
<span class="nb">cd</span><span class="w"> </span>./broadcom-wl/
</pre></div>
</div>
</li>
<li><p>Create a patches folder in the source tree and copy any necessary patches
to it. You will have to research which specific set of patches are required
for the running kernel version. The <a class="reference external" href="https://github.com/gentoo/gentoo/tree/master/net-wireless/broadcom-sta/files">gentoo repository for broadcom-sta</a>
is a good place to start looking for up-to-date patches.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir<span class="w"> </span>./patches/
</pre></div>
</div>
</li>
<li><p><a class="reference internal" href="../guides/kernel/kernel-modules-dkms.html#kernel-modules-dkms-install-begin"><span class="std std-ref">Install the DKMS bundle</span></a> for your
kernel. DKMS provides the framework to automatically rebuild the wl driver
against new kernels versions from Clear Linux OS updates.</p></li>
<li><p>In the extracted driver directory, create a <code class="file docutils literal notranslate"><span class="pre">dkms.conf</span></code> file based
the contents below to provide DKMS information about how to build and
install the kernel module. This example uses version <em>6.30.223.271</em>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cat<span class="w"> </span><span class="s">&lt;&lt;&#39;EOF&#39; &gt;&gt; dkms.conf</span>
<span class="s">PACKAGE_NAME=broadcom-wl</span>
<span class="s">PACKAGE_VERSION=6.30.223.271</span>
<span class="s">MAKE=&quot;make KBASE=/lib/modules/${kernelver}&quot;</span>
<span class="s">CLEAN=&quot;make KBASE=/lib/modules/${kernelver} clean&quot;</span>
<span class="s">BUILT_MODULE_NAME=wl</span>
<span class="s">DEST_MODULE_LOCATION=/kernel/drivers/net/wireless</span>
<span class="s">AUTOINSTALL=yes</span>
<span class="s">EOF</span>
</pre></div>
</div>
</li>
<li><p>Add the filename of any patches previously added to the <code class="file docutils literal notranslate"><span class="pre">patches</span></code>
folder to the <code class="file docutils literal notranslate"><span class="pre">dkms.conf</span></code> file so that DKMS applies them to the
driver source before building. Below are example patch names to show the
format used in <code class="file docutils literal notranslate"><span class="pre">dkms.conf</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;PATCH[0]=&quot;</span>first.patch<span class="s2">&quot; &gt;&gt; dkms.conf</span>
<span class="s2">echo &quot;</span>PATCH<span class="o">[</span><span class="m">1</span><span class="o">]=</span><span class="s2">&quot;second.patch&quot;</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>dkms.conf
<span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;PATCH[2]=&quot;</span>third.patch<span class="s2">&quot; &gt;&gt; dkms.conf</span>
</pre></div>
</div>
</li>
<li><p>Copy the directory to the dkms tree. This example uses version
<em>6.30.223.271</em>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>cp<span class="w"> </span>-Rv<span class="w"> </span>.<span class="w"> </span>/usr/src/broadcom-wl-6.30.223.271
</pre></div>
</div>
</li>
<li><p>Run the <strong class="command">dkms</strong> commands to add the broadcom-wl module to the dkms
tree, build it, and install it. This example uses version <em>6.30.223.271</em>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dkms<span class="w"> </span>add<span class="w"> </span>-m<span class="w"> </span>broadcom-wl<span class="w"> </span>-v<span class="w"> </span><span class="m">6</span>.30.223.271
sudo<span class="w"> </span>dkms<span class="w"> </span>install<span class="w"> </span>-m<span class="w"> </span>broadcom-wl<span class="w"> </span>-v<span class="w"> </span><span class="m">6</span>.30.223.271
</pre></div>
</div>
</li>
<li><p>Blacklist all other variations of Broadcom drivers from loading to prevent
conflicts and problems.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/modprobe.d/
sudo<span class="w"> </span>tee<span class="w"> </span>/etc/modprobe.d/broadcom.conf<span class="w"> </span>&gt;<span class="w"> </span>/dev/null<span class="w"> </span><span class="s">&lt;&lt;&#39;EOF&#39;</span>
<span class="s">blacklist b43</span>
<span class="s">blacklist b43legacy</span>
<span class="s">blacklist ssb</span>
<span class="s">blacklist bcm43xx</span>
<span class="s">blacklist brcm80211</span>
<span class="s">blacklist brcmfmac</span>
<span class="s">blacklist brcmsmac</span>
<span class="s">blacklist bcma</span>
<span class="s">EOF</span>
</pre></div>
</div>
</li>
<li><p>Reboot the system and check that the module is loaded and working. If not,
try manually updating dependencies and loading the module.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>depmod<span class="w"> </span>-a
modprobe<span class="w"> </span>wl
</pre></div>
</div>
</li>
</ol>
</section>
</section>
<section id="firmware">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Firmware</a><a class="headerlink" href="#firmware" title="Link to this heading"></a></h2>
<p>In addition to device drivers, devices require firmware that gets loaded onto
the device directly.</p>
<p>Firmware for Broadcom devices are not fully open-source and not always
licensed for redistribution. Clear Linux OS kernel bundles <a class="reference internal" href="../guides/kernel/firmware.html#firmware-included-begin"><span class="std std-ref">include the
linux-firmware bundle</span></a> which contains the firmware
binaries that are able to be redistributed. If your devices firmware is part
of the linux-firmware repository, nothing else is needed. This is usually
the case for devices supported by the <em>brcmfmac</em> and <em>brcmsmac</em> drivers.</p>
<p>In other cases, firmware may need to be obtained or extracted manually from a
trusted source because it is not licensed for distribution. This is usually
the case for devices supported by the <em>b43</em> and <em>b43legacy</em> drivers. Obtaining
these firmware is out of scope for this document, however there is information
about solutions to this problem available on the <a class="reference external" href="http://linuxwireless.sipsolutions.net/en/users/Drivers/b43/#firmware">Linux wireless wiki</a>.</p>
<p>On Clear Linux OS systems, firmware should be placed in <code class="file docutils literal notranslate"><span class="pre">/etc/firmware</span></code>. See the
<a class="reference internal" href="../guides/kernel/firmware.html#firmware"><span class="std std-ref">Firmware</span></a> documentation for more information on loading custom
firmware.</p>
</section>
<section id="troubleshooting">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Troubleshooting</a><a class="headerlink" href="#troubleshooting" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>See which drivers are currently loaded with the <strong class="command">lsmod</strong> and
<strong class="command">modinfo</strong> commands.</p></li>
<li><p>If your device is not showing up or having intermittent issues, ensure the
card is not blocked by the kernel with the <strong class="command">rfkill</strong> command.</p></li>
<li><p>Try blacklisting all the other variations of drivers not intended to be
used. In some cases, the wrong device driver will be loaded causing
problems.</p></li>
<li><p>If an external firmware image is required, it may be trying to load from a
different path than expected. Check the output of <strong class="command">sudo dmesg |
grep -i firmware</strong> for firmware loading issues.</p></li>
</ul>
<p><em>The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by Intel Corporation is under license.</em></p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
</a></p>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Broadcom* Drivers</a><ul>
<li><a class="reference internal" href="#identify-your-device-model">Identify your device model</a></li>
<li><a class="reference internal" href="#drivers">Drivers</a><ul>
<li><a class="reference internal" href="#brcmfmac-and-brcmsmac">brcmfmac and brcmsmac</a></li>
<li><a class="reference internal" href="#b43-and-b43legacy">b43 and b43legacy</a></li>
<li><a class="reference internal" href="#broadcom-wl">broadcom-wl</a></li>
</ul>
</li>
<li><a class="reference internal" href="#firmware">Firmware</a></li>
<li><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="apache-hadoop.html"
title="previous chapter">Apache* Hadoop*</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="docker.html"
title="next chapter">Docker*</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/tutorials/broadcom.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="docker.html" title="Docker*"
>next</a> |</li>
<li class="right" >
<a href="apache-hadoop.html" title="Apache* Hadoop*"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Documentation for Clear Linux* project</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" >Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Broadcom* Drivers</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2022 Intel Corporation. All Rights Reserved..
Last updated on Nov 04, 2024.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
</div>
</body>
</html>