Announcement

Collapse
No announcement yet.

[KERNEL] How to get RIGHT kernel source?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [KERNEL] How to get RIGHT kernel source?

    I just downloaded the kernel source, but I found the kernel VERSION Is not the same as the one current running;

    The running kernel version is 2.6.35-22-generic (uname -r), but the kernel VERSION in the Makefile of source tree is 2.6.35.11; Where is the the kernel source for the current version?

    I tried use the kernel header package (/usr/src/linux-headers-2.6.35-22-generic) to compile my driver kernel module, it is no problem to compile and install; but when I use the kernel source, it reports me the invalid module format while installing. I known it is the kernel version issue, but it's still fail even I manually modify the kernel version in the Makefile of source tree as the same.

    Any Idea? How can I download the right kernel source for running version?

    /Wallace

    #2
    Re: [KERNEL] How to get RIGHT kernel source?

    Any one can help

    Comment


      #3
      Re: [KERNEL] How to get RIGHT kernel source?

      install the package linux-source, which should download the source for the kernel version you are running iirc

      Comment


        #4
        Re: [KERNEL] How to get RIGHT kernel source?

        Originally posted by claydoh
        install the package linux-source, which should download the source for the kernel version you are running iirc
        Hi laydoh,

        It didn't, the downloaded kernel source is different from the running one; the output of the uname -r is 2.6.35-22-generic, and the version indicated in the kernel source is 2.6.35-11.

        I can modify the version in the Makefile in the source tree to pass the compilation of my module, but still failed in installing module; so I believe the kernel source is different from the running one.

        /Wallace

        Comment


          #5
          Re: [KERNEL] How to get RIGHT kernel source?

          also note that 2.6.35-22 is not the same as 2.6.35.11 note the "dot" and the "dash" I have not had to compile a kernel module in some years, but I believe that (at least in theory) there should be no differences between say, 2.6.35DOT11 and 2.6.35DOT22 for compiling modules. the dash is iirc distro-specific revision, but someone with more at-hand knowledge should add their info here.....

          Comment


            #6
            Re: [KERNEL] How to get RIGHT kernel source?

            Hi laydoh,

            I know your point, but that still can't explain why I got invalid module format based on downloaded kernel source .......

            /Wallace

            Comment

            Working...
            X