This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Linux firmware
The Linux firmware package contains binary blobs of firmware necessary for partial or full functionality of certain hardware devices on Linux systems. These binary blobs are usually proprietary because certain hardware manufacturers do not release source code necessary to build the firmware itself.
Modern graphics cards from AMD and NVidia almost certainly require binary blobs to be loaded for the hardware to operate correctly.
Starting at Broxton (a Skylake-based micro-architecture) Intel CPUs require binary blobs for additional low-power idle states (DMC), graphics workload scheduling on the various graphics parallel engines (GuC), and offloading some media functions from the CPU to GPU (HuC).[1]
Additionally, Intel modern Wi-Fi chipsets almost always require blobs.[2]
Installation
For security reasons, hotloading firmware into a running kernel has been shunned upon. Modern init systems such as systemd have strongly discouraged loading firmware from userspace.
Kernel
A few kernel options are important to consider when building in firmware support for certain devices in the Linux kernel:
- CONFIG_FW_LOADER
- This option is provided for the case where none of the in-tree modules
- CONFIG_FIRMWARE_IN_KERNEL
- Enabling this option will build each required firmware blob specified by EXTRA_FIRMWARE into the kernel directly, where the
request_firmware()
function will find them without having to make a call out to userspace. - CONFIG_EXTRA_FIRMWARE
- This option is a string and takes the (space-separated) names of firmware files to be built into the kernel. These files will then be accessible to the kernel at runtime.
Including firmware files into binary kernel images that are not available under the terms of the GPL, may result in a violation of the GPL if the image is distributed. It is wise to consult a lawyer before distributing images that contain firmware files from sys-kernel/linux-firmware.
For kernels before 4.18:
Device Drivers ---> Generic Driver Options ---> -*- Userspace firmware loading support [*] Include in-kernel firmware blobs in kernel binary (/lib/firmware) Firmware blobs root directory
For kernels beginning with 4.18:
Device Drivers ---> Generic Driver Options ---> Firmware loader ---> -*- Firmware loading facility () Build named firmware blobs into the kernel binary (/lib/firmware) Firmware blobs root directory
USE flags
USE flags for sys-kernel/linux-firmware Linux firmware files
+initramfs
|
Create and install initramfs for early microcode loading in /boot (only AMD for now) |
+redistributable
|
Install also non-free (but redistributable) firmware files |
bindist
|
Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues) |
compress-xz
|
Compress firmware using xz (app-arch/xz-utils) before installation |
compress-zstd
|
Compress firmware using zstd (app-arch/zstd) before installation |
deduplicate
|
Create symlinks for all firmware that is duplicate using rdfind |
dist-kernel
|
Enable subslot rebuilds on Distribution Kernel upgrades |
savedconfig
|
Allows individual selection of firmware files |
unknown-license
|
Install firmware files whose license is unknown |
Emerge
root #
emerge --ask sys-kernel/linux-firmware
Savedconfig
After emerging sys-kernel/linux-firmware, the configuration file is made into /etc/portage/savedconfig/sys-kernel/linux-firmware-ddmmyyyy. You can edit and comment out the line which you don't want to install. Edit and save the file and re-emerge sys-kernel/linux-firmware with the savedconfig
USE flag:
root #
emerge --ask USE='savedconfig' sys-kernel/linux-firmware
Troubleshooting
Searching for loaded firmware
dmesg can be grepped to determine what firmware has been loaded:
user $
dmesg | grep -i firmware
Removal
Unmerge
root #
emerge --ask --depclean sys-kernel/linux-firmware
See also
- Kernel — the core of the operating system.
- Iwlwifi — the wireless driver for Intel's current wireless chips.
- Microcode — describes various ways how to update a CPU's microcode in Gentoo
- AMDGPU — the next generation family of open source graphics drivers using the new Display Core (DC) framework for Vega GPUs and Raven Ridge APUs. It is however also capable of handling newer AMD/ATI Radeon graphics cards based on GCN1.1+, namely the Southern Islands, Sea Islands, Volcanic Islands, and Arctic Islands chipsets.
- Intel — the open source graphics driver for Intel GMA on-board graphics cards, starting with the Intel 810.