Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-04-2005, 08:40 AM   #1
LQ Newbie
Registered: Jan 2005
Distribution: Debian
Posts: 8

Rep: Reputation: 0
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 ?
Old 03-04-2005, 03:07 PM   #2
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45

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.

Old 03-21-2005, 09:31 AM   #3
LQ Newbie
Registered: Jan 2005
Distribution: Debian
Posts: 8

Original Poster
Rep: Reputation: 0

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble Compiling Kernel Module... Elric of Grans Linux - General 2 05-31-2006 01:57 AM
creating Makefile with multiple kernel module files b123coder Programming 0 12-26-2004 09:41 AM
Trouble replacing a kernel module with the latest version Khang Linux - General 2 11-02-2004 10:56 AM
debian kernel module subfolders 2.2 v 2.4 h_lina_k Linux - General 0 03-10-2004 05:40 PM
Having trouble with spin_lock in omnibook.o kernel module eggs Linux - Software 0 01-20-2003 11:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration