[Ilugc] How to compile module
ssantosh at fossix.org
Thu Dec 11 13:56:04 IST 2008
Ashish Verma wrote:
> I have a pcnet32.c file. I want to make a module out of it. What should I
> do. The below link requires me to make a make file. I don't know how to do
> that. Please advise.
> To unsubscribe, email ilugc-request at ae.iitm.ac.in with
> "unsubscribe <password> <address>"
> in the subject or body of the message.
Do you have a custom compiled kernel? If so then, it is not necessary to
download headers. If not, you have to download the headers and write a
makefile. The makefile is very simple.
obj-m += <yourfile.o>
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
There is no specific directory to place your source, just compeile it
and later you can insert.
More information about the ilugc