xref: /linux/Documentation/driver-api/firmware/built-in-fw.rst (revision e58e871becec2d3b04ed91c0c16fe8deac9c9dfa)
1=================
2Built-in firmware
3=================
4
5Firmware can be built-in to the kernel, this means building the firmware
6into vmlinux directly, to enable avoiding having to look for firmware from
7the filesystem. Instead, firmware can be looked for inside the kernel
8directly. You can enable built-in firmware using the kernel configuration
9options:
10
11  * CONFIG_EXTRA_FIRMWARE
12  * CONFIG_EXTRA_FIRMWARE_DIR
13
14This should not be confused with CONFIG_FIRMWARE_IN_KERNEL, this is for drivers
15which enables firmware to be built as part of the kernel build process. This
16option, CONFIG_FIRMWARE_IN_KERNEL, will build all firmware for all drivers
17enabled which ship its firmware inside the Linux kernel source tree.
18
19There are a few reasons why you might want to consider building your firmware
20into the kernel with CONFIG_EXTRA_FIRMWARE though:
21
22* Speed
23* Firmware is needed for accessing the boot device, and the user doesn't
24  want to stuff the firmware into the boot initramfs.
25
26Even if you have these needs there are a few reasons why you may not be
27able to make use of built-in firmware:
28
29* Legalese - firmware is non-GPL compatible
30* Some firmware may be optional
31* Firmware upgrades are possible, therefore a new firmware would implicate
32  a complete kernel rebuild.
33* Some firmware files may be really large in size. The remote-proc subsystem
34  is an example subsystem which deals with these sorts of firmware
35* The firmware may need to be scraped out from some device specific location
36  dynamically, an example is calibration data for for some WiFi chipsets. This
37  calibration data can be unique per sold device.
38
39