I've learned that the firmware-subsystem uses udevd to copy a firmware to the created sysfs 'data' entry.
But how does this work in case of a built-in driver module where udevd hasn't started yet?
I'am using a 3.14 Kernel.
TIA!
I've learned that the firmware-subsystem uses udevd to copy a firmware to the created sysfs 'data' entry.
But how does this work in case of a built-in driver module where udevd hasn't started yet?
I'am using a 3.14 Kernel.
TIA!
I read through the kernel sources, especially drivers/base/firmware_class.c, and discovered that
CONFIG_FW_LOADER_USER_HELPER
would activate the udev firmware loading variant (obviously only usable for loadable modules when udev is running). But as mentioned on LKML this seems to be an obsolete method.
Furthermore firmware required by built-in modules is loaded from initramfs by fw_get_filesystem_firmware() through a kernel_read(), to be precise.
It is possible to build firmware images into the kernel itself by using the CONFIG_FIRMWARE_IN_KERNEL, CONFIG_EXTRA_FIRMWARE_DIR, and CONFIG_EXTRA_FIRMWARE kernel config options. This may be useful for cases where you either cannot or don't want to provide the firmware from userspace at runtime (for example, when the firmware in question is required for accessing the boot device, and you don't want to use an initrd).
Here's a more detailed explanation of the available options for firmware loading: https://wiki.tizen.org/wiki/Usage_and_Mechanism_of_kernel_function_%22request_firmware()%22#Load_firmware_from_kernel_image