Reputation: 7455
When configuring a Linux kernel, I normally start with my distribution's kernel config file. I often want to turn off some entries, but they are sometimes unchangeable because other CONFIG options that depend on it are enabled.
I can look up the dependencies manually, which often have dependencies of their own. It can be pretty time consuming to did through them all, especially if you're trying to turn off something like CONFIG_KALLSYMS.
Question: Is there a way to specify a CONFIG option you want gone, and have all dependencies automatically selected/disselected as nessisary for you? I looked through all the make options and in the scripts directory, and didn't see anything available for this.
UPDATE: Someone answered saying make oldconfig
should do the job after removing (deleting) the desired CONFIG options from the .config file, but that didn't work (his answer then disappeared):
$ make oldconfig
scripts/kconfig/conf -o arch/x86/Kconfig
*
* Restart config...
*
*
* Configure standard kernel features (for small systems)
*
Configure standard kernel features (for small systems) (EMBEDDED) [N/y/?] n
Load all symbols for debugging/ksymoops (KALLSYMS) [Y/?] (NEW) y
Include all symbols in kallsyms (KALLSYMS_ALL) [Y/?] (NEW) y
Do an extra kallsyms pass (KALLSYMS_EXTRA_PASS) [N/y/?] (NEW)
It automatically said "y" two the first two, and I'm trying to find an automated way to remove them and keep them gone.
Upvotes: 16
Views: 3689
Reputation: 4752
For anyone that might stumble upon this, Kconfiglib now lives at https://github.com/ulfalizer/Kconfiglib and has been polished and updated for the latest Kconfig version as of writing (Linux 3.7.0-rc8). The installation has also been greatly simplified.
Update:
Kconfiglib has been updated for Linux v4.0-rc3 now, and the test suite passes in obsessive mode. A new option allnoconfig_y
option (for leaving certain symbols as y
during make allnoconfig
) was added that it barfed on.
Sorry for letting Kconfiglib bitrot for a while! :/
Feel free to post any Kconfig-related questions (not necessarily related to Kconfiglib) you might have and link them here by the way (or notify me in some other way). Kconfig has a lot of obscure corners.
Upvotes: 8
Reputation: 3666
It looks like Kconfiglib, by Ulf Magnusson, will let you grok the configuration dependencies in Python and modify configurations settings: http://lwn.net/Articles/426013 -- beyond that, I've found discussion of the issue but no resolution.
Some helpful items for Kconfiglib:
Upvotes: 5