Custom kernel: fails to load firmware when module built-in
Have a look at the CONFIG_FIRMWARE_IN_KERNEL
, CONFIG_EXTRA_FIRMWARE
, and CONFIG_EXTRA_FIRMWARE_DIR
configuration options (found at Device Drivers -> Generic Driver Options).
The first option will enable firmware being built into the kernel, the second one should contain the firmware filename (or a space-separated list of names), and the third where to look for the firmware.
So in your example, you would set those options to:
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE='iwlwifi-6000-4.ucode'
CONFIG_EXTRA_FIRMWARE_DIR='/lib/firmware'
A word of advise: Compiling all modules into the kernel is not a good idea. I think I understand your ambition because at some point I was also desperate to do it. The problem with such approach is that you cannot unload the module once it is built-in - and, unfortunately especially the wireless drivers tend to be buggy which leads to a necessity of re-loading their modules. Also, in some cases, a module version of a recent driver will just not work.
Related videos on Youtube
ViceNocillator
Updated on September 18, 2022Comments
-
ViceNocillator over 1 year
I'd like to have all my modules built-in, but this fails with
iwlagn
:iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found!
The microcode file exists in
/lib/firmware
and the whole thing works just fine if I compileiwlagn
as module. I have no idea where it's looking for the file or what's wrong - any ideas?-
orpheuswasrebornhere over 5 yearsMaking a new answer instead a comment; EXTRA_FIRMWARE_DIR corresponds to the firmware blob locations in the build environment; not the target. see (cateee.net/lkddb/web-lkddb/EXTRA_FIRMWARE_DIR.html)
-
-
LtWorf almost 8 yearsThat is no longer true. Intel drivers are stable and work fine for days without any manual intervention needed.
-
arved over 6 yearsEXTRA_FIRMWARE only works on 64bit kernels according to the documentation