learning how to compile kernel

Discuss Programming

learning how to compile kernel

Postby cdhgold » Mon Jun 07, 2004 8:29 am

Can anyone suggest a good reference to learn how to compile a kernel? I want to learn how to do this.

Chris
User avatar
cdhgold
administrator
administrator
 
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Postby Void Main » Mon Jun 07, 2004 8:49 am

There are probably better ones out for 2.6.x kernels now but most of this still applies:

http://voidmain.is-a-geek.net/redhat/re ... ource.html

Replace "2.4.20" with whatever kernel you want. A couple of the steps are no longer needed. In fact instead of doing all the "make" steps, if you currently are running 2.6.5-xxx that comes with FC2 and want to try 2.6.6 or 2.6.7, download the kernel you want and change into the /usr/src/linux-2.6.x (whatever kernel version you installed) diirectory and do:

# cp /boot/config-2.6.5* .config
# make oldconfig
# make all

You should also be able to pick my instructions up at "make install" if you want. Also, after doing a "make oldconfig" you might want to do a "make gconfig" to select/unselect device drivers, etc. I would not suggest using an old 2.4 config as your base, you'll be all day fixing problems with the config. The best thing to do is to use FC2's included kernel config as a baseline config if you've never compiled a kernel before. Also, do a "make help" for more make options, and of course read the README document in the kernel source root for the most accurate information. If you are not running Fedora the steps are still similar on all distros.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests