因为项目的需要,本来只是做测量平台,后来因为导师要求,要加上摄像头来监控,于是查了一上午的文档,不想自己写驱动,也没有必要写驱动,所以,就找万能驱动最后找到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
再次编译,出现问题二:
问题二: