Hi, ppl. I'm trying to compile a driver which is
in /usr/src/linux/driver. I'm doing it like this:
HERE ADVICE FRO THE BOOK:
To compile a kernel driver as a module, toggle the corresponding menu choice button to <M> while configuring the kernel. Most of the device driver examples in this book are implemented as kernel modules. To build a module mymodule.ko from its source file mymodule.c, create a one-line Makefile and execute it as follows:
Code:
bash> cd /usr/src/linux/drivers/usb/class
bash> echo "obj-m += mymodule.ko" > Makefile
bash> make –C /usr/src/linux/drivers/usb/class/ M=`pwd` modules
but I get error like this:
Code:
make: Entering directory /usr/src/linux-2.6.28/drivers/usb/class
make: *** No rule to make target `modules`. Stop.
What's wrong? How compile a module from source code?