编译scull的驱动程序
来源:百度文库 编辑:神马文学网 时间:2024/05/20 18:05:55
用arm-linux编译scull时,遇到的错误:
问题1:
root@ubuntu:~/Desktop/scull01# make ARCH=arm CROSS_COMPILE=arm-linux- -C/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x M=`pwd` modules
make: Entering directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
CC [M] /root/Desktop/scull01/main.o
/root/Desktop/scull01/main.c:17:26: linux/config.h: No such file or directory
make[1]: *** [/root/Desktop/scull01/main.o] Error 1
make: *** [_module_/root/Desktop/scull01] Error 2
make: Leaving directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
解决办法:
直接删除config.h
参考:http://linux.chinaunix.net/bbs/archiver/tid-1025989.html
问题2:
root@ubuntu:~/Desktop/scull01# make ARCH=arm CROSS_COMPILE=arm-linux- -C/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x M=`pwd` modules
make: Entering directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
CC [M] /root/Desktop/scull01/main.o
CC [M] /root/Desktop/scull01/pipe.o
CC [M] /root/Desktop/scull01/access.o
/root/Desktop/scull01/access.c: In function `scull_u_open':
/root/Desktop/scull01/access.c:106: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:107: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:114: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c: In function `scull_w_available':
/root/Desktop/scull01/access.c:165: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:166: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c: In function `scull_w_open':
/root/Desktop/scull01/access.c:179: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
/root/Desktop/scull01/access.c:179: error: (Each undeclared identifier is reported only once
/root/Desktop/scull01/access.c:179: error: for each function it appears in.)
/root/Desktop/scull01/access.c:179: error: implicit declaration of function `signal_pending'
/root/Desktop/scull01/access.c:179: error: implicit declaration of function `schedule'
/root/Desktop/scull01/access.c:184: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c: In function `scull_w_release':
/root/Desktop/scull01/access.c:205: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
/root/Desktop/scull01/access.c: In function `scull_c_open':
/root/Desktop/scull01/access.c:277: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:281: error: dereferencing pointer to incomplete type
make[1]: *** [/root/Desktop/scull01/access.o] Error 1
make: *** [_module_/root/Desktop/scull01] Error 2
make: Leaving directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
解决办法:
access.c里面增加 #include
参考:http://linux.chinaunix.net/bbs/archiver/tid-1025989.html
问题1:
root@ubuntu:~/Desktop/scull01# make ARCH=arm CROSS_COMPILE=arm-linux- -C/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x M=`pwd` modules
make: Entering directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
CC [M] /root/Desktop/scull01/main.o
/root/Desktop/scull01/main.c:17:26: linux/config.h: No such file or directory
make[1]: *** [/root/Desktop/scull01/main.o] Error 1
make: *** [_module_/root/Desktop/scull01] Error 2
make: Leaving directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
解决办法:
直接删除config.h
参考:http://linux.chinaunix.net/bbs/archiver/tid-1025989.html
问题2:
root@ubuntu:~/Desktop/scull01# make ARCH=arm CROSS_COMPILE=arm-linux- -C/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x M=`pwd` modules
make: Entering directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
CC [M] /root/Desktop/scull01/main.o
CC [M] /root/Desktop/scull01/pipe.o
CC [M] /root/Desktop/scull01/access.o
/root/Desktop/scull01/access.c: In function `scull_u_open':
/root/Desktop/scull01/access.c:106: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:107: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:114: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c: In function `scull_w_available':
/root/Desktop/scull01/access.c:165: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:166: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c: In function `scull_w_open':
/root/Desktop/scull01/access.c:179: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
/root/Desktop/scull01/access.c:179: error: (Each undeclared identifier is reported only once
/root/Desktop/scull01/access.c:179: error: for each function it appears in.)
/root/Desktop/scull01/access.c:179: error: implicit declaration of function `signal_pending'
/root/Desktop/scull01/access.c:179: error: implicit declaration of function `schedule'
/root/Desktop/scull01/access.c:184: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c: In function `scull_w_release':
/root/Desktop/scull01/access.c:205: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
/root/Desktop/scull01/access.c: In function `scull_c_open':
/root/Desktop/scull01/access.c:277: error: dereferencing pointer to incomplete type
/root/Desktop/scull01/access.c:281: error: dereferencing pointer to incomplete type
make[1]: *** [/root/Desktop/scull01/access.o] Error 1
make: *** [_module_/root/Desktop/scull01] Error 2
make: Leaving directory `/root/Desktop/uclinux02/uClinux-dist/linux-2.6.x'
解决办法:
access.c里面增加 #include
参考:http://linux.chinaunix.net/bbs/archiver/tid-1025989.html
编译scull的驱动程序
驱动程序
一步步设计自己的驱动程序
驱动程序的备份与恢复
ffmpeg的编译大全
cl的编译参数
qvfb的快速独立编译
编译自己的gstreamer插件
Linux系统的硬件驱动程序编写原理
教你取消烦人的驱动程序认证
驱动程序的备份与恢复_nnffnn
驱动程序的备份与恢复_nnffnn
“最科学的安装驱动程序顺序”
uClinux设备驱动程序的设计与编写
怎样编译nutch0.7.1的源代码。
编译qt及qvfb遇到的问题
QtCreator中编译qvfb失败的原因
《编译技术》课程教学的一些体会
常见的20种VC++编译错误信息
wince驱动快速编译调试的方法
uClinux编译过程中生成的文件
最常用的非即插即用驱动程序的说明
设备驱动程序通知应用程序的几种方法||设备驱动|
Linux操作系统网络驱动程序编写 - Ursa_Major的专栏 - CSDNBlog