Firmware

This guide shows how Clear Linux* OS handles firmware and microcode loading.

Overview

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.

Firmware does not typically come with source code. Instead, firmware is provided as binary blobs which are licensed for free or non-free use.

In Clear Linux OS firmware is loaded during device initialization which typically happens at boot time.

Included firmware

The Linux kernel project contains a repository for firmware binaries that are licensed to allow free redistribution. The Linux kernel’s firmware repository can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

If the firmware for your device is included upstream, no action is required for it to be automatically detected and loaded.

Clear Linux OS packages these firmware binaries in the linux-firmware bundles and automatically includes them with the kernel.

You can double-check the linux-firmware bundle is installed with the commands below:

sudo swupd bundle-add linux-firmware
find /lib/firmware/

Additional firmware loading

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.

You can place additional firmware in /etc/firmware. Clear Linux OS reads this directory for additional firmware files in conjunction with the typical /lib/firmware path to provide a stateless design.

  1. Create the /etc/firmware directory

    sudo mkdir -p /etc/firmware
    
  2. Obtain the additional firmware binary from a trusted source.

  3. Copy the firmware files including any subdirectories to /etc/firmware. It is important to place the firmware files in expected path for proper loading.

    sudo cp -Rv <directory>/<filename>.<fw|bin> /etc/firmware
    

CPU microcode loading

Microcode is low level code for processors loaded during the boot process that contain stability and security updates.

Microcode updates can be updated by motherboard firmware however this is not always feasible or does not happen in a timely fashion. The Linux microcode loader included in the Linux kernel allows for more flexibility and more frequent updates.

Clear Linux OS uses the early loading mechanism described in the Linux microcode loader documented by which the CPU microcode is loaded as early as possible in the boot process by using an initial RAM disk (initrd).

Troubleshooting

Look at the output of sudo dmesg to see device initialization and expected firmware paths