Re: [GIT] kbuild: kconfig changes

From: Sam Ravnborg
Date: Sun Aug 08 2010 - 11:57:36 EST


On Fri, Aug 06, 2010 at 09:43:24PM -0700, Arve Hj?nnev?g wrote:
> On Fri, Aug 6, 2010 at 9:01 PM, Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
> >>
> >> This change prevents some the minimal defconfig options from working.
> >> Specifically our usb gadget drivers do not get set.
> >
> > Can you help me reproduce this?
> >
> > I have found an issue with choice values in combination with
> > tristate logic that fails. I hope this is something similar.
> >
>
> It is probably the same problem. The gadget driver that was not set is
> not buildable as a module (it is not in the mainline kernel). If I
> select another gadget driver instead it just gets changed to build as
> a module instead.
>
> If you create a file, arch/arm/configs/test_defconfig with the following:
> CONFIG_MODULES=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_MASS_STORAGE=y
>
> then "make test_defconfig" results in .config having:
> CONFIG_USB_MASS_STORAGE=m
>
> (at least if you are set up to compile for arm)

Thanks Arve.

I have it reproduced now with a simple Kconfig:

$ cat Kconfig
config M
def_bool y
option modules

choice
prompt "choice list"

config A
tristate "a"

config B
tristate "b"

endchoice

$cat defconfig
CONFIG_M=y
CONFIG_A=y
# CONFIG_B is not set


If I do:

$scripts/kconfig/conf --defconfig=defconfig Kconfig

with the above input the resulting .config is OK.

But If I drop the line:

# CONFIG_B is not set

in the defconfig file then I end with CONFIG_A set to m.
And this is not as expected - I cannot see why it should matter
if we specify the value of B or not.

What we see here is that savedefconfig trigger a bug in the
other part of kconfig - a bug which was not exposed before.

The reason why your patch cured it was that we then no
longer triggered the bug (at least I guess so I did not look to close).

I will look into this as time permits. I assume the fix is simple
when I find the reason.

I fear it is in menu_finalize() and that part of kconfig I have
not yet understood.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/