Re: kconfig: tristate choice with depender choice

From: Atsushi Nemoto
Date: Thu Feb 09 2012 - 09:32:02 EST


On Thu, 9 Feb 2012 00:26:25 -0500, Arnaud Lacombe <lacombar@xxxxxxxxx> wrote:
>> confirmed.
>>
> actually, not that much. Your reduced testcase is missing a MODULES
> symbol to have modules enabled and have them show up in the final
> `.config'. If you add:
>
> config MODULES
> boolean
> default y
>
> then you end up with CONFIG_A=m in the `.config'.

Yes, so it is the problem. I got CONFIG_A=m in .config from
CONFIG_A=y in defconfig.

> Now, I may have missed something.
>
> Do you have a situation where a MODULES symbol is present, enabled,
> but CONFIG_A=y still appear from CONFIG_A=m in the defconfig ?

I tested in this way:

1. Add this example to the end of drivers/char/Kconfig file.
-------------------------------------
choice
prompt "choice list AB"
config A
tristate "a"
config B
tristate "b"
endchoice
choice
prompt "choice list CD"
depends on A
config C
bool "c"
config D
bool "d"
endchoice
-------------------------------------

2. Then run commands:

$ cp arch/x86/configs/i386_defconfig arch/x86/configs/test_defconfig
$ echo 'CONFIG_A=y' >> arch/x86/configs/test_defconfig
$ make O=../build test_defconfig
$ grep CONFIG_A= ../build/.config
CONFIG_A=m

---
Atsushi Nemoto
--
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/