use Linux’s config script to flip settings?
egberts opened this issue · 0 comments
egberts commented
To do a series of simple flipping of a single config while updating any and all config dependencies:
Single Option approach
./scripts/config --set-val CONFIG_OPTION y
./scripts/config --enable CONFIG_BRIDGE
./scripts/config --enable CONFIG_MODULES
./scripts/config --disable CONFIG_X25
./scripts/config --module CONFIG_NFT
make oldconfig
(updates dependencies; may prompt with new dependencies, but old deps silently goes away)
Multiple-File Merge approach
If you have several small snippets of .config-*
files that you want to selectively merge into the main .config
file, execute:
# Merge IP fragment CONFIG_ settings into the main .config file
./scripts/kconfig/merge_config.sh .config .config-fragment
# Merge Notebook HW-specific CONFIG_ settings into main .config file
./scripts/kconfig/merge_config.sh .config .config-notebook-toshiba
# Auto-add/auto-remove CONFIG_ dependencies
make oldconfig
just a suggestion for ease of use and centralization of Kconfig settings.
References
- https://www.kernel.org/doc/html/latest/kbuild/kconfig.html#nconfig-mode
- https://stackoverflow.com/questions/27090431/linux-kconfig-command-line-interface/70728869#70728869
- https://stackoverflow.com/questions/7505164/how-do-you-non-interactively-turn-on-features-in-a-linux-kernel-config-file/70728949#70728949