Home page of this blog

Friday, April 2, 2010

Debian squeeze kernel compilation

I followed various links and googled to compile kernel in debian. Here I tried to document whatever I found into a nice document, which is available for download as a pdf

For viewing in google document use


https://docs.google.com/fileview?id=0B_nTbpzPbbNJY2QwZDU3YzEtMDA0ZC00NDYzLTg2ZTEtZjg5ZTA3MjEzNWNj&hl=en


Use the updated document

https://docs.google.com/fileview?id=0B_nTbpzPbbNJOTljYjVhNTQtOTgwYi00NTI4LThlOWEtZTFiOGEyOTE5MWIy&hl=en

For downloading as PDF use the following link


https://docs.google.com/uc?export=download&id=0B_nTbpzPbbNJY2QwZDU3YzEtMDA0ZC00NDYzLTg2ZTEtZjg5ZTA3MjEzNWNj

 


Use the updated document

https://docs.google.com/uc?export=download&id=0B_nTbpzPbbNJOTljYjVhNTQtOTgwYi00NTI4LThlOWEtZTFiOGEyOTE5MWIy


After doing the kernel compilation, do an update-grub as root to regenerate the correct boot options for the new kernel

To view the images in PDF properly, ZOOM more than 250 percentage

9 comments:

  1. Unknownimportant@hotmail.deDecember 5, 2010 at 5:07 PM

    Thank you a lot!
    For me this was the best documentation about compiling a kernel in squeeze that i was able to find. Luckily I have an i7, too and so i was able to perform the exact same optimizations you did :)
    Your documents lack of explanation would be on the one hand a risk to unexperienced users, but on the other hand, which unexperienced user would try to compile a kernel? (so the first part of this sentence is not valid)
    I was able to compile a kernel in a very short time, because you focused on the important steps, and when I didn't really know what for example update-initramfs would do, I read the manual and googled for what initramfs is.
    It is very hard to find up-to-date explanations for standard-procedures in linux like compiling a kernel, because it seems to be perfectly clear for people who started with linux earlier how to do these, also on new releases of a distribution, where things slightly changed (and in the debian wiki for example, not everything is up to date). So all-in-all: Best up-to-date documentation i could imagine about compiling a kernel in squeeze.

    If you perhaps have more awesome resources, like those in the document, I'd be happy if you mailed them to me

    ReplyDelete
  2. The latest trick I found while compiling kernel is to compile ipv6 as a module so that I can blacklist it. This is very easy after I found the trick.

    We need to goto networking options in make menuconfig to compile ipv6 as a module (Should press space bar in ipv6 to change from * to M)

    After this, /etc/modprobe.d/blacklist.conf

    and add blacklist ipv6 at the end of the file and reboot

    Voila, no ipv6 which bogs networking

    ReplyDelete
  3. And if you are so very interested in kernel compilation, try arch linux or gentoo linux

    it is a highway for kernel compilation compared to Ubuntu/Debian/Fedora

    ReplyDelete
  4. Unknownimportant@hotmail.deDecember 7, 2010 at 2:37 AM

    Thanks a lot again, I think I really need to try out arch or gentoo, great direction you led me there. When I have lecture-free time, that'll be my big project :)
    Until then I'll collect information about which modules I don't need at all and which I better compile and manage as a module, like ipv6. Would be great to have a minimal setting there.
    I'll report you if I successfully achieved something in that case, perhaps it's worth a blog entry, perhaps not.
    Keep up the good blogging :)

    ReplyDelete
  5. Thanks for the well documented instructions, while reading this i finally understood why the module i compiled from source wouldn't work (i still use the 2.6.32 binary kernel but wanted to recompile the modules to have a powernow-k7.ko module with modifications (manual freq/voltage table for a mobile athlon on a desktop mobo that allows only a (low) part of the range of the CPU)).
    I forgot the 'Load an alternate config file' step so the module was recognised as one for a different kernel.
    Going to recompile the modules only for now, lot of work... but when i've some time, compiling for specific CPU and preemptible seems very tempting... maybe adding a backport of the low-latency patch BTW :-)

    About Gentoo, indeed it compiles anything with great ease, even some pre-alpha software (used it 4 years), great for a development box. But global system maintenance and update is better handled/way cheaper in time (IMHO) on deb based distros.

    About Arch, stil not tried it, heard very good report about it from friends... maybe next distro on my to-try list.

    ReplyDelete
  6. To test 2.6.38 optimized for core2, follow this link

    ReplyDelete
  7. Nicely done kernel build guide.
    It's better than the official Debian document.

    Thanks.

    Whoever has the EDID spamming bug, especially ATI radaeon graphic driver, make a file in /etc/modprobe.d/ directory like below.

    /etc/modprobe.d/EDID-off.conf
    options i2c-algo-bit bit_test=1

    It will stop the EDID spam on next boot. ^^

    ReplyDelete
  8. Yesterday I compiled the linux kernel for the first time, following your tutorial, and it worked well. Since I've had problems with my Acer laptop overheating I actually took it outside! So there it ticked away alone on the steps of the house in the winter cold for some two hour... ;)

    Thanks,

    D

    ReplyDelete