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
Code:
nothing to be done all
.
I searched on web but i found lots of commands to make a .ko file but nothing helps.
The problem was in the Makefile. I just copied the code from the book
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
The problem was that after ' all: ' "tab" button must be used instead of space. What I did was used space bar, that's why error pop ups. Just replacing the space with the tab button solves my problem
The problem was in the Makefile. I just copied the code from the book
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
The problem was that after ' all: ' "tab" button must be used instead of space. What I did was used space bar, that's why error pop ups. Just replacing the space with the tab button solves my problem
Other interesting thing that I found is , I used to print a message in my module_init & module_exit function. When I saw messages in my tty1, every-time before the message something shows that looks like [xxxx.xxxxxx]. what is that? That thing changes every time when I insert my module.