LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Compiling a custom kernel, automatically remove unused modules ? (http://www.linuxquestions.org/questions/linux-kernel-70/compiling-a-custom-kernel-automatically-remove-unused-modules-617026/)

sauce 01-29-2008 12:14 AM

Compiling a custom kernel, automatically remove unused modules ?
 
Is there any way to automatically remove all the kernels that you don't need from .config? For example, a script that does "lsmod" and anything that is set to [M] that is not listed can be set to [N]. That would be great when compiling your own kernel

This is assuming you are running a distro that runs a bloated kernel in the first place that sets [M] to everything

syg00 01-29-2008 01:20 AM

You *really* don't want to be dicking with the config file with an editor. Too many options have dependencies - that's why the Kconfig is so convoluted.

Better to go the other way - do a lsmod to find out what's needed, then add them selectively to a "make defconfig" generated config.


All times are GMT -5. The time now is 03:25 AM.