Re: 2.6.29-rc: unable to compile e100 firmware into kernel

From: Andrey Borzenkov
Date: Wed Feb 04 2009 - 11:45:59 EST


On 4 of February 2009 16:33:04 David Woodhouse wrote:
> On Sun, 2009-02-01 at 11:05 -0800, Jesse Brandeburg wrote:
> > On Sat, Jan 31, 2009 at 7:59 AM, Andrey Borzenkov
<arvidjaar@xxxxxxx> wrote:
> > > {pts/2}% LC_ALL=C make -C ~/src/linux-git
> > > O=$HOME/build/linux-2.6.29 make: Entering directory
> > > `/home/bor/src/linux-git'
> > > Using /home/bor/src/linux-git as source for kernel
> > > ln -fsn /home/bor/src/linux-git source
> >
> > I think (seem to recall something on the list) there have been
> > multiple people reporting the make O= option doesn't work with
> > CONFIG_FIRMWARE_IN_KERNEL,
>
> That shouldn't be the case -- it works fine here.
>
> Andrey, what version of make are you using?

OK, build error was likely result of something I did before (I suspect
what, but after I cleaned up build firmware/e100 it rebuilds OK now).
But even after I verified that firmware *was* built in kernel loading
still failed. This is genuine bug caused by config option mismatch.

I had CONFIG_FW_LOADER=m. I do not remember ever setting it explicitly,
so I suspect it was selected by some other driver in the past (I do make
oldconfig for at least ten past releases if not more). This cannot work
with CONFIG_FIRMWARE_IN_KERNEL=y because of this code in
drivers/base/firmware_class.c:

#ifdef CONFIG_FW_LOADER
extern struct builtin_fw __start_builtin_fw[];
extern struct builtin_fw __end_builtin_fw[];
#else /* Module case. Avoid ifdefs later; it'll all optimise out */
static struct builtin_fw *__start_builtin_fw;
static struct builtin_fw *__end_builtin_fw;
#endif

IOW CONFIG_FIRMWARE_IN_KERNEL must force CONFIG_FW_LOADER=y. I do not
understand Kconfig enough to offer a patch.

Attachment: signature.asc
Description: This is a digitally signed message part.