歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> vgrabbj-0.9.6移植過程中得問題

vgrabbj-0.9.6移植過程中得問題

日期:2017/3/1 10:51:08   编辑:Linux編程
因為項目的需要,本來只是做測量平台,後來因為導師要求,要加上攝像頭來監控,於是查了一上午的文檔,不想自己寫驅動,也沒有必要寫驅動,所以,就找萬能驅動最後找到gscape,在現在的內核上本來就由支持,所以,不需要自己下載源碼包了,在編譯內核的時候自己選擇上就可以了,如果在編譯選項裡面沒有,那麼你就要修改kconfig和makefile文件添加上就可以了,現在再說抓圖軟件,就是涉及到圖像的v4l系列的變成,我網上查了下,發現vgrabbj-0.9.6是個不錯了抓圖軟件,在交叉編譯的時候遇到不少麻煩,現在將遇到的問題集中下,以防下次再次出現:

問題一:

  1. arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -c vgrabbj.c
  2. vgrabbj.c: In function 'read_image':
  3. vgrabbj.c:287: warning: pointer targets in return differ in signedness
  4. vgrabbj.c: In function 'conv_image':
  5. vgrabbj.c:302: warning: pointer targets in assignment differ in signedness
  6. vgrabbj.c:333: warning: pointer targets in assignment differ in signedness
  7. vgrabbj.c:336: warning: pointer targets in return differ in signedness
  8. vgrabbj.c: In function 'main':
  9. vgrabbj.c:359: warning: pointer targets in assignment differ in signedness
  10. vgrabbj.c:360: warning: pointer targets in assignment differ in signedness
  11. vgrabbj.c:363: warning: pointer targets in assignment differ in signedness
  12. vgrabbj.c:366: warning: pointer targets in assignment differ in signedness
  13. arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -c v_config.c
  14. In file included from v_config.h:28,
  15. from v_config.c:26:
  16. v_options.h:26: error: static declaration of 'l_opt' follows non-static declaration
  17. vgrabbj.h:307: error: previous declaration of 'l_opt' was here
  18. v_config.c: In function 'init_defaults':
  19. v_config.c:186: error: lvalue required as unary '&' operand
  20. v_config.c:187: error: lvalue required as unary '&' operand
  21. v_config.c:188: error: lvalue required as unary '&' operand
  22. v_config.c:190: error: lvalue required as unary '&' operand
  23. v_config.c:194: error: lvalue required as unary '&' operand
  24. v_config.c:200: error: lvalue required as unary '&' operand
  25. v_config.c:201: error: lvalue required as unary '&' operand
  26. v_config.c:242: error: lvalue required as unary '&' operand
  27. v_config.c:244: error: lvalue required as unary '&' operand
  28. v_config.c:246: error: lvalue required as unary '&' operand
  29. v_config.c:248: error: lvalue required as unary '&' operand
  30. v_config.c:250: error: lvalue required as unary '&' operand
  31. v_config.c: In function 'decode_options':
  32. v_config.c:490: error: lvalue required as left operand of assignment
  33. make: *** [v_config.o] Error 1
開始找原因了,百谷了下,問這樣的問題的人多,但是,回答的沒多少,沒辦法,只能去國外網站上查啊,發現有個對應的補丁文件,如是下載下來,看能否問題有好轉,

下載下來,打上補丁:patch -p1 < vgrabbj_0.9.6-3.1.diff

再次編譯,出現問題二:

問題二:

  1. WARNING: `automake-1.4' is needed, and you do not seem to have it handy on your
  2. system. You might have modified some files without having the
  3. proper tools for further handling them. Check the `README' file,
  4. it often tells you about the needed prerequirements for installing
  5. this package. You may also peek at any GNU archive site, in case
  6. some other package would contain this missing `automake-1.4' program.
  7. make: *** [Makefile.in] Error 1

很明顯的提示:automake-1.4,我查看我的版本是1-11,看來太新了也不行,果斷卸載重裝1.4,然後編譯,順利通過。

運行是的問題:

交叉編譯過後,就下載在ARM板上運行,提示錯誤很多,修改了配置文件,等原因,還是有問題,回到源代碼,對比信息,發現是設置圖像屬性是出問題,即IOCTL函數出問題,也找了一天,研究代碼,最後確定問題在內核,重新編譯內核,在USB選項下也要選擇對應的選項,最後成功了,運行時錯誤信息記錄在實驗室電腦上,沒在寢室電腦上,就不記錄了,歡迎和大家交流。

Copyright © Linux教程網 All Rights Reserved