<---- template headericclude ----->
how to install kernel source tree of fedora 14's current kernel ?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 14 of 14
  1. #1
    Join Date
    Feb 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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. #2
    Join Date
    Jan 2010
    Posts
    8,210
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    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. #3
    Join Date
    Aug 2009
    Posts
    11,397
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    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. #4
    Join Date
    Jan 2010
    Posts
    8,210
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    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. #5
    Join Date
    Aug 2009
    Posts
    11,397
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    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. #6
    Join Date
    Feb 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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. #7
    Join Date
    Aug 2009
    Posts
    11,397
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    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. #8
    Join Date
    Jul 2012
    Location
    USA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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. #9
    Join Date
    Aug 2009
    Posts
    11,397
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    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. #10
    Join Date
    Nov 2012
    Location
    FL
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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. #11
    Join Date
    Dec 2006
    Posts
    2,088
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to install kernel source tree of fedora 14's current kernel ?

    Try

    Code:
    yum install kernel-headers
    
    yum install kernel-devel

  12. #12
    Join Date
    Nov 2012
    Location
    FL
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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. #13
    Join Date
    Dec 2006
    Posts
    2,088
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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. #14
    Join Date
    Jul 2013
    Location
    Kochi
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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"

Similar Threads

  1. how to load USB device drivers into kernel source & source tree?
    By im2saxy in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 6th May 2007, 11:35 AM
  2. Kernel Source Tree Directory Structure
    By Michael Harris in forum Using Fedora
    Replies: 3
    Last Post: 22nd February 2006, 01:22 AM
  3. Install kernel-devel and build source code tree
    By Michael Harris in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 20th February 2006, 10:27 PM
  4. How do I get & install current kernel source ?
    By ss_fedora in forum Using Fedora
    Replies: 1
    Last Post: 12th April 2005, 04:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]