Files
clear-linux-documentation/guides/kernel/firmware.html
2024-11-04 18:48:51 +00:00

218 lines
12 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>Firmware &#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/guides/kernel/firmware.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="Capture Kernel Boot Messages in the Journal" href="kernel-boot-msg.html" />
<link rel="prev" title="Change Kernel Boot" href="change-kernel-boot.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="kernel-boot-msg.html" title="Capture Kernel Boot Messages in the Journal"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="change-kernel-boot.html" title="Change Kernel Boot"
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">Guides</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Firmware</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="firmware">
<span id="id1"></span><h1>Firmware<a class="headerlink" href="#firmware" title="Link to this heading"></a></h1>
<p>This guide shows how Clear Linux* OS handles firmware and microcode loading.</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#overview" id="id2">Overview</a></p></li>
<li><p><a class="reference internal" href="#included-firmware" id="id3">Included firmware</a></p></li>
<li><p><a class="reference internal" href="#additional-firmware-loading" id="id4">Additional firmware loading</a></p></li>
<li><p><a class="reference internal" href="#cpu-microcode-loading" id="id5">CPU microcode loading</a></p></li>
<li><p><a class="reference internal" href="#troubleshooting" id="id6">Troubleshooting</a></p></li>
</ul>
</nav>
<section id="overview">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Overview</a><a class="headerlink" href="#overview" title="Link to this heading"></a></h2>
<p>Many devices and system components require firmware or microcode, software
that runs directly on the device, to function correctly. Because firmware
loading requires privileged hardware access, the kernel is involved in the
process.</p>
<p>Firmware does not typically come with source code. Instead, firmware is
provided as binary blobs which are licensed for free or non-free use.</p>
<p>In Clear Linux OS firmware is loaded during device initialization which typically
happens at boot time.</p>
</section>
<section id="included-firmware">
<span id="firmware-included-begin"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Included firmware</a><a class="headerlink" href="#included-firmware" title="Link to this heading"></a></h2>
<p>The Linux kernel project contains a repository for firmware binaries that are
licensed to allow free redistribution. The Linux kernels firmware repository
can be found here:
<a class="reference external" href="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git">https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git</a></p>
<p>If the firmware for your device is included upstream, no action is required
for it to be automatically detected and loaded.</p>
<p>Clear Linux OS packages these firmware binaries
in the <a class="reference external" href="https://clearlinux.org/software?search_api_fulltext=linux-firmware">linux-firmware bundles</a> and
automatically includes them with the kernel.</p>
<p>You can double-check the linux-firmware bundle is installed with the commands below:</p>
<blockquote>
<div><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>bundle-add<span class="w"> </span>linux-firmware
find<span class="w"> </span>/lib/firmware/
</pre></div>
</div>
</div></blockquote>
</section>
<section id="additional-firmware-loading">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Additional firmware loading</a><a class="headerlink" href="#additional-firmware-loading" title="Link to this heading"></a></h2>
<p>Some device hardware manufacturers have a license that limits redistribution
of firmware. This means Clear Linux OS is unable to distribute those firmware and you
must manually obtain them from the manufacturer or another source.</p>
<p>You can place additional firmware in <code class="file docutils literal notranslate"><span class="pre">/etc/firmware</span></code>. Clear Linux OS reads this
directory for additional firmware files in conjunction with the typical
<code class="file docutils literal notranslate"><span class="pre">/lib/firmware</span></code> path to provide a <a class="reference internal" href="../clear/stateless.html#stateless"><span class="std std-ref">stateless design</span></a>.</p>
<ol class="arabic">
<li><p>Create the <code class="file docutils literal notranslate"><span class="pre">/etc/firmware</span></code> directory</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/firmware
</pre></div>
</div>
</li>
<li><p>Obtain the additional firmware binary from a trusted source.</p></li>
<li><p>Copy the firmware files including any subdirectories to
<code class="file docutils literal notranslate"><span class="pre">/etc/firmware</span></code>. It is important to place the firmware files in
expected path for proper loading.</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>&lt;directory&gt;/&lt;filename&gt;.&lt;fw<span class="p">|</span>bin&gt;<span class="w"> </span>/etc/firmware
</pre></div>
</div>
</li>
</ol>
</section>
<section id="cpu-microcode-loading">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">CPU microcode loading</a><a class="headerlink" href="#cpu-microcode-loading" title="Link to this heading"></a></h2>
<p>Microcode is low level code for processors loaded during the boot process that
contain stability and security updates.</p>
<p>Microcode updates can be updated by motherboard firmware however this is not
always feasible or does not happen in a timely fashion. The <a class="reference external" href="https://www.kernel.org/doc/Documentation/x86/microcode.txt">Linux microcode
loader</a> included in the Linux kernel allows for more flexibility and more
frequent updates.</p>
<p>Clear Linux OS uses the <em>early loading</em> mechanism described in the <a class="reference external" href="https://www.kernel.org/doc/Documentation/x86/microcode.txt">Linux microcode
loader</a> documented by which the CPU microcode is loaded as early as possible
in the boot process by using an initial RAM disk (initrd).</p>
</section>
<section id="troubleshooting">
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Troubleshooting</a><a class="headerlink" href="#troubleshooting" title="Link to this heading"></a></h2>
<p>Look at the output of <strong class="command">sudo dmesg</strong> to see device initialization and
expected firmware paths</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="#">Firmware</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#included-firmware">Included firmware</a></li>
<li><a class="reference internal" href="#additional-firmware-loading">Additional firmware loading</a></li>
<li><a class="reference internal" href="#cpu-microcode-loading">CPU microcode loading</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="change-kernel-boot.html"
title="previous chapter">Change Kernel Boot</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="kernel-boot-msg.html"
title="next chapter">Capture Kernel Boot Messages in the Journal</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/guides/kernel/firmware.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="kernel-boot-msg.html" title="Capture Kernel Boot Messages in the Journal"
>next</a> |</li>
<li class="right" >
<a href="change-kernel-boot.html" title="Change Kernel Boot"
>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" >Guides</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Firmware</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>