Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What are the correct steps to compile a Linux kernel? Are these steps the same or different for different kernel versions i.e for 2.2, 2.4 and 2.6.

share|improve this question
1  
Can you give more information about your distribution? This will allow us to specify a more accurate way to accomplish this task. –  Tom Wijsman Jul 26 '10 at 12:08
    
I am using Ubuntu on VMWare and trying to compile linux kernel after patching it for KML(Kenele Modle Linux) –  Adnan Jul 26 '10 at 12:13
add comment

migrated from stackoverflow.com Jul 26 '10 at 11:54

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 0 down vote accepted

You can follow this guide from the Ubuntu Help Community,
you might want to go for the "Alternate Build Method: The Old-Fashioned Debian Way".

It does not mather what version you take, just don't go too old... The best option is to pick the newest.

share|improve this answer
1  
the guide didnt solve my problem but a tip about initramfs in the comments worked. So i am accepting this answer –  Adnan Jul 26 '10 at 13:23
add comment

Use

make

will compile the kernel, but there is a bit more to it.

Here is a nice write up on how to do it.

I wouldn't bother with the older kernels, but I don't think the ideas behind the process have changed much, but stuff like make menuconfig may not work with the old stuff (and you may have to replace it with make config) etc...

share|improve this answer
add comment

Best howto I've EVER read. This is for Ubuntu or Debian.
http://ubuntuforums.org/showthread.php?t=311158

(It's been there for almost years and it's being updated constantly so don't worry it won't disappear. But yeah you can save it just to make sure.)

share|improve this answer
add comment

I never compiler kernel older than 2.6, so I can't help you there, but here is part of Gentoo's manual which discusses how to compile kernel. Please note that some distributions may have their own means of kernel compilation. Telling us exactly what you want to do will help us answer your question.

share|improve this answer
add comment

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.