# Re: \[RFC PATCH\] Kconfig: Enable Kconfig fragments to be used for defconfig

- From: Grant Likely \<hidden\>
- Date: 2010-07-13 23:22:21 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2010/07/3593091
- Thread: https://ratatoskr.run/linuxppc-dev/2010/07/3593087/t.md

```text
On Tue, Jul 13, 2010 at 5:14 PM, Daniel Walker [ref] wro=
te:
> On Tue, 2010-07-13 at 17:04 -0600, Grant Likely wrote:
>
>> - I haven't figured out a way for the fragment to force an option to
>> =A0 be "n", or to set a value, for example "CONFIG_LOG_BUF_SHIFT=3D16".
>> =A0 This may require changing the syntax.
>> - It still doesn't resolve dependencies. =A0A solver would help with thi=
s.
>> =A0 For the time being I work around the problem by running the generate=
d
>> =A0 config through 'oldconfig' and looking for differences. =A0If the fi=
les
>> =A0 differ (ignoring comments and generateconfig_* options) after oldcon=
fig,
>> =A0 then the <board>_defconfig target returns a failure. =A0(but leaves =
the
>> =A0 new .config intact so the user can resolve it with menuconfig). =A0T=
his
>> =A0 way at least the user is told when a Kconfig fragment is invalid.
>
> The solver would fix the whole issues with the defconfigs , we wouldn't
> need this Kconfig change .. From my perspective we shouldn't be fooling
> around with anything but the solver approach ..

The solver would complement Kconfig fragments, but it doesn't
implement all the functionality.  For instance, it doesn't help a
board config picking up a bunch of options from an SoC or Architecture
config file, especially things that are developer/maintainer choices
as opposed to hard requirements).  Solver on its own is an incremental
improvement over what we currently have, but it doesn't solve the
whole problem.

> It just doesn't feel like Kconfig was meant to do this, it feel like
> somewhat of an abuse ..

Why?  It uses the Kconfig language itself to specify additional
constraints on the final configuration.  Seems to be the essence of
elegance to me.  :-)

g.
```
