# Generating MODULES_OVERRIDE and/or WITHOUT_MODULES



## aragon (Jul 3, 2009)

For a long time I've been wanting to minimise the number of kernel modules that get built when I build a kernel.  I know about MODULES_OVERRIDE and WITHOUT_MODULES in make.conf(5), but I'd like to know if there are any tools that make generating the contents of those variables easier?

For those that have compiled a linux kernel, I'd really like something similar to their "make menuconfig" - a nice, curses based menu with descriptions of each option.  Anything like this out there?


----------



## nevdull (Jul 11, 2009)

*great idea*

If you get a reply or find something I'd love to know, too.  Eyeballing /boot/kernel and cross checking it against my KERNCONF then adding it to WITHOUT_MODULES is a real time consumer.  I'd go with MODULES_OVERRIDE if i had confidence that I wasn't leaving something important out....


----------



## mk (Jul 2, 2010)

i want to rant about make LINT. from day one i know that if i make make LINT i will get file with description of every option i can compile in kernel. instead i get just options BIG_OPTION and no description. soo..  this will be very helpful in finding connections


----------



## wblock@ (Jul 2, 2010)

mk said:
			
		

> i want to rant about make LINT. from day one i know that if i make make LINT i will get file with description of every option i can compile in kernel. instead i get just options BIG_OPTION and no description. soo..  this will be very helpful in finding connections



This thread is a year old, but...

For looking up options, apropos(1) is useful:
`# apropos SCHED_ULE`

```
sched_ule(4)             - ULE scheduler
```

The original idea of having a nice user interface to generate WITHOUT_MODULES entries is interesting.  /usr/src/tools/build/options/makeman generates the src.conf(5) man page.  A variation could generate a curses options screen like used in ports:

```
[ ] WITHOUT_ACCT: Set to not build process accounting tools such as ac(8) and accton(8).
[ ] WITHOUT_ACPI: Set to not build acpiconf(8), acpidump(8) and related programs.
[ ] WITHOUT_AMD: Set to not build amd(8), and related programs.
...
```

No doubt there are interdependencies and special-case situations that should be handled.  As the books say, that exercise is left for the reader.


----------



## Carpetsmoker (Jul 8, 2010)

For many years I have wondered what the obsession is from some (mostly not-to-well-informed) people is with building their own kernel. Especially if they don't even seem to understand the documentation.
There are usually no benefits, and it will only costs you time. Most (except a few) options can be kldloaded without problems, and for those that can't (like PF_ALTQ) you can just append the option and rebuild.


----------

