页次: 1
请问DVP 接口获取图片报错,遇到过这样的问题吗?在BSP 3.4.39 内核,zero平台,camera型号ov5640 DVP接口
# fswebcam -d /dev/video0 --no-banner -r 320x240 capture.jpg
[ 984.385627] [VFE]vfe_open
--- Opening /dev/video0...
[ 984.388786] [VFE]..........................vfe clk open!.......................
Trying source module v4l2...[ 984.400418] [VFE]vfe_open ok
[ 984.406273] [VFE_ERR]input index(0) > dev->dev_qty(1)-1 invalid!, device_valid_flag[0] = 0
/dev/video0 opened.
984.416946] [VFE]vfe_close
mNo input was specified, using t[ 984.421992] [VFE]vfe select input flag = 0, s_input have no.
he first.
Unable to qu[ 984.432242] [VFE]..........................vfe clk close!.......................
ery input 0.
VIDIOC_EN[ 984.443612] [VFE]vfe_close end
UMINPUT: Invalid argument
#
你好zero v3s 这个地方要改吗?
花了一点时间对Icenowy的patch和chong的patch进行了比较,结果发现chong的patch包基本上就是在Icenowy的基础上更改了下面的这个文件:
--- ../linux/drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-15 22:48:18.824587965 +0800
+++ drivers/clk/sunxi-ng/ccu-suniv.c 2019-01-23 09:05:17.959348454 +0800
@@ -238,7 +238,7 @@
/* The BSP header file has a CIR_CFG, but no mod clock uses this definition */static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M",
- 0x0cc, BIT(8), 0);
+ 0x0cc, BIT(1), 0);static SUNXI_CCU_GATE(dram_ve_clk, "dram-ve", "pll-ddr",
0x100, BIT(0), 0);理论上将上面这个patch应用到Icenowy的4.14内核中,USB应该也就能跑了。
请问是用的那个版本的内核呢,谢谢!
由于本人需要将sd卡作为从设备使得pc能够识别为U盘,即Mass Storage设备,在论坛得到的都是现成的,需要下载,我懒得下载,就查资料得到以下方法:
首先内核需要进行以下设置:
Device Driver ---->
USB support---->
* USB Mass Storage supportDevice Driver ---->
USB support---->
USB Gadget Support--->
<M> USB Gadget functions configurable through configfs
* Generic serial bulk in/out
* Mass storage
* Function filesystem
[M] USB Gadget precomposed configurations
[M] Mass storage Gadget然后编译内核会生成以下三个ko文件:
drivers/usb/gadget/libcomposite.ko,
drivers/usb/gadget/legacy/g_mass_storage.ko,
drivers/usb/gadget/function/usb_f_mass_storage.ko,
需要將此三个文件复制到到rootfs或是系统可以存取到的地方。rootfs根文件系统设置:
在etc/init.d/rcS 添加以下内容(我将三个文件存到了自己建的目录/ts下):
insmod /ts/libcomposite.ko
insmod /ts/usb_f_mass_storage.ko
insmod /ts/g_mass_storage.ko file=/dev/mmcblk0p1 stall=0 removable=1启动后打印如下:
[ 5.794850] Mass Storage Function, version: 2009/09/11
[ 5.800062] LUN: removable file: (no medium)
[ 5.804536] LUN: file: /dev/mmcblk0p1
[ 5.808198] Number of LUNs=1
[ 5.812871] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[ 5.819987] g_mass_storage gadget: userspace failed to provide iSerialNumber
[ 5.827029] g_mass_storage gadget: g_mass_storage ready启动后电脑也识别到了U盘,打开U盘正是我在板子上的SD卡
谢谢54anson, 请问你是在主线linux版本、zero平台吗
不用谢, 一起学习.
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
# mkdir functions/uvc.usb0/control/header/h # cd functions/uvc.usb0/control/ # ln -s header/h class/fs # ln -s header/h class/ss # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p # cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval 666666 1000000 5000000 EOF # cd $GADGET_CONFIGFS_ROOT # mkdir functions/uvc.usb0/streaming/header/h # cd functions/uvc.usb0/streaming/header/h # ln -s ../../uncompressed/u # cd ../../class/fs # ln -s ../../header/h # cd ../../class/hs # ln -s ../../header/h # cd ../../class/ss # ln -s ../../header/h Testing the UVC function ------------------------ device: run the gadget, modprobe vivid:: # uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #> where uvc-gadget is this program: http://git.ideasonboard.org/uvc-gadget.git with these patches: http://www.spinics.net/lists/linux-usb/msg99220.html host:: luvcview -f yuv
把板载摄像头转为USB摄像头.
firstman, 感谢分享,请问可以板载摄像头转为USB gadget UVC 摄像头, 支持在 nano/zero平台移植吗?谢谢!
https://github.com/torvalds/linux
源码在这里
这个作者用的是 The mainline linux kernel (4.21) has support for
刚刚试了一下:
git clone https://github.com/torvalds/linux --branch v4.21结果提示分支错误, 后来想起来根本没有v4.21嘛, 最后一个版本是v4.20
所以你可以试一试:
git clone https://github.com/torvalds/linux --branch v5.0root@me:/opt# git clone https://github.com/torvalds/linux --branch v5.0 Cloning into 'linux'... remote: Enumerating objects: 7335096, done. Receiving objects: 5% (417762/7335096), 186.67 MiB | 7.55 MiB/s
谢谢!
那楼主提供的镜像文件是基于主线linux的版本是吧?
蓝莓派项目地址: https://github.com/petit-miner/Blueberry-PI
这里面有配置文件
这个项目地址里我看到了完整的配置文件,与镜像文件;
没有找到对应的linux 内核源代码,请问镜像文件对应版本的linux 内核源代码在哪里可以下载到呢,谢谢了哦!
页次: 1