4

I would like to build a kernel for my system that only contains modules for the hardware which is really in place. Of course I can walk through lspci and manually select all the necessary device drivers to be build as a module.

But I am wondering if there is some script that can automate this process to some degree. For example which scan's the output of lsusb/lspci/cpuinfo etc. and then produces a .config kernel configuration file that can be modified further and acts as a baseline.

There are several tools that provide a good overview of the hardware contained in a system, but none produces a kernel .config file.

http://wiki.gentoo.org/wiki/Hardware_detection

[addendum]

I have just learned about the 'make localmodconfig' parameter which seems to be a real time safer.

This links also contains some valuable information to speed up things, however it does not provide the information i am looking for: http://gentoovps.net/kernel-tips/

2
  • Ideally this would be a tool that compares a list of hardware (either harvested from lspci and lsusb or specified by the user) with your kernel config and points out missing drivers and unnecessary drivers, with a workflow that makes it easy to adjust your kernel config according to the suggestions.
    – Mutant Bob
    Commented Jun 16, 2015 at 20:08
  • This project seems to do what you ask but it did not have any update in years github.com/nichoski/kergen
    – Stolz
    Commented May 14 at 10:01

1 Answer 1

0

With modprobed-db you can reload stored earlier modules and run make localmodconfig

https://wiki.archlinux.org/index.php/Modprobed-db

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .