分类:
2012-05-04 10:34:15
原文地址:嵌入式Linux中使用firmware 作者:deep_pro
The Linux kernel configuration item CONFIG_EXTRA_FIRMWARE:
This option allows firmware to be built into the kernel, for the cases where the user either cannot or doesn't want to provide it from userspace at runtime (for example, when the firmware in question is required for accessing the boot device, and the user doesn't want to use an initrd).
This option is a string, and takes the (space-separated) names of the firmware files -- the same names which appear in MODULE_FIRMWARE() and request_firmware() in the source. These files should exist under the directory specified by the EXTRA_FIRMWARE_DIR option, which is by default the firmware/ subdirectory of the kernel source tree.
So, for example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", copy the usb8388.bin file into the firmware/ directory, and build the kernel. Then any request_firmware("usb8388.bin") will be satisfied internally without needing to call out to userspace.
WARNING: If you include additional firmware files into your binary kernel image which are not available under the terms of the GPL, then it may be a violation of the GPL to distribute the resulting image -- since it combines both GPL and non-GPL work. You should consult a lawyer of your own before distributing such an image.
----------------------------------------------------------------------------- Device Drivers --->