device driver help
hi I am new to linux. i am getting problem whil compiling driver modules.i have tried with fedora6, 8.but i dont have linux/init.h, linux/module.h even after installing kernel devl rpm.
but i found them in fedora3. but compilation failed due to linkerror.that iincluded the code here #include <linux/init.h> #include <linux/module.h> #inclulde <linuk/kernel.h> MODULE_LICENSE("Dual BSD/GPL"); static int hello_init(void) { printk("<1> Hello world\n"); retrun 0; } static void hello_exit(void) { printk("<1>cruel world\n"); } module_init(hello_init); module_exit(hello_exit); the above is simple one.. help me, where i have to start and what is wrong with me thanks |
Have you got the right development files for your system?
Try Code:
sudo yum install kernel-devel Code:
sudo yum update kernel-devel |
Hi,
Most device drivers are built into the kernel itself. Most likely you should be looking for a package with kernel sources for the kernel you are running. Generally it is not good idea to mix kernel header files from one version to another. You can check the exact version you are running with command 'uname -r'. Then try to locate either the kernel headers package or entire kernel sources for that version. BR, Antti |
All times are GMT -5. The time now is 01:38 PM. |