Fedora Linux Support Community & Resources Center
  #1  
Old 23rd February 2011, 03:46 PM
kevlin Offline
Registered User
 
Join Date: Feb 2011
Posts: 2
windows_7ie
how to install kernel source tree of fedora 14's current kernel ?

I have installed the fedora 14, but there is no kernel source tree.
I read the doc "building a custom kernel".
But I don't want to rebuild a new kernel.
I just want to install the source tree of current kernel.
Could someone tell me the way?
Thanks a lot !
  #2  
Old 23rd February 2011, 04:17 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 5,539
linuxchrome
Re: how to install kernel source tree of fedora 14's current kernel ?

If I understand your question, just install kernel-devel.

A few things to note here--if your kernel is the PAE kernel, then install kernel-PAE-devel (or maybe kernel-pae-devel). Also, it will install the latest kernel's source packages, so if you are running say, 2.6.32-3 and did an update, downloading 2.6.32-4, but haven't yet rebooted, if you try to do compiling that requires kernel sources, it won't be able to find them.

Hopefully, this is clear, (I'm in a bit of a rush), if not, just ask.

So, first do

uname -r

That gives you your running kernel, for example, 2.6.32.3 (more numbers)

Now, if PAE or pae was in that result, do yum install kernel-pae-devel

If not, do yum install kernel-devel and make sure the number (the 2.6 and so on) matches the uname -r. result.
  #3  
Old 23rd February 2011, 04:28 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,334
linuxfedorafirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

I don't think that kernel-devel installs the full kernel source, but just enough that you can compile and build kernel modules.

The full kernel source is in the source repos. You can download the source rpm file without installing it using yum downloader..

Code:
yumdownloader --source kernel
then you can build the dependancies

Code:
su -c 'yum-builddep kernel-<version>.src.rpm'
then install the kernel source

Code:
rpm -Uvh kernel-<version>.src.rpm

or alternatively you can enable the source repos (you would need either fedora, updates, and updates-testing depending on kernel version) and install the kernel source
  #4  
Old 23rd February 2011, 04:36 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 5,539
linuxchrome
Re: how to install kernel source tree of fedora 14's current kernel ?

You're quite possibly right. Blch, I see I don't have a box to test with now, but rpm -qi says


This package provides kernel headers and makefiles sufficient to build modules
against the kernel package.
  #5  
Old 23rd February 2011, 04:47 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,334
linuxfedorafirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

well, the full kernel source is in the source repos (fedora-source, updates-source, or updates-testing-source depending on the kernel version) The kernel-devel is in the regular repos.

you can enable fedora-source, updates-source, and updates-testing-source, the do a "yum install kernel-source" and it should install the source.

There really isn't a reason to install the full source unless you plan to build a custom kernel, or just want the source to look around in and see how things work. it's a fairly large package and not one I would recommend just keeping around unless you need it. (the rpm is like 75-80 MB, and that expands out quite a lot when installed)
  #6  
Old 24th February 2011, 02:12 AM
kevlin Offline
Registered User
 
Join Date: Feb 2011
Posts: 2
windows_xp_2003ie
Re: how to install kernel source tree of fedora 14's current kernel ?

I want to do some driver program, so I need the kernel source tree to compile my modules.
I install fedora 14, the kernel is 2.6.35.6-fc14.i686.
So I want to install the source tree corresponding to kernel 2.6.35.6-fc14.i686.
  #7  
Old 24th February 2011, 02:26 AM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,334
linuxfedorafirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

to just compile kernel modules, then you can install the kernel-devel package and that is sufficient. You don't need the entire kernel source tree for compiling modules.

Code:
yum install kernel-devel
will get you the latest kernel-devel package. You would want to also do yum update kernel to use that. The latest kernel for F14 in the repo's is 2..6.35.11-83-fc14.i686

Last edited by DBelton; 24th February 2011 at 02:33 AM.
  #8  
Old 17th July 2012, 10:01 PM
myriahjane Offline
Registered User
 
Join Date: Jul 2012
Location: USA
Posts: 1
macoschrome
Smile Re: how to install kernel source tree of fedora 14's current kernel ?

@DBelton,

Thank you. Your instructions helped me with my OLD emachine running (for 2 days now) Fedora 17 and an NVidia GeForce MX card.
  #9  
Old 18th July 2012, 04:19 AM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,334
linuxfirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

Glad to have helped you

You may run into problems trying to run F17 with a GeForce MX (is it a geforce 4 or an older geforce 2?) card if you try to run Gnome shell.

My advice would be to look at some of the lighter desktops like possibly xfce.
  #10  
Old 8th November 2012, 04:32 PM
eddyq Offline
Registered User
 
Join Date: Nov 2012
Location: FL
Posts: 19
windows_xp_2003firefox
Re: how to install kernel source tree of fedora 14's current kernel ?

I'm using Fedora 17 and uname shows this:
3.6.3-1.fc17.i686

Do I need to append something to the "yum install kernel-devel" in order to get the correct source?

Actually I could get away with just /usr/src/linux/include I think because I'm installing VMware Tools and it is calling for that folder ... but I think it has to be for 3.6.3, right?
  #11  
Old 8th November 2012, 06:08 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,078
linuxfirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

Try

Code:
yum install kernel-headers

yum install kernel-devel
  #12  
Old 8th November 2012, 07:35 PM
eddyq Offline
Registered User
 
Join Date: Nov 2012
Location: FL
Posts: 19
windows_xp_2003firefox
Re: how to install kernel source tree of fedora 14's current kernel ?

I switched to Fedora 17 and ran the above yum commands. But it downloaded a later version than I currently have ("yum install kernel-devel" downloaded 3.6.5-1.fc17.i686 but uname -r shows 3.6.3-1.fc17.i686). Is there a way to name the version on the yum command?
  #13  
Old 9th November 2012, 08:25 AM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,078
linuxfirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

Try

Code:
yum update kernel
Older versions have probably been removed from the repositories.
  #14  
Old 3rd July 2013, 03:12 PM
visakh Offline
Registered User
 
Join Date: Jul 2013
Location: Kochi
Posts: 2
linuxfirefox
Re: how to install kernel source tree of fedora 14's current kernel ?

know ur currently running kernel by "uname -r"
suppose for eg: it listed as 3.3.4-5.fc17.i686
then install source tree of current kernel using command
" yum install kernel-devel-3.3.4"
Closed Thread

Tags
current, fedora, install, kernel, source, tree

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
how to load USB device drivers into kernel source & source tree? im2saxy Installation, Upgrades and Live Media 2 6th May 2007 12:35 PM
Kernel Source Tree Directory Structure Michael Harris Using Fedora 3 22nd February 2006 01:22 AM
Install kernel-devel and build source code tree Michael Harris Installation, Upgrades and Live Media 2 20th February 2006 10:27 PM
How do I get & install current kernel source ? ss_fedora Using Fedora 1 12th April 2005 05:52 AM


Current GMT-time: 02:24 (Friday, 21-11-2014)

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
Djidiouia - Laoag Photos - Yelizavetinskaya Photos