Results 1 to 6 of 6
Thread: Kernel compliation
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
01-03-2013 #1
Kernel compliation
how to kernel compilation?
and
what is the purpose?
-
01-03-2013 #2
You don't really need to build your own kernel any more, but some people do it for fun or to learn something. And some people (like me) do it to simplify the boot process. If you build your disk and filesystem drivers right into the kernel, you can dispense with the initrd (ramdisk) that stock kernels use and boot straight to your hard drive, which is a lot faster.
If you want to try it, it's not that difficult. Download the kernel source, unpack it in your home directory and go into the top-level directory of the tree. Type "Make gconfig" (if you use Gnome) or "Make xconfig" (for KDE users) and just move up and down the menu trees. But don't remove options blindly or you'll get something that doesn't work. Always use kernel help; it'll tell you whether you need to use an option or not.
When you have completed the configuration, save your config file and use the following commands:
1) make (to build the kernel itself)
2) make modules (to build any extra modules you want to use)
3) make modules_install
4) cp arch/x86/boot/bzImage /boot/vmlinuz-(something)
Steps 3 & 4 must be done as root and you must give your vmlinuz file (which is the new compressed kernel) a suffix that distinguishes it clearly from the existing kernel. Then update your bootloader so that it can boot the new kernel as an alternative to the old one.
But don't be surprised if it doesn't boot properly the first time! That's how you learn how to do it properly. And that's why you always leave the existing kernel in place until you definitely know that the new one works."I'm just a little old lady; don't try to dazzle me with jargon!"
www.hrussman.entadsl.com
-
01-03-2013 #3
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,732
Take a look at the HowTo linked below for some kernel building tips:
Digital Hermit - Kernel-Build-HOWTO
It's getting some age on it, but much of it still applies to current kernels.oz
-
01-03-2013 #4
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
- Posts
- 14,038
If you use a Red Hat derived system, you will need to use the rpmbuild command to build your kernel. It is as Hazel said, you mostly don't need to know how to do that these days, but most distributions do have useful FAQ or Wiki articles that will tell you precisely how to build and install a kernel for your specific system. I am a professional Linux engineer and write device drivers upon occasion, but even then I don't need to build the kernel. In fact, I don't think I have built one since almost the beginning of last year, and that was to test some optional kernel stuff that I ran in a virtual machine - not on my main workstation.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
-
01-04-2013 #5
- Join Date
- Dec 2008
- Location
- Lund, Sweden
- Posts
- 31
I guess all major distributions have their own helper applications for building and installing kernels to make it easier to do. For Debian (and I guess all Debian-derived systems such as Ubuntu and Mint) there are kernel building packages which assist you in building your kernel, right up to adding as an option in the grub boot menu.
-
01-04-2013 #6
hazel,oz,Rubberman,ricard
Thanks for giving valuable information....