-   Linux - Newbie (
-   -   Debian :trouble creating a kernel module (

covertops 03-04-2005 07:40 AM

Debian :trouble creating a kernel module

I'm trying to create a kernal module. I've come up with test code but it wont compile. I had no /usr/src/linux directroy so I downloaded the 2.4.18 kernel used make, then created a symbolic link to /usr/src/linux using the 2.4.18 kernel. When compiling it was missing version.h,stdarg.h.

At the moment i'm using the 2.4.25 kernel but I still cant figure out how to compile the test module. I've looked this up but it looks like almost all kernel module documentation is for red-hat

Any help on how I could do it ?

otoomet 03-04-2005 02:07 PM


do you have a debian or custom kernel?

On my system the custom kernel sources are located at /usr/src/linux-2.6.7. I unpacked the modules into /usr/src and they compiled without problems. I have installed the following kernel-related packages:

siim@tibu:/etc/cups$ dpkg --list 'kernel*'
ii  kernel-image-2.4.27-1 2.4.27-2              Linux kernel image for version 2.4.27 on 386
ii  kernel-image-2.6.7-xt 20040913              Linux kernel binary image for version 2.6.7-xtops5.
ii  kernel-patch-scripts  0.99.35              Scripts to help dealing with packaged kernel patches
ii  kernel-pcmcia-modules 2.4.27-2              Mainstream PCMCIA modules 2.4.27 on 386
ii  linux-kernel-headers  2.5.999-test7-bk-17  Linux Kernel Headers for development

stdarg.h is located at

siim@tibu:/etc/cups$ locate stdarg.h

I guess it is a part of gcc installation, perhaps there is something wrong with your gcc? Are you able to compile something else? There are several version.h-s around here:


siim@tibu:/etc/cups$ locate /version.h
It seems that all of them are kernel related.

Perhaps it helps.


covertops 03-21-2005 08:31 AM


Thanks for the information. i have a debian kernel, it was the first time i was going to recompile the kernel.

I'll try again ... thanks

All times are GMT -5. The time now is 09:56 AM.