 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

23rd February 2011, 02:46 PM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 2

|
|
|
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 !
|

23rd February 2011, 03:17 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,975

|
|
|
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.
|

23rd February 2011, 03:28 PM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,613

|
|
|
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
|

23rd February 2011, 03:36 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,975

|
|
|
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.
|

23rd February 2011, 03:47 PM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,613

|
|
|
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)
|

24th February 2011, 01:12 AM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 2

|
|
|
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.
|

24th February 2011, 01:26 AM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,613

|
|
|
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 01:33 AM.
|

17th July 2012, 09:01 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Location: USA
Posts: 1

|
|
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.
|

18th July 2012, 03:19 AM
|
 |
Administrator
|
|
Join Date: Aug 2009
Posts: 6,613

|
|
|
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.
|

8th November 2012, 03:32 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: FL
Posts: 19

|
|
|
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?
|

8th November 2012, 05:08 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: how to install kernel source tree of fedora 14's current kernel ?
Try
Code:
yum install kernel-headers
yum install kernel-devel
|

8th November 2012, 06:35 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: FL
Posts: 19

|
|
|
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?
|

9th November 2012, 07:25 AM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: how to install kernel source tree of fedora 14's current kernel ?
Try
Older versions have probably been removed from the repositories.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 19:40 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|