Fedora Linux Support Community & Resources Center
  #1  
Old 11th December 2012, 07:33 AM
flebber's Avatar
flebber Offline
Registered User
 
Join Date: Mar 2005
Location: Newcastle, Australia
Posts: 186
macossafari
How to build source kernel

I have found the fedora docs for building a kernel.
http://fedoraproject.org/wiki/Building_a_custom_kernel
This guide assumed that I would build from a src.rpm. If I wanted to build 3.7 directly from kernel.org sources then what steps are missing from the guide or is there a better guide?
Reply With Quote
  #2  
Old 11th December 2012, 01:19 PM
Yellowman
Guest
 
Posts: n/a
linuxfirefox
Re: How to build source kernel

http://leigh123linux.fedorapeople.or...1.fc19.src.rpm
Reply With Quote
  #3  
Old 11th December 2012, 02:55 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfirefox
Re: How to build source kernel

It is also documented in the source... Look in the README file as there are a number of variations.

The big one to remember is to copy a working initial configuration (this saves a LOT of time when starting) with "cp /boot/config-<version> .config" before running "make [menu|x|g|old|silent|...]config" (whichever you choose, and there are a fair number of options). This is where you can make custom configuration selections.

Once the configuration is completed, you can then do
1) make - which builds the kernel
2) make modules -- which builds modules (this step is sometimes dropped)
3) as root: make modules_install install
This last step will create modules (if not already created), install them in /lib, and create the initrd. The "install" target will put the kernel, config file, and initrd in /boot.

On my non-EFI the last steps put the kernel and initrd in /boot.

You will have to edit the grub boot menu to add that custom kernel to the menu.

---------- Post added at 09:55 AM ---------- Previous post was at 09:53 AM ----------

Most of the time, there is no issue with the kernel (I've done it several times to get patches that haven't yet made it to the repositories, which can take a month or so).
Reply With Quote
  #4  
Old 11th December 2012, 09:53 PM
flebber's Avatar
flebber Offline
Registered User
 
Join Date: Mar 2005
Location: Newcastle, Australia
Posts: 186
macosunknown
Re: How to build source kernel

Thanks to the replies.

Is there any advantage in using Leigh123 src.rpm for 19 in F18 or has he just built the modules as in steps 1 & 2 of @jpollard guide?
Reply With Quote
  #5  
Old 11th December 2012, 11:12 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfirefox
Re: How to build source kernel

It was my understanding that the source rpms were the same as that used for the binary rpm... so using them shouldn't make any difference. I don't know if the .config file is included though.
Reply With Quote
  #6  
Old 12th December 2012, 05:21 AM
Yellowman
Guest
 
Posts: n/a
linuxfirefox
Re: How to build source kernel

Quote:
Originally Posted by jpollard View Post
It was my understanding that the source rpms were the same as that used for the binary rpm... so using them shouldn't make any difference. I don't know if the .config file is included though.
I didn't change the .config
Reply With Quote
  #7  
Old 12th December 2012, 09:51 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfirefox
Re: How to build source kernel

Then you should get exactly the same binaries.

The only use of compiling a kernel would be to get either different configuration options, or to compile a generic kernel - in which case there is no .config to start with, and won't be in a source rpm...
Reply With Quote
  #8  
Old 12th December 2012, 10:16 AM
flebber's Avatar
flebber Offline
Registered User
 
Join Date: Mar 2005
Location: Newcastle, Australia
Posts: 186
windows_xp_2003chrome
Re: How to build source kernel

Thank You for clarifying
Reply With Quote
Reply

Tags
build, kernel, source

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Out of source build with make daviddoria Using Fedora 2 9th December 2011 05:11 PM
Install kernel-devel and build source code tree Michael Harris Installation and Live Media 2 20th February 2006 09:27 PM
Kernel Source Install: Failed build dependencies niterida Using Fedora 4 16th September 2005 05:13 PM
Help with Kernel source build, install ... dickinsd Using Fedora 3 31st January 2005 03:33 AM
Build rpm from source rpm nocolour Using Fedora 2 24th April 2004 12:24 PM


Current GMT-time: 09:57 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat