|
Driver porting: hello worldDriver porting: hello worldPosted 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
(Log in to post comments)
Driver porting: hello world Posted Sep 20, 2005 15:17 UTC (Tue) by jeanwelly (guest, #29199) [Link] I use "insmod hello.ko " to use the module, It's OK when I check the kernel message. But when I want to remove the module, error found:
[root@localhost kernel-dev]# rmmod -f hello.ko
Does any one know why?
Driver porting: hello world Posted Jan 13, 2008 5:51 UTC (Sun) by manish_badarkhe (guest, #49929) [Link] I think your device is in some other mode(read or write) while you are removing the device
|
Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.