vgrabbj-0.9.6移植过程中得问题
vgrabbj-0.9.6移植过程中得问题
因为项目的需要,本来只是做测量平台,后来因为导师要求,要加上摄像头来监控,于是查了一上午的文档,不想自己写驱动,也没有必要写驱动,所以,就找万能驱动最后找到gscape,在现在的内核上本来就由支持,所以,不需要自己下载源码包了,在编译内核的时候自己选择上就可以了,如果在编译选项里面没有,那么你就要修改kconfig和makefile文件添加上就可以了,现在再说抓图软件,就是涉及到图像的v4l系列的变成,我网上查了下,发现vgrabbj-0.9.6是个不错了抓图软件,在交叉编译的时候遇到不少麻烦,现在将遇到的问题集中下,以防下次再次出现:问题一:
- arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -c vgrabbj.c
- vgrabbj.c: In function 'read_image':
- vgrabbj.c:287: warning: pointer targets in return differ in signedness
- vgrabbj.c: In function 'conv_image':
- vgrabbj.c:302: warning: pointer targets in assignment differ in signedness
- vgrabbj.c:333: warning: pointer targets in assignment differ in signedness
- vgrabbj.c:336: warning: pointer targets in return differ in signedness
- vgrabbj.c: In function 'main':
- vgrabbj.c:359: warning: pointer targets in assignment differ in signedness
- vgrabbj.c:360: warning: pointer targets in assignment differ in signedness
- vgrabbj.c:363: warning: pointer targets in assignment differ in signedness
- vgrabbj.c:366: warning: pointer targets in assignment differ in signedness
- arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -c v_config.c
- In file included from v_config.h:28,
- from v_config.c:26:
- v_options.h:26: error: static declaration of 'l_opt' follows non-static declaration
- vgrabbj.h:307: error: previous declaration of 'l_opt' was here
- v_config.c: In function 'init_defaults':
- v_config.c:186: error: lvalue required as unary '&' operand
- v_config.c:187: error: lvalue required as unary '&' operand
- v_config.c:188: error: lvalue required as unary '&' operand
- v_config.c:190: error: lvalue required as unary '&' operand
- v_config.c:194: error: lvalue required as unary '&' operand
- v_config.c:200: error: lvalue required as unary '&' operand
- v_config.c:201: error: lvalue required as unary '&' operand
- v_config.c:242: error: lvalue required as unary '&' operand
- v_config.c:244: error: lvalue required as unary '&' operand
- v_config.c:246: error: lvalue required as unary '&' operand
- v_config.c:248: error: lvalue required as unary '&' operand
- v_config.c:250: error: lvalue required as unary '&' operand
- v_config.c: In function 'decode_options':
- v_config.c:490: error: lvalue required as left operand of assignment
- make: *** [v_config.o] Error 1
下载下来,打上补丁:patch -p1 < vgrabbj_0.9.6-3.1.diff
再次编译,出现问题二:
问题二:
- WARNING: `automake-1.4' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
- proper tools for further handling them. Check the `README' file,
- it often tells you about the needed prerequirements for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing `automake-1.4' program.
- make: *** [Makefile.in] Error 1
很明显的提示:automake-1.4,我查看我的版本是1-11,看来太新了也不行,果断卸载重装1.4,然后编译,顺利通过。
运行是的问题:
交叉编译过后,就下载在ARM板上运行,提示错误很多,修改了配置文件,等原因,还是有问题,回到源代码,对比信息,发现是设置图像属性是出问题,即IOCTL函数出问题,也找了一天,研究代码,最后确定问题在内核,重新编译内核,在USB选项下也要选择对应的选项,最后成功了,运行时错误信息记录在实验室电脑上,没在寝室电脑上,就不记录了,欢迎和大家交流。
评论暂时关闭