Minority Opinions

Not everyone can be mainstream, after all.

Initial Linux Kernel Configuration

leave a comment »

It has been over a week since I started configuring the Linux kernel.  It has over six thousand options, and many of them are decidedly non-obvious.  Half of the acronyms have been unfamiliar to me, and the rest I only know from a long history of poking around in computer internals.  Common words like “gadget” can have specific, sometimes unintuitive meanings.  The help text often gives me just enough information for a web search to teach me most of what I need.  I’ve made at least two major mistakes that I had to go back and fix in order to enable essential pieces.

The parts I find most odd are when an option defaults to N while its help text says, “If unsure, say Y.”  The other way around is almost as bad.  Shouldn’t the default be what would work best for new users?  Or is it supposed to be the best selection for kernel developers, instead?

The good news is that make oldconfig promises to make my life easier when (and if) I compile a new kernel for this machine.  The bad news is that it doesn’t do anything for me the first time around.  I could base something on the generic x86 kernel supplied by my distribution, but I really want something more specialized if I’m going through the effort, and there are plenty of new questions between 2.6 and 3.5 that I have to answer anyway.

An ideal tool would give me solid recommendations based on inspecting my hardware, using the same interfaces I have to deal with.  There seems to be a start in `streamline_config.pl`, used by localyesconfig and localmodconfig, but it too seems better for tweaking an existing configuration than for creating one from scratch.  I want more.

I want currently-loaded modules, as seen in lsmod output, to be enabled by default.  I want the file systems on mounted devices to be enabled.  I want the kernel to be optimized for my processor type, as shown by /proc/cpuinfo.  I want features to be enabled or disabled based on CPU flags in that same interface.  I want the output of dmidecode, lspci, and lsusb to be interpreted, answering as many questions as possible.  I want support for devices and buses that could be found, but aren’t, to be specifically disabled.

Perhaps some of this is impossible; the note about lm-sensors indicates that detection might only work properly if you compile all of the I2C and monitoring drivers as modules for the initial compilation.  I’ve also run into a question about the memory management chipset, which may or may not be the “Host bridge” that appears at the top of lspci output; if not, then I don’t know where to find that information.

Beyond that, there are plenty of questions that the hardware alone won’t answer.  Perhaps there are reasonable values for the hugepage questions based on information available in /proc/cpuinfo and/or /proc/meminfo, but it might be better to leave them up to the user.  IPv6 has a few optional features that don’t depend on hardware at all.  Nothing could tell you that FUSE won’t become important down the road.

Sadly, this is an itch rarely felt by any one individual.  Most distributions and cross-compilers would be unable to use such a tool, and corporations would either use a pre-packaged distro or create their own single distro for a mess of identical hardware.  The kernel developers most able to build and maintain such a tool are also more likely to have their own configuration that they tweak as necessary.  In fact, the largest community likely to benefit would be Gentoo users; after all, their documentation came up a few times while researching unfamiliar terms.

Am I missing something?  Does it already exist?  If so, can we put it in the LFS book?


Written by eswald

30 Oct 2012 at 5:25 pm

Posted in Linux, Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s