Page 1 of 24 12311 ... LastLast
Results 1 to 10 of 594

Thread: How To Compile the new 2.6.16 kernel from kernel.org

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Beans
    1,113
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Smile How To Compile the new 2.6.16 kernel from kernel.org

    I just finished compiling the newest 2.6.16 kernel from kernel.org and I am getting much better performance. In what follows, I will show you how to compile and configure the latest kernel. You do not need to use the 2.6.16 kernel but it is the first kernel of the release kernel and performance patches are only made for these releases. (ex: 2.6.16, 2.6.17 NOT 2.6.16.20) Feel free to compile a kernel besides the first release cycle kernel. You do not need the patch and you can configure the kernel for maxium speed in xconfig. A tutorial to optimize the kernel you are building can be found here.

    Before you begin, you will need to get a kernel
    Download the 2.6.16 kernel and it's performance patch: The 2.6.16 kernel
    Latest Kernel Patch Don't apply the patch if you are compiling a kernel other then 2.6.16 otherwise the kernel will not compile.

    Check out kernel.org for the latest stable/release canidate kernel.

    1. Install needed utilities to configure the kernel

    sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev
    2. Now we are going to move the kernel and unpack it.

    sudo cp linux-2.6.16.tar.bz2 /usr/src
    3. Now we are going to move to /usr/src

    cd /usr/src
    4. Now unpack it:

    sudo tar -xvjf linux-2.6.16.tar.bz2
    5. Rename the folder: ONLY needed for 2.6.16 kernel ! You don't need to do this.

    sudo mv linux-2.6.16/ linux-2.6.16ck12
    6. Now we are going to remove the link to the linux directory:

    sudo rm -rf linux
    7. Make a new link to the new kernel:

    sudo ln -s /usr/src/linux-2.6.16ck12 linux
    8. Move to the Linux directory:

    cd /usr/src/linux
    9. Make yourself root:

    sudo -s -H
    10. Apply the performance patch: Don't use if you are not patching the 2.6.16 kernel !

    bzcat /home/$USER/patch-2.6.16-ck12.bz2| patch -p1
    11. Now we are going to import your current kernel configuration:

    uname -r
    12. Now import it: Make sure to replace the kernel version in this following command from the one from uname -r.

    sudo cp /boot/config-2.6.14-ck1 .config
    13.Configure the kernel:

    make xconfig
    Here are some performance tips from this thread.

    In "General Setup" activate:

    -Support for paging of anonymous memory (swap)
    --Support for prefetching swapped memory

    In "Processor type and features":

    -Processor family Choose the model of your processor.

    Activate:

    -Preemption Model
    --Voluntary Kernel Preemption (Desktop)

    -High Memory Support
    --off -if you have less than 1 GB of RAM
    --1GB Low Memory Support -if you have 1GB of RAM
    --4GB -if you have more than 1GB of RAM

    -Timer frequency
    --1000 Hz

    In "Device drivers" go to "Block devices" and in "IO Schedulers" leave only the "CFQ I/O scheduler" activated, which provides the best performance.

    In "Kernel hacking" uncheck "Kernel debugging".

    Ctrl+S to save the kernel configuration and then close the window.
    Note: Not all the options will be the same in newer kernels.

    14. Let's build the kernel: Make sure that you are in /usr/src/linux with full root access. Make sure that you are. This will build a debian file that you can install.

    Now, in terminal do the following:

    make-kpkg clean

    make-kpkg -initrd --revision=ck12 kernel_image kernel_headers modules_image
    Note: You can replace "ck12" with anything you want. Like "k7" or "686."
    15. Install the .deb fine in /usr/src. In terminal do

    sudo dpkg -i <name of the file>
    Now reboot and you will have a much faster system !
    -------------------------------------------------------------------------

    How I learned to do this:
    2.6.14 Vanilla Kernel I based my tutorial on this thread. Thank you for writing this tutorial RubenGonc !

    And I also learned some stuff from this thread
    -------------------------------------------------------------------------
    Troubleshooting:

    Q: My Wifi Doesn't work !

    A:To get wifi working, compile the new ndiswrapper from source. Follow the tutorial.

    Q: When I reboot I get Grub Error 22 ! WTF ???

    A: You may have missed a step or messed something up. When it says Grub Loading..... press esc and you will be able to boot with another kernel. Then you should go into synaptic and uninstall the broken kernel and then reompile it.
    --------------------------------------------------------------------------------
    Q: How can I get fglrx and DRI working on my new kernel ?

    A: Type this in terminal:

    sudo apt-get install fglrx-kernel-source
    Reboot and if that does not work, make sure fglrx is in the Driver section.
    ---------------------------------------------------------------------------------
    Q: I need kernel headers for my custom kernel.

    A: I updated the howto and edited the last step to build a kernel image, kernel module image, and kernel headers. Thank you to tseliot for his kernel thread because I found the command there. You can view the thread here.
    ------------------------------------------------------------------------------------
    Q: I want to optimize my kernel ! What do I select ???

    A: I just wrote this tutorial on how to configure your kernel for enhanced performance. I hope it helps.
    ----------------------------------------------------------------------------------------
    Q: Why did you write this tutorial ?
    A: I wrote this tutorial to help give back to the Ubuntu community. I've had such a good expericence with ubuntu that I want to help others. This community is great
    Last edited by xXx 0wn3d xXx; June 24th, 2006 at 12:40 AM.

  2. #2
    Join Date
    Jan 2006
    Beans
    192
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    should be name of file for 16th step

    also didn't work for me, there is no option to boot the 2.6.16 kernel in my grub
    Last edited by dicecca112; April 9th, 2006 at 09:42 PM.

  3. #3
    Join Date
    Aug 2005
    Beans
    14

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    Did you try manually adding the parameters to /boot/grub/menu.lst?

  4. #4
    Join Date
    Jan 2006
    Beans
    1,113
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    Quote Originally Posted by Juanito
    Did you try manually adding the parameters to /boot/grub/menu.lst?
    or sudo update-grub. I just ran through the tutorial again and I compilied the kernel and the set it up and it worked.

  5. #5
    Join Date
    Jan 2006
    Beans
    192
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    weird, it shows in the menu.lst. but not in my grub. ran update-grub too and it shows up there, but not on boot

  6. #6
    Join Date
    Jan 2006
    Beans
    1,113
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    Quote Originally Posted by dicecca112
    weird, it shows in the menu.lst. but not in my grub. ran update-grub too and it shows up there, but not on boot
    That's weird...check if it's hidden. Also, after upgrading up to this kernel, my sound works and it never did before !

  7. #7
    Join Date
    Jan 2006
    Beans
    192
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    how come the path reads number-cks3 and on step 8 it says sudo ln -s /usr/src/linux-2.6.16ck3 linux

  8. #8
    Join Date
    Aug 2005
    Beans
    14

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    I copied and pasted everything and succeeded! now I can suspend and resume!!!!! but I still don't have wifi.

  9. #9
    Join Date
    Mar 2006
    Location
    Lancaster, UK
    Beans
    28
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    To get usplash you need to make sure you enable this in the config:

    Graphics support:
    -VGA 16-color graphics support - module (m)
    -VESA VGA graphics support - build in kernel (y)

    Console display driver support:
    -VGA text console and Video mode selection support- build in kernel (y)
    -MDA text console-module (m)
    -Framebuffer Console and Framebuffer Console Rotation support-build in kernel (y)

    Not sure how to change from "m" to "y" and vice versa in xconfig so I opened the .config file in gedit and checked it manually.

    Archck patch includes the Con Kolivas patch but with lots of other cool things too like acpi updates and suspend2 but I had trouble compiling it.

    It's here if you wanna hava a go: http://iphitus.loudas.com/archck.php

  10. #10
    Join Date
    Nov 2005
    Location
    Sweden
    Beans
    257
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: How To Compile the new 2.6.16 kernel from kernel.org

    Quote Originally Posted by dpicker
    To get usplash you need to make sure you enable this in the config:

    Graphics support:
    -VGA 16-color graphics support - module (m)
    -VESA VGA graphics support - build in kernel (y)

    Console display driver support:
    -VGA text console and Video mode selection support- build in kernel (y)
    -MDA text console-module (m)
    -Framebuffer Console and Framebuffer Console Rotation support-build in kernel (y)

    Not sure how to change from "m" to "y" and vice versa in xconfig so I opened the .config file in gedit and checked it manually.

    Archck patch includes the Con Kolivas patch but with lots of other cool things too like acpi updates and suspend2 but I had trouble compiling it.

    It's here if you wanna hava a go: http://iphitus.loudas.com/archck.php
    Could this work with usplash? I've tried it but I never got the usplash picture but I don't think I enabled the other stuff. Regular vesa doesn't work at all.
    I see you recommend archck and vesafb-tng is included in that.

    There's nothing called MDA text console-module in this kernel...
    Last edited by Rizado; April 10th, 2006 at 07:39 AM.

Page 1 of 24 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •