Driver porting: hello world
Driver porting: hello world
Posted Aug 26, 2005 20:24 UTC (Fri) by vleo (guest, #32027)In reply to: Driver porting: hello world by sockie
Parent article: Driver porting: hello world
Everybody new to driver development - RTFM - Read Rubini's book.
Most people having problem with hello_world driver don't understand that you should have Linux kernel sources installed and configured, 'make menuconfig' is your friend. Only after that you can start building your own drivers.
Good place to put sources into is for example /usr/src/linux-2.6.12 (for kernel 2.6.12). If you untar kernel souce into /usr/src you would be pretty close to that.
Then make sure you have following among gcc flags in your Makefile:
-I /usr/src/linux-2.6.12/include
If you do not have that, #includes like <linux/types.h> would get file /usr/include/linux/types.h, which is certainly not what you want to be included as opposed to /usr/src/linux-2.6.12/include/linux/types.h
