Kernel Compile Guide for Centrino Laptops
Posts: 75
Compile Guide For Acer Travelmate 291Lmi Laptops and other centrino laptops based on Cblue's easier Guide to Compiling and Installing a Kernel
Okay, this one will be alot easier to understand, I hope!
First off, if you plan on doing any compiling whatsoever there are some programs that you should install. These programs are needed by alot of different programs needing compiling, and not just for kernel compiling.
Some of the below programs may already be installed on your system but here is the list:
binutils
coreutils
kernel-package
libncurses5-dev
kdelibs4-dev
xlibs-dev
libqt3-mt-dev
module-init-tools
gcc 2.95 or gcc 3.3
g++
Get the latest Con Koliva's patch from http://ck.kolivas.org/patches/2.6/2.6.9/2.6.9-ck2/patch-2.6.9-ck2.bz2. I believe the patch is used to keep cpu's cool so i've used it.
Okay, now on to how to compile and install your new kernel!
For my example I will be using the 2.6.9 linux kernel:
Download the source - for now the source for the 2.6.9 kernel can be downloaded from ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2 but usually, when available, you can just do an apt-get install kernel-source-2.?.? (? whatever version number) and get the source zip file of the kernel installed into your /usr/src directory for you.
Now after you download the kernel source, you will need to right click on it and choose Ark to extract it for you. After it's extracted, you will then move or copy it into your /usr/src directory. Extract the patch file using the same procedure.
How I do this:
open terminal, su to be root, the # symbol will represent the root prompt for all the terminal commands I put below.
# cd /home/your-username (or wherever you extracted the kernel source)
# mv linux-2.6.9 /usr/src/
# cd /usr/src
# ln -s linux-2.6.9 linux (if you already have a linux symlink, remove it first, # rm linux)
#cd linux
#patch -p1 < /usr/src/patch-2.6.8.1-ck9
# make oldconfig
After you type make oldconfig some newer options included in the new kernel will pop up on the screen asking you to make a choice. To be safe, always just hit the enter key to get the default. If you know your hardware well and are experienced with configuring kernels, you can choose whatever option you want.
After you have made all your choices in the new options you will come back to the root prompt.
#make xconfig
This should bring up a graphical user interface to select options for the kernel. Go down to Processor type and features. On the right hands side you will see the subcategory of processor family. Enable Pentium M from the list. A tick mark should appear in the box when you do it. Then on the left hand side go down to Cpu Frequency Scaling and then on the right hand side enable 'userspace governor for userspace frequency scaling.' A tick mark should appear. Then go down to Intel enhanced speedstep and enable that too. Then close this window. It will ask to save your changes so do save before closing.
After you have made all your choices in the new options you will come back to the root prompt.
# make-kpkg buildpackage -rev Custom.1 kernel_image
After you type in the above you will have to wait quite awhile while your new kernel gets built. When it's finished, you will come back to the root prompt again. Open up a file manager and go to the /usr/src folder and you will see four new deb packages in there. One is called kernel-image-2.6.9_Custom.1_i386.deb and this is what you need to install your kernel with. The other three are the source deb, the headers deb and the doc deb. You can install these later. For now:
# dpkg -i kernel-image-2.6.9_Custom.1_i386.deb
It doesn't take long for this to install and then you're back at the root prompt. You can now install the other three debs that were created using dpkg -i and their full names.
I use nano to edit files in a terminal but you can use any text editor you want but you must be root to edit the /boot/grub/menu.lst file.
So here is what I personally added to the /boot/grub/menu.lst file to boot my new kernel:
title MEPIS at hda4, kernel 2.6.9
kernel (hd0,3)/boot/vmlinuz-2.6.9-ck2 root=/dev/hda4 nomce psmouse.proto=imps qu
iet splash=silent vga=791
savedefault
You can change the title to whatever you want and you will need to make the kernel point to the right partition for your system. But you can easily find out what to put for "kernel (hd?,?) and root=/dev/? in your boot option by using the same info in the kernel you are currently booted in. Make sure you point the kernel to the correct vmlinuz file in your boot directory.
There is no initrd line in my kernel option above because I didn't patch my kernel with the bootsplash patch before I compiled it. That is a choice for each person that compiles a new kernel. For me, it's faster not to have it included.
Save your settings and reboot into your new kernel which should run the centrino processor at 600 Mhz or less and increase speed when necessary. The fan will not run continuously and the whole machine should run much cooler.
After you reboot, if you use a wireless network or access the internet through wireless put the network name in the mepis system centre so you can have wireless again as you would do for a new mepis install.
Open up a terminal and become root. Type in apt-get install powernowd. This is a program which regulates cpu speed automatically and should configure itself to start automatically during bootup. That's it. Enjoy the benfits of centrino.