2009年5月6日
摘要: 1 设备驱动放在什么地方?2 如何实现开机自动加载?3是不是应该在xorg.conf中增加一个Modue节点呢?4tslib库的移植问题 //我的板子是用的扬创提供的,内核版本是2.6.13,只需要在交叉编译tslib时选定一个module_raw选项,然后将交叉编译好的库文件移植到板子上就可以用了5刘淼《嵌入式系统接口设计与Linux驱动程序开发》6 /home/administrator/nf... 阅读全文
posted @ 2009-05-06 21:59 清水湾 阅读(319) 评论(0) 推荐(0)
摘要: Char Device Driver相关数据结构:struct cdev { struct kobject kobj; struct module *owner; const struct file_operations *ops; struct list_head list; dev_t dev; unsigned int count;};struct kobj_map { struct pro... 阅读全文
posted @ 2009-05-06 12:59 清水湾 阅读(811) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/iczyh/archive/2008/11/25/3373350.aspx内核中每个字符设备都对应一个 cdev 结构的变量,下面是它的定义:struct cdev { struct kobject kobj; // 每个 cdev 都是一个 kobject struct module *owner; // 指向实现驱动的模块 const struct ... 阅读全文
posted @ 2009-05-06 12:46 清水湾 阅读(344) 评论(0) 推荐(0)
摘要: 内核中所有已分配的字符设备编号都记录在一个名为 chrdevs 散列表里。该散列表中的每一个元素是一个 char_device_struct 结构,它的定义如下: static struct char_device_struct { struct char_device_struct *next; // 指向散列冲突链表中的下一个元素的指针 unsigned int major; // 主设备... 阅读全文
posted @ 2009-05-06 12:40 清水湾 阅读(726) 评论(0) 推荐(0)