Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there any developed automatic linux kernel configuration tool?

I have found a method of make localmodconfig, but it is certainly very limited. I have searched the web but unfortunately have not come to any acceptable result.

Although I am quite conversant in kernel configuration issues, I would like to optimize my time wasted on configuration every new system with particular hardware, since it is rather technical work that creative.

share|improve this question
3  
You mean like something that would parse stuff from lspci, lsusb, /proc/cpuinfo etc. and set the appropriate options in a config file? I'm not sure if there is really a big demand for that, since generic modular kernels work well for people who don't want to muck around, and it is hard to see what difference that would make in the end. –  goldilocks Dec 31 '12 at 18:59
1  
Using a generic kernel from your Linux distribution and then run make localmodconfig is a easy solution. Additionally, there exists some (probably outdated) tools like cateee.net/autokernconf . –  jofel Dec 31 '12 at 23:47
    
@goldilocks the difference is in size and hence also in the time spent on loading the kernel - which is important if you target fast boot (of course one needs to have some things compiled in, at least to bring up the /). More importantly perhaps: the code you don't have [compiled and installed] can not harm you. –  peterph Jan 1 '13 at 0:06
    
If you consider kernel configuration as a waste of time don't do it but stick with a generic one. There really isn't that much to be gained by building your own kernel. There are few use cases where an "optimized" kernel performs notably better then a "working" kernel. –  Bananguin Jan 1 '13 at 9:11
    
@user1129682 Perhaps I would decide in favor of generic kernel, but could you provide any references that the performance is not affected? –  vprisivko Jan 1 '13 at 19:09

2 Answers 2

up vote 2 down vote accepted

Now, that we talked about this a bit in the comments the answer for you is: no, there isn't.

The main reason for that conclusion is that I think you are not looking for a tool to configure a kernel, but to automatically tune the kernel for your specfic (and yet unstated) use case.

As stated in the comments, you can skip unneeded drivers and compile the wanted drivers statically into the kernel. That saves you some time during the boot process, but not after that, because the important code is the same whether builtin or module.

Kernel tuning

The kernel offers some alternatives, you mentioned scheduler yourself. Which scheduler works best for you depends on your use case the applications you use and the load and kind of load you put on your system. No install-and-run program will determine the best scheduler for you, if there even is such a thing.

The same holds for buffers and buffer sizes. Also, a lot of (most?) settings are or at least can be set at runtime, not compile time.

Optimal build options

Also without automation, you can optimize the build options when compiling the kernel, if you have a very specialized CPU. I know of the Buildroot environment which gives you a nice framework for that. This may also help you if you are looking to create the same OS for many platforms. While this helps you building, it will not automate kernel tuning.

That's why I and others tell you to use a generic kernel. Without a specific problem to solve building your own kernel is not worth while. Maybe you can get more help by identifying/stating the problem you are trying to solve.

share|improve this answer
    
Thanks for the answer, it seems to be truthful. But what about CPU type if you have not very specialized CPU? Is it worthwhile to configure manually at least this option? –  vprisivko Jan 5 '13 at 7:04
    
Depends on your CPU. I'd guess the gerneric x86 and x86_64 kernels gernerally suffice about the others, I cannot tell. –  Bananguin Jan 5 '13 at 10:46
    
@Bananguin Buildroot doesn't seem to give optimal build options in the definition of find the most optimal compiler options to get the fastest running code (=compiler flag selection). Buildroot automates the building process of your embedded system and eases the cross-compilation process. –  Pro Backup Mar 15 at 16:35
    
@ProBackup: I never said it gives optimal build options, I said its a framework for optimizing build options. Just because it lets you set options explicitly which are set for you (or even not available at all) when building a kernel natively. –  Bananguin Mar 20 at 15:42

If you are worrying about boot time, the kernel load time is a fraction of that. Worry about what happens later, use e.g. systemd to speed up boot by paralellizing, configure to not run useless daemons, ... Systemd has tools to analyze the boot times. If the worry is space, disks are cheap.

Your time in futzing around, setting up the myriard configurations, getting the right kernel to each machine, fixing configurations/recompiling when something changes, ... is much more valuable than a few seconds shaved off booting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.