Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Im getting Error as file not found...when i did insmod

Status
Not open for further replies.

sajeev

Advanced Member level 4
Joined
Apr 29, 2005
Messages
112
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Location
Kerala-India
Activity points
2,197
I am using fedora core 6(2.6.18.1).I have compiled kernel 2.6.18.2.So I wnt to do a simple device driver programe.I wrote the program below...

/* hello-1.c - The simplest kernel module.
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_ALERT */


int init_module(void)
{
printk("<1>Hello world 1.\n");

// A non 0 return means init_module failed; module can't be loaded.
return 0;
}


void cleanup_module(void)
{
printk(KERN_ALERT "Goodbye world 1.\n");
}


I used the command gcc -c hello.c
But Im getting error message as file <linux/module.h> not found.SAme error for kernel.h also.

For kernel compilation I used the area /usr/src.
I extracted the bzip file of kernel to /usr/src.
And so I got a folder as linux-2.6.18.2
Then i followd the instructions for compilation...and it was success...no error at al.

When i tried to compile the file I am getting this error.Is there any problem with the path of include file?
I could find the .h files in /usr/src/include/linux
and in /usr/src/include/asm-x86.

pls help me to make this program to work..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top