摘要:
在Ubuntu上为Android系统编写Linux内核驱动程序
——这篇文章对一个android菜鸟很有启发意义
不过这里要指出几个错误,首先,复制代码到android2.3 下的真实S5pv210 真实编译环境下编译会有如下错误
drivers/hello/hello.c: In function 'hello_create_proc':
drivers/hello/hello.c:204: error: 'struct proc_dir_entry' has no member named 'owner'
这个估计内核有改动的原因,找到linux/proc_fs.h
发现真的没有 owner相关的东西
在linux驱动来讲,这个东西并不重要,所以把hello.c 的如下部分屏蔽,就可以编译通过了
// entry->owner = THIS_MODULE; do not need the line in our S5pv210 board
还有一个应该也不行。
如下:
六. 修改arch/arm/Kconfig和drivers/kconfig两个文件,在m
阅读全文