Results 1 to 5 of 5
Hello friends,
I am a beginner in Linux. Never did any kernel programming in Linux/Windows before. I am now on a project and I am supposed to understand a Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-25-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 15
How to use a Makefile?
Hello friends,
I am a beginner in Linux. Never did any kernel programming in Linux/Windows before. I am now on a project and I am supposed to understand a Linux Device Driver Code. It contains 6 .c files and 1 Makefile. The make file goes as this:
obj-m := X.o
X-objs := a.o b.o c.o d.o e.o f.o
I have a.c b.c c.c d.c d.c e.c f.c in the director along with the Makefile mentioned.
I am using Fedora Red Hat Linux 32 bit.
Please suggest me how to compile the Makefile.
- 02-26-2009 #2
You don't compile a Makefile. It isn't code, it's just a set of instructions for the make command. Try typing make and see what happens.
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 02-26-2009 #3
- 02-28-2009 #4Just Joined!
- Join Date
- Feb 2009
- Posts
- 15
Thanks guys!
I compiled my driver successfuly. I have also installed zlib package since my driver depends on it.
While I try to insert my module (insmod X.ko), I get an error saying "Error inserting "X.ko" : -1 Unknown symbol in module" . What am I supposed to do? I tried several ways showin in google. None of them improved my results.
Can you guys pull me out?
- 02-28-2009 #5
I think you use the module name without the .ko suffix. And it's better to use modprobe rather than insmod as it works more intelligently, pre-inserting any other modules on which yours depends.
"I'm just a little old lady; don't try to dazzle me with jargon!"


Reply With Quote
