linux 命令行 webcamera,菜鸟学Linux移植lesson3之WebCamera

网络摄像机

1、CMOS摄像头驱动的移植

准备好CMOS摄像头驱动源码,包含2个文件:ov9650.c和ov9650.h(光盘资料/源码包/驱动源码/camera 驱动),将这2个文件复制到drivers/media/video目录下。26

修改drivers/media/目录下Kconfig文件,在

101 行加入:

config S 3C2440_CAMERA

tristate "OV9650 on the S3C2440

driver"

depends on VIDEO_DEV

&& ARCH_S3C2410

default y if (VIDEO_DEV

&& ARCH_S3C2410)

修改drivers/media/video目录下Makefile文件,在166行加入:

obj-$(CONFIG_S3C2440_CAMERA)

+= ov9650.o

配置内核,支持CMOS摄像头:

Device Drivers

--->

Multimedia

support --->

OV9650 on the

S3C2440 driver

系统启动之前将摄像头模块和开发板连接好,然后启动系统输出:

initializing s3c2440 camera

interface......

s3c2440 camif init done

Loading OV9650 driver.........

OV9650 address 0x60, manufacture ID 0x7FA2,

expect 0x7FA2

OV9650 address 0x60, product ID 0x9652, expect

0x9650

OV9650 init done!

Try to bring eth0 interface up ...

/etc/rc.d/init.d/leds: line 16: led-player: not found

ifconfig eth0 hw ether 10:23:45:67:89:ab

/etc/rc.d/init.d/httpd: line 16: /sbin/boa: not found

eth0: link down

ifconfig eth0 192.168.1.6 netmask 255.255.255.0 up

add default gw 192.168.1.2

Done

Please press Enter to activate this console.

[root@EmbedSky /]# eth0: link up, 100Mbps, full-duplex, lpa

0x45E1

2、测试CMOS摄像头

[root@EmbedSky /]# mjpg_streamer -i

"/lib/WebCam/input_cmoscamera.so -r 320x256"

-o "/lib/WebCam/output_http.so -w

192.168.1.6:8080"

MJPG-streamer [473]: starting application

MJPG Streamer Version.: 2.0

MJPG-streamer [473]: MJPG Streamer Version.: 2.0

i: Using CMOS Camera device.:

/dev/camera

MJPG-streamer [473]: Using CMOS Camera device.: /dev/camera

i: Desired Resolution: 320 x 256

MJPG-streamer [473]: Desired Resolution: 320 x 256

i: Frames Per Second.: 5

MJPG-streamer [473]: Frames Per Second.: 5

i: Format............: YUV

MJPG-streamer [473]: Format............: YUV

i: JPEG Quality......: 80

MJPG-streamer [473]: JPEG Quality......: 80

Init Camera interface

failed !! exit fatal

i: init_VideoIn failed

MJPG-streamer [473]: init_VideoIn failed

百度了一下,发现有用友善之臂的开发板有解释说是由于mjpg软件并不支持所使用的摄像头类型,解决方法1、更换其他摄像头尝试;2、自行修改mjpg源代码以支持摄像头驱动程序接口。

对友善解释的这个原因还是保留意见,不过解决方法2还是值得学习。今天周六了,问题先留着,下周再找找原因,顺便提一下今天遇到的小插曲。今天烧写文件系统的时候,烧不进去,DNW传输一点点就卡住了,重新烧了几次,发现除了内核能够烧写成功,U-BOOT及文件系统均烧写失败,串口打印显示RECEIVED

FILE

SIZE: 0 ,开发板的S3C2440芯片还其烫无比。擦除了2次NAND

FLASH 最后才回归正常。

Now, Downloading [ADDRESS:30000000h,TOTAL:1219130]

RECEIVED FILE

SIZE: 0

--------------------7.12移植情况----------

##### EmbedSky BIOS for SKY2440/TQ2440 #####

Press Space key to Download Mode !

Booting Linux ...

Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00300000

... Copy Kernel to SDRAM done,NOW, Booting Linux......

Uncompressing

Linux.........................................................................................................................

done, booting the kernel.

Linux version 2.6.30.4-EmbedSky (root@localhost.localdomain)

(gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #14 Mon Jul 11

16:46:36 CST 2011

CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177

CPU: VIVT data cache, VIVT instruction cache

Machine: SMDK2440

ATAG_INITRD is deprecated; please update your bootloader.

Memory policy: ECC disabled, Data cache writeback

CPU S3C2440A (id 0x32440001)

S3C24XX Clocks, (c) 2004 Simtec Electronics

S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000

MHz

CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on

Built 1 zonelists in Zone order, mobility grouping

on. Total pages: 16256

Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc

console=ttySAC0

NR_IRQS:85

irq: clearing pending ext status 00080000

irq: clearing subpending status 00000002

PID hash table entries: 256 (order: 8, 1024 bytes)

Console: colour dummy device 80x30

console [ttySAC0] enabled

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory: 64MB = 64MB total

Memory: 60876KB available (3488K code, 374K data, 112K init, 0K

highmem)

SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1,

Nodes=1

Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

net_namespace: 296 bytes

NET: Registered protocol family 16

S3C2440: Initialising architecture

S3C2440: IRQ Support

S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics

DMA channel 0 at c4808000, irq 33

DMA channel 1 at c4808040, irq 34

DMA channel 2 at c4808080, irq 35

DMA channel 3 at c48080c0, irq 36

S3C244X: Clock Support, DVS off

bio: create slab at 0

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

s3c2440-i2c s3c2440-i2c: slave address 0x10

s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz

s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter

cfg80211: Calling CRDA to update world regulatory domain

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096

bytes)

TCP established hash table entries: 2048 (order: 2, 16384

bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

yaffs Jul 11 2011 15:26:42 Installing.

msgmni has been set to 119

alg: No test for stdrng (krng)

io scheduler noop registered (default)

Console: switching to colour frame buffer device 40x15

fb0: s3c2410fb frame buffer device

s3c2440-uart.0: tq2440_serial0 at MMIO 0x50000000 (irq = 70) is a

S3C2440

s3c2440-uart.1: tq2440_serial1 at MMIO 0x50004000 (irq = 73) is a

S3C2440

s3c2440-uart.2: tq2440_serial2 at MMIO 0x50008000 (irq = 76) is a

S3C2440

loop: module loaded

Driver 'sd' needs updating - please use bus_type methods

Driver 'sr' needs updating - please use bus_type methods

dm9000 Ethernet Driver, V1.31

Now use the default MAC address:10:23:45:67:89:ab

eth0 (dm9000): not using net_device_ops yet

eth0: dm9000e at c4810000,c4814004 IRQ 51 MAC: 10:23:45:67:89:ab

(EmbedSky)

S3C24XX NAND Driver, (c) 2004 Simtec Electronics

s3c2440-nand s3c2440-nand: Tacls=2, 20ns Twrph0=3 30ns, Twrph1=2

20ns

NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND

256MiB 3,3V 8-bit)

Scanning device for bad blocks

Bad eraseblock 653 at 0x0000051a0000

Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":

0x000000000000-0x000000040000 : "EmbedSky_Board_uboot"

0x000000200000-0x000000400000 : "EmbedSky_Board_kernel"

0x000000400000-0x00000ff80000 : "EmbedSky_Board_yaffs2"

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus

number 1

s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

usb usb1: New USB device found, idVendor=1d6b, idProduct=0001

usb usb1: New USB device strings: Mfr=3, Product=2,

SerialNumber=1

usb usb1: Product: S3C24XX OHCI

usb usb1: Manufacturer: Linux 2.6.30.4-EmbedSky ohci_hcd

usb usb1: SerialNumber: s3c24xx

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

usbcore: registered new interface driver usbserial

usbserial: USB Serial Driver core

USB Serial support registered for pl2303

usbcore: registered new interface driver pl2303

pl2303: Prolific PL2303 USB to serial adaptor driver

s3c2410_udc: debugfs dir creation failed -19

mice: PS/2 mouse device common for all mice

S3C24XX RTC, (c) 2004,2006 Simtec Electronics

s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling

s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0

i2c /dev entries driver

Linux video capture interface: v2.00

zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip

v1:1.10

usbcore: registered new interface driver zc0301

gspca: main v2.5.0 registered

usbcore: registered new interface driver uvcvideo

USB Video Class driver (v0.1.0)

S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics

s3c2410-wdt s3c2410-wdt: starting watchdog timer

s3c2410-wdt s3c2410-wdt: watchdog active, reset abled, irq

enabled

usbcore: registered new interface driver hiddev

usbcore: registered new interface driver usbhid

usbhid: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.18a.

No device for DAI UDA134X

No device for DAI s3c24xx-i2s

S3C24XX_UDA134X SoC Audio driver

