LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Linux Headers for Kernel (https://www.linuxquestions.org/questions/ubuntu-63/linux-headers-for-kernel-4175440198/)

amit1947 12-05-2012 06:16 PM

Linux Headers for Kernel
 
I want to compile a kernel module (for device driver) but I need the kernel headers installed. I have a "+drm" kernel and I can't find the proper header file package anywhere.

This is my uname results:

uname -r = 2.6.32.46+drm33.20
uname -a = Linux 7200 2.6.32.46+drm33.20 #5 Tue Dec 20 09:00:15 cst 2011 1686 1686 1386 GNU/LINUX

I downloaded a 2.6.32.46 header package and built my kernel module (.ko file) but it won't insert because of a version mismatch.

I ran "modinfo" on my module and on an existing module (that came with the installation) to compare to vermagic

My module
vermagic: 2.6.32-02063246+drm3320-generic smp mod_unload modversions 586

Working module
vermagic: 2.6.32.46+drm33.20

So there's obviously a version issue.

knudfl 12-06-2012 11:09 AM

I guess you can install another "linux-image-* " and get a matching "kernel-headers-* "

Google : 2.6.32.46+drm33.20
.. will show that the "drm33.20 changes" are included in other / later kernels.

Example ( Package "linux-headers-2.6.32-35" )
http://www.ubuntuupdates.org/package...ders-2.6.32-35
→ → Change Log →
* Linux 2.6.32.46+drm33.20
-- Herton Ronaldo Krzesinski Mon, 10 Oct 2011

.

amit1947 12-06-2012 02:40 PM

Thanks for the reply.

If I upgrade the kernel and I have existing kernel modules (3rd party device drivers), will those kernel modules no longer load?

knudfl 12-06-2012 04:17 PM

Quote:

.. existing kernel modules (3rd party device drivers),
will those kernel modules no longer load ?
Right, they must be updated too.

amit1947 12-07-2012 08:56 PM

The system returns:

uname -a = Linux 7200 2.6.32.46+drm33.20 #5 Tue Dec 20 09:00:15 cst 2011 1686 1686 1386 GNU/LINUX

Any idea what the "Linux 7200" part refers to?

Thanks in advance.

knudfl 12-07-2012 10:03 PM

# 5

"Linux 7200" is a (random ?) name for your "Ubuntu computer",
assignet at OS install time.

The installer says : The name of your computer : <Something>
Then you can change it, if you want a different "computer name".


Example from an old install of Ubuntu 10.10,
with a name suggested by the installer :
$ uname -a
Linux knudfl-939Dual-SATA2 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 x86_64 GNU/Linux


.


All times are GMT -5. The time now is 08:48 PM.