CONFIG_FW_LOADER

Duncan Sands baldrick at free.fr
Sat Feb 12 11:21:19 EST 2005


This logic:

#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
#       define USE_FW_LOADER
#endif

has a problem (I'll take the speedtouch as an example): if speedtch
is built into the kernel, but the firmware loader is built as a
module (CONFIG_FW_LOADER_MODULE), then you get unresolved symbols:

drivers/built-in.o(.text+0x6abd7): In function `speedtch_find_firmware':
drivers/usb/atm/speedtch.c:584: undefined reference to
`request_firmware'

That's normal: the firmware loader is not built into the kernel.

Summary: if the firmware loader is built as a module, then speedtouch
needs to be built as a module too.

How to deal with this?

Solution 1. Add "select FW_LOADER" to Kconfig, so that we always use
the firmware loader.  The downside is that some (embedded?) people may
want to do all their firmware loading from userspace, and don't want to
pay the price of compiling in the firmware loading stuff.

Solution 2. Add a new Kconfig menu entry under usbatm: "Use kernel
firmware loader" (or something like that), corresponding to, say,
CONFIG_USBATM_FIRMWARE.  This entry does "select FW_LOADER".  Then
USE_FW_LOADER is replaced by CONFIG_USBATM_FIRMWARE everywhere.

Solution 3. Define USE_FW_LOADER as

#if defined(CONFIG_FW_LOADER)
#       define USE_FW_LOADER
#endif

i.e. replace it with CONFIG_FW_LOADER everywhere.  The problem with
this is that 99.99% of people will probably want to use the firmware
loader, but they could accidentally not get support for it.

Thoughts?

Duncan.




More information about the Usbatm mailing list