Environment: ubuntu11.04 tool: make, gcc, make-kpkg kernel source code: linux-2.6.38.8 steps, so after the claim...
Environment: ubuntu 11.04
Tools: make, gcc, and make-kpkg
Kernel Source: linux-2.6.38.8
Steps:
1. download the internal source code package to the official website (my next is linux-2.6.38.8.tar.bz2)
2. open the terminal and raise the permission (because the following operations are performed as administrators, so I will use the command line to perform various operations after obtaining the permission. I prefer command line operations ),
Run "sudo su" to raise the permission. enter the password and press enter,
If the permission is successfully raised, it will become a root user.
3. decompress the package to/usr/src, that is, all the kernel source code is in the/usr/src/linux-2.6.38.8,
(1)you can double-click linux-2.6.38.8.tar.bz2,
(2) then copy to/usr/src
Run cp-dir linux-2.6.38.8/usr/src/linux-2.6.38.8"
Note:
Because the directory is copied, rather than the file, you need to add the-dir option, if the copy is successful, then you can see the linux-2.6.38.8 directory under/usr/src,
4. go to the directory where the source code is located.
Run; "cd/usr/src/linux-2.6.38.8"
5. clear the temporary files left by the previous compilation. if the source code package is just unlocked, skip this step.
Execute; "make mrproper"
6. automatically streamline the kernel (this will make compilation faster)
Execute; "make localmodconfig"
7. start to compile the kernel. (This step will take a long time. it took me about an hour to compile the kernel)
Execute; "make-kpkg clean"
Run: "fakeroot make-kpkg -- initrd -- append-to-version =-yuanfan kernel_image"
Note: The "-yuanfan" can be changed to your favorite content, according to my compiled kernel name is "linux-image-2.6.38.8-yuanfan_2.6.38.8-yuanfan-10.00.Custom_i386.deb"
8. install the kernel
You can double-click to install the compiled kernel in the previous directory,
Note: Because I have already installed it, it is "Reinstall" or "install ".
9. restart the system
10. view the version number.
Run: "uname-r"
If you have "yuanfan", it means you have succeeded ~~
From Linuxer's Blog