Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 01-28-2008, 11:14 PM   #1
Registered: Oct 2005
Distribution: Slackware, Ubuntu
Posts: 52

Rep: Reputation: 15
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
Old 01-29-2008, 12:20 AM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 13,146

Rep: Reputation: 1262Reputation: 1262Reputation: 1262Reputation: 1262Reputation: 1262Reputation: 1262Reputation: 1262Reputation: 1262Reputation: 1262
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom compiled kernel and rc.modules matters Slackware 14 05-18-2007 08:56 AM
Remove custom kernel Aerolinux Linux - Hardware 4 02-21-2007 04:13 PM
trouble compiling modules against custom fedora core 4 kernel blahJake Linux - Software 6 12-16-2006 06:54 AM
Unused kernel modules : How to NOT load? _UnPrEdictAbLe_ Linux - Software 0 08-19-2004 01:19 AM
Removing unused kernel modules / autoclean MadCactus Linux - General 4 12-23-2003 09:05 AM

All times are GMT -5. The time now is 06:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration