Winterrage
February 4th, 2008, 04:07 PM
Hello everyone,
We're having a class at the university where you have to program various basic Linux Drivers. Right now i'm trying to compile those drivers from home. I'm having this simple driver:
-------------------------------------------------------------
#include <linux/init.h>
#include <linux/module.h>
static int hello_init(void)
{
printk(KERN_ALERT "Hello World!");
return 0;
}
static void hello_exit(void)
{
printk(KERN ALERT "Goodbye Cruel World");
}
module_init(hello_init);
module_exit(hello_exit);
---------------------------------------------------------
However, i'm trying to compile using a standard gcc -O -c helloworld.c and i'm getting these errors:
linux/init.h is not found
linux/module.h is not found
Is there any pre-requisite for drivers programmation?
Thanks!
We're having a class at the university where you have to program various basic Linux Drivers. Right now i'm trying to compile those drivers from home. I'm having this simple driver:
-------------------------------------------------------------
#include <linux/init.h>
#include <linux/module.h>
static int hello_init(void)
{
printk(KERN_ALERT "Hello World!");
return 0;
}
static void hello_exit(void)
{
printk(KERN ALERT "Goodbye Cruel World");
}
module_init(hello_init);
module_exit(hello_exit);
---------------------------------------------------------
However, i'm trying to compile using a standard gcc -O -c helloworld.c and i'm getting these errors:
linux/init.h is not found
linux/module.h is not found
Is there any pre-requisite for drivers programmation?
Thanks!