Friday, 23 August 2013

Makefile for a basic kernel module

Makefile for a basic kernel module

The following Makefile aims to create a basic Module in in the kernel 2.6.
And so, I really would like if somebody explain to me the command lines in
this Makefile.
obj−m += hello−1.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
One further question : Being in a 2.6 kernel, should I replace "hello-1.o"
by "hello-1.ko"?
Thank you a lot!

No comments:

Post a Comment