PDA

View Full Version : Generating MODULES_OVERRIDE and/or WITHOUT_MODULES


aragon
July 3rd, 2009, 17:11
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
July 11th, 2009, 21:58
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
July 2nd, 2010, 07:32
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@
July 2nd, 2010, 16:57
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) (http://man.freebsd.org/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) (http://man.freebsd.org/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
July 8th, 2010, 09:00
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.