3

Is there a neat way of stripping the Linux kernel to only support the devices that are currently in use. After NVIDIA complaining about GCC version mismatch, I decided to recompile the kernel with the current version of GCC. Now, since it is known which modules the current kernel actually uses, can I automatically generate a .config file which is customized for this machine. That would booth save some space and time. Something like

lsmod [options] | sed [a good regexp] > .config
4

That's what make localmodconfig is for.

Excerpt from /usr/src/linux/README:

"make localmodconfig" Create a config based on current config and
                      loaded modules (lsmod). Disables any module
                      option that is not needed for the loaded modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.