Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1128735
  • 博文数量: 276
  • 博客积分: 8317
  • 博客等级: 少将
  • 技术积分: 2329
  • 用 户 组: 普通用户
  • 注册时间: 2006-09-12 08:17
个人简介

http://ads.buzzcity.net/adpage.php?partnerid=40096

文章分类

全部博文(276)

文章存档

2013年(1)

2012年(38)

2011年(102)

2010年(85)

2009年(45)

2008年(5)

分类: LINUX

2011-04-05 19:37:22

话说Gentoo下配置这个鸟东东还比较折腾人的,所以这个地方暂时记录下自己的折腾经历。
首先是驱动,话说linux下的万事一切从驱动开始。插上我的那个好久没有用过的USB摄像头,用lsusb看一下,结果发现:
Bus 008 Device 002: ID 0ac8:3333 Z-Star Microelectronics Corp.
恩,不懂,所以google吧。网上搜索到很多关于这个的文章,大致看了下。先去配置内核,我的.config文件内容有关于USB摄像头的部分如下:
  1. CONFIG_MEDIA_SUPPORT=m

  2. #
  3. # Multimedia core support
  4. #
  5. CONFIG_VIDEO_DEV=m
  6. CONFIG_VIDEO_V4L2_COMMON=m
  7. # CONFIG_VIDEO_ALLOW_V4L1 is not set
  8. CONFIG_VIDEO_V4L1_COMPAT=y
  9. # CONFIG_DVB_CORE is not set
  10. CONFIG_VIDEO_MEDIA=m

  11. #
  12. # Multimedia drivers
  13. #
  14. # CONFIG_IR_CORE is not set
  15. CONFIG_MEDIA_ATTACH=y
  16. CONFIG_MEDIA_TUNER=m
  17. CONFIG_MEDIA_TUNER_CUSTOMISE=y
  18. CONFIG_MEDIA_TUNER_SIMPLE=m
  19. # CONFIG_MEDIA_TUNER_TDA8290 is not set
  20. # CONFIG_MEDIA_TUNER_TDA827X is not set
  21. # CONFIG_MEDIA_TUNER_TDA18271 is not set
  22. CONFIG_MEDIA_TUNER_TDA9887=m
  23. # CONFIG_MEDIA_TUNER_TEA5761 is not set
  24. # CONFIG_MEDIA_TUNER_TEA5767 is not set
  25. # CONFIG_MEDIA_TUNER_MT20XX is not set
  26. # CONFIG_MEDIA_TUNER_MT2060 is not set
  27. # CONFIG_MEDIA_TUNER_MT2266 is not set
  28. # CONFIG_MEDIA_TUNER_MT2131 is not set
  29. # CONFIG_MEDIA_TUNER_QT1010 is not set
  30. # CONFIG_MEDIA_TUNER_XC2028 is not set
  31. # CONFIG_MEDIA_TUNER_XC5000 is not set
  32. # CONFIG_MEDIA_TUNER_MXL5005S is not set
  33. # CONFIG_MEDIA_TUNER_MXL5007T is not set
  34. # CONFIG_MEDIA_TUNER_MC44S803 is not set
  35. # CONFIG_MEDIA_TUNER_MAX2165 is not set
  36. CONFIG_VIDEO_V4L2=m
  37. CONFIG_VIDEO_CAPTURE_DRIVERS=y
  38. CONFIG_VIDEO_ADV_DEBUG=y
  39. CONFIG_VIDEO_FIXED_MINOR_RANGES=y
  40. CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
  41. # CONFIG_VIDEO_VIVI is not set
  42. # CONFIG_VIDEO_BWQCAM is not set
  43. # CONFIG_VIDEO_CQCAM is not set
  44. # CONFIG_VIDEO_W9966 is not set
  45. # CONFIG_VIDEO_SAA5246A is not set
  46. # CONFIG_VIDEO_SAA5249 is not set
  47. # CONFIG_VIDEO_ZORAN is not set
  48. # CONFIG_VIDEO_MXB is not set
  49. # CONFIG_VIDEO_HEXIUM_ORION is not set
  50. # CONFIG_VIDEO_HEXIUM_GEMINI is not set
  51. # CONFIG_VIDEO_CAFE_CCIC is not set
  52. # CONFIG_SOC_CAMERA is not set
  53. CONFIG_V4L_USB_DRIVERS=y
  54. CONFIG_USB_VIDEO_CLASS=m
  55. CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
  56. CONFIG_USB_GSPCA=m
  57. # CONFIG_USB_M5602 is not set
  58. # CONFIG_USB_STV06XX is not set
  59. # CONFIG_USB_GL860 is not set
  60. # CONFIG_USB_GSPCA_BENQ is not set
  61. # CONFIG_USB_GSPCA_CONEX is not set
  62. # CONFIG_USB_GSPCA_CPIA1 is not set
  63. # CONFIG_USB_GSPCA_ETOMS is not set
  64. # CONFIG_USB_GSPCA_FINEPIX is not set
  65. # CONFIG_USB_GSPCA_JEILINJ is not set
  66. # CONFIG_USB_GSPCA_MARS is not set
  67. # CONFIG_USB_GSPCA_MR97310A is not set
  68. CONFIG_USB_GSPCA_OV519=m
  69. CONFIG_USB_GSPCA_OV534=m
  70. CONFIG_USB_GSPCA_OV534_9=m
  71. # CONFIG_USB_GSPCA_PAC207 is not set
  72. # CONFIG_USB_GSPCA_PAC7302 is not set
  73. # CONFIG_USB_GSPCA_PAC7311 is not set
  74. # CONFIG_USB_GSPCA_SN9C2028 is not set
  75. # CONFIG_USB_GSPCA_SN9C20X is not set
  76. # CONFIG_USB_GSPCA_SONIXB is not set
  77. # CONFIG_USB_GSPCA_SONIXJ is not set
  78. CONFIG_USB_GSPCA_SPCA500=m
  79. CONFIG_USB_GSPCA_SPCA501=m
  80. CONFIG_USB_GSPCA_SPCA505=m
  81. CONFIG_USB_GSPCA_SPCA506=m
  82. CONFIG_USB_GSPCA_SPCA508=m
  83. CONFIG_USB_GSPCA_SPCA561=m
  84. CONFIG_USB_GSPCA_SPCA1528=m
  85. # CONFIG_USB_GSPCA_SQ905 is not set
  86. # CONFIG_USB_GSPCA_SQ905C is not set
  87. # CONFIG_USB_GSPCA_SQ930X is not set
  88. # CONFIG_USB_GSPCA_STK014 is not set
  89. # CONFIG_USB_GSPCA_STV0680 is not set
  90. # CONFIG_USB_GSPCA_SUNPLUS is not set
  91. # CONFIG_USB_GSPCA_T613 is not set
  92. # CONFIG_USB_GSPCA_TV8532 is not set
  93. # CONFIG_USB_GSPCA_VC032X is not set
  94. CONFIG_USB_GSPCA_ZC3XX=m
  95. # CONFIG_VIDEO_PVRUSB2 is not set
  96. # CONFIG_VIDEO_HDPVR is not set
  97. # CONFIG_VIDEO_USBVISION is not set
  98. # CONFIG_USB_ET61X251 is not set
  99. # CONFIG_USB_SN9C102 is not set
  100. # CONFIG_USB_ZR364XX is not set
  101. # CONFIG_USB_STKWEBCAM is not set
  102. # CONFIG_USB_S2255 is not set
  103. # CONFIG_V4L_MEM2MEM_DRIVERS is not set
  104. # CONFIG_RADIO_ADAPTERS is not set
  105. # CONFIG_DAB is not set
然后是make && make modules_install && cp arch/x86_64/boot/bzImage /boot/linux-2.6.36-gentoo-r8
然后修改/boot/grub/grub.conf 完了reboot
重启后发现找到video设备了, ls /dev/video0
dmesg查看内核也发现了这个设备,并且在usb-core上注册成功。
好了,下面跑个应用看看。
# emerge camorama
# camorama
提示无法连接设备?晕 ,看看debug log
说VIDIOCGMBF  --  could not set buffer info, exiting...
恩,google看看
找到篇帖子
说是要在执行前export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
结果完了发现图像是出来了,但不是我想要的,如上贴所说。
又试用了下上贴提到的skype和cheese,发现ok的,效果还马马虎虎。
先记到这里吧。以后进一步看看情况。
阅读(1304) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~