Proposed tool to check kernel configuration

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

Introduction

It is proposed to create a tool (a script) to check the sanity of a kernel settings (.config) according to the known hardware and software installed on the machine.
This tool could be tied with a package management tool like portage/emerge, so that checks are done automatically when emerging new packages that would require specific kernel settings, or when emerging a new kernel.

Plenty of scattered resources exist to help newbies with configuring their kernels. But running linux in general and gentoo linux in particular shouldn't require the user to become an expert in everything.
The kind of tool suggested here is at least an order of magnitude above anything that currently exist and would include the total of our collective knowledge about hardware and software requirements and linux kernel settings.

Goals

The proposed tool has to be a script with a text-based database that can be version controlled and patched against. It has to be a 'simple', low-level tool that is useful to the whole wide Linux community, so that the whole Linux community starts to depend on it and offers patches to keep the tool's internal database up to date.

Technical implementation

Profiles

With this tool, we could create 'profiles', with each profile corresponding to a system or a computer. I could have my own profile called "My home computer", and I could configure this profile with the make of the motherboard within my computer, and the graphic card that I know I have plugged in into it, and the filesystems I know I am using in my hard drives, and the hardware I know I regularly plug into my computer.... and the script would perform the sanity check described above, against a given linux kernel .config file, and inform me about mis-configurations or possibly automatically disable kernel drivers for hardware that are not within my profile.

Existing solutions

For a list of existing tools and services, see:
http://linux.overshoot.tv/wiki/find_which_linux_modules_are_used_or_need...

Generally speaking, Linux hardware and Linux kernel settings and the interaction between both is such a vast and complicated subject, with countless variations of hardware and system settings combinations, that any single user or even any single distribution project is doomed to fail and not to be updated in a timely fashion. Also, a web-based tool is not appropriate as other tools (scripts) cannot easily plug into it to automate some checks.

kergen

The following python script might be a good basis to achieve the above proposed goals:

Linux kernel config generator
https://github.com/nichoski/kergen
Gentoo: sys-kernel/kergen

Distributions

Gentoo

From the Gentoo perspective, portage could check emerged packages against the profile discussed above and provide additional information and possibly automatically adjust the profile according to specific package requirements.

Discussion and origin of the proposal:
Can Portage do a sanity check on your Kernel settings?
https://forums.gentoo.org/viewtopic-t-1056008.html

Bug 532674 - Idea: Run kernel checks from all packages?
https://bugs.gentoo.org/show_bug.cgi?id=532674