天嵌 ARM开发社区

 找回密码
 注册
查看: 1798|回复: 2

移植手册的Step 22编写第一个驱动程序遇到的问题

[复制链接]
wangshenbo 发表于 2013-1-28 15:34:53 | 显示全部楼层 |阅读模式
再做step22时遇到如下问题,找不到这些问题的路径,怎么办呢??已经做好的内核中复制过来吗??还是……    请求大神帮助!!!
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
  CC [M]  drivers/char/EmbedSky_hello.o
drivers/char/EmbedSky_hello.c:13:32: error: asm/arch/regs-gpio.h: No such file or directory
drivers/char/EmbedSky_hello.c:14:26: error: asm/hardware.h: No such file or directory
drivers/char/EmbedSky_hello.c:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EmbedSky_hello_init'
drivers/char/EmbedSky_hello.c:22:9: warning: missing terminating " character
drivers/char/EmbedSky_hello.c:22: error: missing terminating " character
drivers/char/EmbedSky_hello.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EmbedSky_hello_exit'
drivers/char/EmbedSky_hello.c: In function '__inittest':
drivers/char/EmbedSky_hello.c:33: error: 'EmbedSky_hello_init' undeclared (first use in this function)
drivers/char/EmbedSky_hello.c:33: error: (Each undeclared identifier is reported only once
drivers/char/EmbedSky_hello.c:33: error: for each function it appears in.)
drivers/char/EmbedSky_hello.c: In function '__exittest':
drivers/char/EmbedSky_hello.c:34: error: 'EmbedSky_hello_exit' undeclared (first use in this function)
make[2]: *** [drivers/char/EmbedSky_hello.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2
亚瑟王 发表于 2013-1-28 16:21:57 | 显示全部楼层
亲,你在2.6.30.4中编写的驱动,然后复制的手册中的内容?手册中的内容是针对2.6.25.8的内核。
建议你直接从光盘中的2.6.30.4内核中的获取源码。
美丽天使不爱你 发表于 2013-2-28 12:14:36 | 显示全部楼层
要是你用的是2.6.30.4的内核的话前两个问题是这样的,头文件不在你写的路径下面,在arch/arm/mach-s3c2410/include/mach下面找到regs-gpio.h和hardware.h两个头文件复制到根文件的asm目录下面就可以了。后面两个问题是init和exit函数的问题,是在自动创建设备节点的时候遇到的问题,把class—creat和class-destroy前面的class删除后编译就没有问题了这是因为2.6.30以后的内核更新的缘故,希望有帮助!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-4-27 23:30 , Processed in 1.046875 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表