返回信息流大家好,我们实验室自己做了一块基于TI DM6446的视频采集板,视频decode芯片用的TVP5146。linux系统内核是Monta Vista,跑的网络文件系统,在内核驱动配置的时候配置了video capture 和TVP5146的驱动。但在linux跑起来以后,/dev 文件夹下没有Video0这个设备,请问大家知道是什么原因吗?搞了好多天,都没找到原因,非常郁闷,希望能得到大家的帮助,先谢谢了
视频驱动如下:
1.tvp5146驱动
2.CCD 控制器驱动。TVP5146驱动是由CCD控制驱动调用的
附件(20.6KB) tvp5146.c
附件(61.8KB) davinci_vpfe.c
这是一条镜像帖。来源:北邮人论坛 / embedded-system / #5118同步于 2009/6/16
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Embedded_System机器人发帖
DM6446视频驱动问题求助
zhurj123
2009/6/16镜像同步30 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
贴驱动没有用,估计你们设计应该跟原厂板是一样的,你们拿到的montavista内核里的驱动应该是没有问题的.先贴贴启动信息吧
有没有启动udev?如果没有启动udev的话设备是不会自己出现的,可以手动创建
lrwxrwxrwx 1 root root 10 Apr 5 13:22 video0 -> v4l/video0
lrwxrwxrwx 1 root root 10 Apr 5 13:22 video2 -> v4l/video2
lrwxrwxrwx 1 root root 10 Apr 5 13:22 video3 -> v4l/video3
crw-r--r-- 1 root root 81, 0 Jan 14 15:13 video0
crw-r--r-- 1 root root 81, 2 Jan 14 15:13 video2
crw-r--r-- 1 root root 81, 3 Jan 14 15:13 video3
非常感谢您的指导,由于我是从底层硬件开始做起来的,所以linux下的视频的东西不是特别懂。我想问您下如果是自己手动创建的话,具体操作步奏是什么?还有就是手动创建以后没有什么简单的办法可以验证驱动是否工作?
具体启动信息如下:
Linux version 2.6.10_mvl401-davinci_evm (root@localhost.localdomain) (gcc versio
n 3.4.3 (MontaVista 3.4.3-25.0.30.0501131 2005-07-23)) #55 Fri Jun 12 16:33:15 C
ST 2009
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Machine: DaVinci EVM
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: mem=54M console=ttyS0,115200n8 root=/dev/nfs noinitrd rw ip
=dhcp nfsroot=59.64.155.176:/opt/nfs video=dm64xxfb:output=pal davinci-vpfe.devi
ce_type=1
PID hash table entries: 256 (order: 8, 4096 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 54MB = 54MB total
Memory: 51328KB available (2614K code, 623
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
desched cpu_callback 2/00000000
desched thread 0 started up.
NET: Registered protocol family 16
Registering platform device 'nor_davinci.0'. Parent at platform
Registering platform device 'nand_davinci.0'. Parent at platform
Registering platform device 'musb_hdrc'. Parent at platform
DaVinci I2C DEBUG: 16:24:42 Jun 12 2009
Registering platform device 'i2c'. Parent at platform
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
NTFS driver 2.1.22 [Flags: R/W].
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
yaffs Jun 12 2009 16:24:12 Installing.
Registering platform device 'davincifb.0'. Parent at platform
Console: switching to colour frame buffer device 90x36
Registering platform device 'davinci_resiz
Registering platform device 'davinci_previewer.2'. Parent at platform
Registering platform device 'davinci_pwm0.0'. Parent at platform
Registering platform device 'davinci_pwm1.1'. Parent at platform
Registering platform device 'davinci_pwm2.2'. Parent at platform
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
Registering platform device 'serial8250'. Parent at platform
ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
ttyS1 at MMIO 0x1c20400 (irq = 41) is a 16550A
io scheduler noop regi
io scheduler anticipatory registered
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
Registering platform device 'ti_davinci_emac'. Parent at platform
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC: Installed 1 instances.
netconsole: not configured, aborting
i2c /dev entries driver
Linux video capture interface: v1.00
Registering platform device 'vpfe.1'. Parent at platform
TVP5150 support for SEED_DVS6446 by Stephen Zhang
elevator: using anticipatory as default io scheduler
DaVinci NAND Controller rev. 2.1
NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 8-bit
)
Scanning device for bad blocks
Creating 1 MTD partitions on "NAND 64MiB 1,8V 8-bit":
0x00460000-0x04000000 : "Flash Partition 0"
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
drivers/usb/media/konicawc.c: Konica Webcam driver v1.4
drivers/usb/media/usbvideo.c: usbvideo_register: module == NULL!
usbcore: registered new driver konicawc
usbcore: registered new driver ov511
drivers/usb/media/ov511.c: v1.64 for Linux 2.5 : ov511 USB Camera Driver
drivers/usb/media/se401.c: SE401 usb camera driver version 0.24 registering
usbcore: registered new driver se401
usbcore: registered new driver stv680
drivers/usb/media/stv680.c: [usb_stv680_init:1492] STV(i): usb camera driver ver
sion v0.25 registering
drivers/usb/media/stv680.c: STV0680 USB Camera
mice: PS/2 mouse device common for all mice
musb_hdrc: version 2.2a/db-0.4.8 [pio] [host] [debug=0]
musb_hdrc: USB Host mode controller at c3866000 using PIO, IRQ 12
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Registering platform device 'mmc0.1'. Parent at platform
: Supporting 4-bit mode
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 211.68.71.4, my address is 59.64.155.54
IP-Config: Complete:
device=eth0, addr=59.64.155.54, mask=255.255.255.0, gw=59.64.155.1,
host=59.64.155.54, domain=bupt.edu.cn, nis-domain=(none),
bootserver=211.68.71.4, rootserver=59.64.155.176, rootpath=
Looking up port of RPC 100003/2 on 59.64.155.176
Looking up port of RPC 100005/1 on 59.64.155.176
VFS: Mounted root (nfs file
Mounted devfs on /dev
Freeing init memory: 144K
INIT: version 2.85 booting
Mounting a tmpfs over /dev...done.
Creating initial device nodes...done.
Activating swap...done.
Remounting root filesystem...done.
Calculating module dependencies
WARNING: Couldn't open directory /lib/modules/2.6.10_mvl401-davinci_evm: No such
file or directory
FATAL: Could not open /lib/modules/2.6.10_mvl401-davinci_evm/modules.dep.temp fo
r writing: No such file or directory
Loading modules:
Starting checking all file systems: fsck
fsck 1.35 (28-Feb-2004)
Starting mounting local filesystems: mount nothing was mounted
Cleaning: /etc/network/ifstate.
Setting up IP spoofing protection: rp_filter.
Disable TCP/IP Explicit Congestion Notification: done.
Starting network interfaces: done.
Starting hotplug subsystem:
pci
pci [success]
usb
usb [success]
isapnp
isapnp [success]
ide
ide [success]
input
input [success]
scsi
scsi [success]
done.
Starting portmap daemon: portmap.
Cleaning: /tmp /var/lock /var/run done.
Setting pseudo-terminal access permissions...done.
Updating /etc/motd...done.
INIT: Entering runlevel: 3
Starting system log daemon: syslogd klogd.
Starting NFS common utilities: statd lockd.
Starting internet superserver: inetd.
Starting MontaVista target tools daemon: mvltdmvltd version 2.1 MontaVista Softw
are,Inc.
然后就启动成功了
Linux video capture interface: v1.00
Registering platform device 'vpfe.1'. Parent at platform
TVP5150 support for SEED_DVS6446 by Stephen Zhang
看起来没啥问题,
你建设备节点吧
mkdir /dev/v4l
mknod /dev/v4l/video0 c 81 0
mknod /dev/v4l/video1 c 81 1
mknod /dev/v4l/video2 c 81 2
mknod /dev/v4l/video3 c 81 3
ln -s /dev/v4l/video0 /dev/video0
ln -s /dev/v4l/video1 /dev/video1
ln -s /dev/v4l/video2 /dev/video2
ln -s /dev/v4l/video3 /dev/video3
然后你在板子上cat /dev/video0 如果设备没有注册会有提醒,否则就说明该设备已经注册了,一般问题就不大了
如果有问题你首先要确认硬件有没有问题,5146跟cpu就那么几根线连着,你看看有没有信号吧
恩,太感谢了。我用I2C控制的TVP5146视频解码器,设备主节点号也是81吗?我照您说的方法执行了一下,节点也都创建了,在dev目录下显示如下:
lrwxrwxrwx 1 root root 10 Jun 6 11:57 video0 -> v4l/video0
lrwxrwxrwx 1 root root 10 Jun 6 11:57 video1 -> v4l/video1
lrwxrwxrwx 1 root root 10 Jun 6 11:57 video2 -> v4l/video2
lrwxrwxrwx 1 root root 10 Jun 6 11:57 video3 -> v4l/video3
我还想确认下驱动是否工作,用如下方法可以吗?
root@59.64.155.54:/dev# cat video0
cat: video0: No such device
如果可以,是不是说我的驱动还是没有把芯片驱起来?
不太了解你用的那个芯片,但从驱动和打印信息看现在的video0应该是不对的,而且你在内核中添加了许多USB摄像头的驱动.这些也占用节点号的.也就是说你的video0很可能是USB摄像头.
哦,USB的摄像头驱动倒是可以删掉,这样倒是可以排除一些干扰。
像这个解码芯片的主节点号可以通过哪些方法查到呢?TI的相关文档我都看了,没有提到节点创建的问题,他们的文档关于视频采集的部分都很简单,给我的感觉就是驱动编译进内核以后,/dev下就会有Video0这个文件。很是困惑啊!!
我在内核源码树的Documentation device.txt下面找到我这个内核视频采集的主节点也是81,启动后执行cat /proc/devices结果如下:
root@59.64.155.54:~# cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
81 video4linux
89 i2c
90 mtd
128 ptm
136 pts
180 usb
251 PWM
252 DaVinciPreviewer
253 Resizer
254 devfs
但在执行了版主大人指点的节点创建办法后,执行cat /dev/video0 依然提示cat: video0: No such device
是不是可以说驱动已经跑起来了,现在很有可能是硬件的问题?
那你这个就不是因为设备节点创建的问题了,估计是因为TVP5146的问题设备没有注册成
功,另外,video0是vpfe的设备,tvp5146通过这个设备来进行控制
建议你首先确认硬件没有问题,上面已经跟你说了,尤其是自己做的板子,先硬件后软件吧
【 在 zhurj123 (小竹) 的大作中提到: 】
: 恩,太感谢了。我用I2C控制的TVP5146视频解码器,设备主节点号也是81吗?我照您说的方法执行了一下,节点也都创建了,在dev目录下显示如下:
: lrwxrwxrwx 1 root root 10 Jun 6 11:57 video0 -> v4l/video0
: lrwxrwxrwx 1 root root 10 Jun 6 11:57 video1 -> v4l/video1
: ...................
另外,也make menuconfig看一下device driver->multimedia devices->video capture adaper 选上 Davinci Video Capture 之后下面有没有TVP5146选上?编译内核之后,tvp5146.c文件有没有被编译?
看你的log: TVP5150 support for SEED_DVS6446 by Stephen Zhang
开始以为是驱动版本问题,后来想想会不会是因为你忘了配置选错了设备?