Problem in buliding a kernel module
Hi all ,
I'm trying to build a simple kernel module ..
But when running make command its giving error....
my module code is like this
*******
#include<
#include<
#include<
#include<
void func(void);
int val=300;
void func()
{
printk(" val = %d",val);
}
int init_mod(void)
{
return 0;
}
void cleanup_mod(void)
{
}
module_
module_
/*Kernel module Comments*/
MODULE_AUTHOR("TEAM VEDA");
MODULE_
MODULE_
*******
*******
obj-m =mod.o
KDIR= /lib/modules/
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
rm -rf $(wildcard *.o *.ko *.mod.* .c* .t* test Module.symvers *.order *.markers)
*******
after building , response is
*******
root@ubuntu:
make -C /lib/modules/
make[1]: Entering directory `/usr/src/
make[1]: *** No rule to make target `books/
make[1]: Leaving directory `/usr/src/
make: *** [all] Error 2
******
help me to solve this issuse
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu linux Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Colin Ian King
- Solved:
- Last query:
- Last reply: