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.

I tried compiling a kernel from sources that I got from kernel.org (mainline) with make allyesconfig and make allmodconfig, but both builds resulted in a kernel, that won't boot.

I was thinking, that by compiling everything, It should work on close to any hardware. What am I doing wrong?

And how do I compile a working kernel?

share|improve this question
    
I don't think "all yes" is a good idea, since there are options that conflict with one another. The people who compile kernels for distribution have to choose very carefully to include support for most (but not all) hardware. You have to do the same and choose options for your hardware. –  phunehehe Apr 12 '11 at 6:02

1 Answer 1

up vote 6 down vote accepted

One thing you can do is boot a working kernel, run lsmod, and make sure that all the modules listed are turned on in your config (either built-in or as modules).

It's easiest to start with a working config, and then tweak it. If you're lucky, your distribution ships the config file along with the kernel. For example, in Ubuntu you'll find it in /boot/config-version. Copy that file into your new kernel directory and name it .config. If it's for an older kernel, you can try make oldconfig to be asked only about new options. In general, accept the default answer for everything unless you know what it is.

share|improve this answer
2  
+1. @poleman: Use the config of a distribution kernel which is close in version but <= the version you are trying to use from upstream, then tweak the config as necessary. –  Faheem Mitha Apr 12 '11 at 21:14

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.