UDA134X SoC Audio Codec

asoc: UDA134X s3c24xx-i2s mapping

ok

ALSA device list:

#0: S3C24XX_UDA134X (UDA134X)

TCP cubic registered

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

lib80211: common routines for IEEE802.11 drivers

s3c2410-rtc s3c2410-rtc: setting system clock to 2011-07-12

11:31:24 UTC (1310470284)

yaffs: dev is 32505858 name is "mtdblock2"

yaffs: passed flags ""

yaffs: Attempting MTD mount on 31.2, "mtdblock2"

yaffs: auto selecting yaffs2

block 622 is bad

yaffs_read_super: isCheckpointed 0

VFS: Mounted root (yaffs filesystem) on device 31:2.

Freeing init memory: 112K

Try to bring eth0 interface up ...

ifconfig eth0 hw ether 10:23:45:67:89:ab

eth0: link down

ifconfig eth0 192.168.1.6 netmask 255.255.255.0 up

add default gw 192.168.1.2

Done

/etc/init.d/rcS: line 33: qtopia: not found

insmod: cannot insert '/lib/input-polldev.ko': unknown symbol in

module, or unknown parameter

insmod: cannot insert '/lib/mac80211.ko': unknown symbol in module,

or unknown parameter

insmod: cannot insert '/lib/rt2x00lib.ko': unknown symbol in

module, or unknown parameter

insmod: cannot insert '/lib/rt2x00usb.ko': unknown symbol in

module, or unknown parameter

insmod: cannot insert '/lib/rt73usb.ko': unknown symbol in module,

or unknown parameter

insmod: cannot insert '/lib/zd1211rw.ko': unknown symbol in module,

or unknown parameter

insmod: cannot insert '/lib/ov9650.ko': unknown symbol in module,

or unknown parameter

Try to bring eth0 interface up ...

/etc/rc.d/init.d/leds: line 16: led-player: not found

ifconfig eth0 hw ether 10:23:45:67:89:ab

/etc/rc.d/init.d/httpd: line 16: /sbin/boa: not found

eth0: link down

ifconfig eth0 192.168.1.6 netmask 255.255.255.0 up

add default gw 192.168.1.2

Done

Please press Enter to activate this console.

----------------------------WebCamera_CMOS测试成功----------------

a4c26d1e5885305701be709a3d33442f.png

之前未成功是因为未将ov9650编译成模块,然后其加入/lib目录下开机自动运行即可。

测试效果:很卡,延时严重。

这个流程先告一段落,接下来移植基于Saa7113h解码的CCD摄像头网络测试。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
软件介绍:可随意截图,不管是手机上显示的还是手机摄像头里看到的,更可录像(将你在手机上玩的游戏录下来分享给好友-可谓是众乐乐啊)本软件支持USB_蓝牙_WIFI 塞班相关信息http://bbs.dospy.com/thread-5086709-1-193-4.html 安装说明:先安装Pc端_mobiola_webcam_3_0_11.exe文件后安装Webcam_v3.0.11汉化.exe会提示覆盖,点确定。 再安装手机端_webcam_s60_v_3_0.sis(此文件需你自签名!) 而后把手机和电脑用USB数据线(或蓝牙_WIFI)连接,首先打开手机端Mobiola Web Camera for S60软件,然后打开电脑端Mobiola Web Camera for S60软件,这时电脑右下方的Mobiola Web Camera for S60小图标会有一条红杠,在软件右方选择USB,然后选择端口。(端口的查看-我的电脑-右键-管理-设备管理器-端口里查找你的手机端口是哪一个)如果还是分别不出那可在电脑端Mobiola Web Camera for S60软件里一个一个试,选择好后红扛会消失,表示连接成功 在手机Mobiola Web Camera for S60介面上有两个介面,一个是cam 1和Screen。请在cam 1介面下点-选择-connect-USB 点确定。这时就会自动连接。连接成功后电脑端Mobiola Web Camera for S60软件会显示出你的手机摄像头拍摄出的情景,也可通过它截取你手机上显示的所有内容(图片格式),录像也不在话下!一个字-强... 注明:开这软件要先开手机端,再开电脑端。如果中间你关了视频,那么要把电脑端的关掉,先把手机端打开再开电脑端。支持QQ、MSN等所有聊天视频等... ____如果觉得好用 也请多关照本店(淘宝店铺:http://shop68388423.taobao.com/)软件陆续更新中____

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值