shaswat
Advanced Member level 4
Here I work on my first device driver code. I simply start copying a code from LDD edition 3 and trying to execute the code using makefile. It should work but its not executing. First I think there would be some problem in my make command or it might be not updated. So I update my make command package but its still not working\. Everytime I execute the make command in terminal it shows
.
I searched on web but i found lots of commands to make a .ko file but nothing helps.
For simplicity here is my code
and my Makefile code
Any new idea would be really appreciated
Code:
nothing to be done all
I searched on web but i found lots of commands to make a .ko file but nothing helps.
For simplicity here is my code
Code:
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
{
printk(KERN_ALERT "Hello, world\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}
module_init(hello_init);
module_exit(hello_exit);
and my Makefile code
Code:
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Any new idea would be really appreciated