rtlinux固件下,CAM-8MS1M摄像头无法识别和使用

固件类型:官方提供的固件
固件文件名称:FIREFLY-RK3568-AIOJ_RTLINUX_MINIMALUBUNTU-GPT-2021
固件下载地址:Firefly | 让科技更简单,让生活更智能
Log日志:log.zip

本帖最后由 lanbah 于 2022-4-25 17:41 编辑

root@firefly:~# media-ctl -p -d /dev/media0
Media controller API version 4.19.193

Media device information
------------------------
driver          rkisp-vir0
model           rkisp0
serial
bus info
hw revision     0x0
driver version  4.19.193

Device topology
- entity 1: rkisp-isp-subdev (4 pads, 7 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
                [fmt:SBGGR10_1X10/800x600 field:none
                 crop.bounds:(0,0)/800x600
                 crop:(0,0)/800x600]
                <- "rkisp-csi-subdev":1 [ENABLED]
                <- "rkisp_rawrd0_m":0 []
                <- "rkisp_rawrd2_s":0 []
        pad1: Sink
                <- "rkisp-input-params":0 [ENABLED]
        pad2: Source
                [fmt:YUYV8_2X8/800x600 field:none colorspace:smpte170m quantization:full-range
                 crop.bounds:(0,0)/800x600
                 crop:(0,0)/800x600]
                -> "rkisp_mainpath":0 [ENABLED]
                -> "rkisp_selfpath":0 [ENABLED]
        pad3: Source
                -> "rkisp-statistics":0 [ENABLED]

- entity 6: rkisp-csi-subdev (6 pads, 5 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                <- "rockchip-csi2-dphy0":1 [ENABLED]
        pad1: Source
                -> "rkisp-isp-subdev":0 [ENABLED]
        pad2: Source
                -> "rkisp_rawwr0":0 [ENABLED]
        pad3: Source
        pad4: Source
                -> "rkisp_rawwr2":0 [ENABLED]
        pad5: Source
                -> "rkisp_rawwr3":0 [ENABLED]

- entity 13: rkisp_mainpath (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video0
        pad0: Sink
                <- "rkisp-isp-subdev":2 [ENABLED]

- entity 19: rkisp_selfpath (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
        pad0: Sink
                <- "rkisp-isp-subdev":2 [ENABLED]

- entity 25: rkisp_rawwr0 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
        pad0: Sink
                <- "rkisp-csi-subdev":2 [ENABLED]

- entity 31: rkisp_rawwr2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
        pad0: Sink
                <- "rkisp-csi-subdev":4 [ENABLED]

- entity 37: rkisp_rawwr3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video4
        pad0: Sink
                <- "rkisp-csi-subdev":5 [ENABLED]

- entity 43: rkisp_rawrd0_m (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
        pad0: Source
                -> "rkisp-isp-subdev":0 []

- entity 49: rkisp_rawrd2_s (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
        pad0: Source
                -> "rkisp-isp-subdev":0 []

- entity 55: rkisp-statistics (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video7
        pad0: Sink
                <- "rkisp-isp-subdev":3 [ENABLED]

- entity 61: rkisp-input-params (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video8
        pad0: Source
                -> "rkisp-isp-subdev":1 [ENABLED]

- entity 67: rockchip-csi2-dphy0 (2 pads, 1 link)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev2
        pad0: Sink
        pad1: Source
                -> "rkisp-csi-subdev":0 [ENABLED]

root@firefly:~# v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='NV12' --stream-mmap=4 --set-selection=target=crop,flags=0,top=0,left=ght=1080 --stream-to=./out.yuv
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
        Width/Height      : 800/600
        Pixel Format      : 'NV12'
        Field             : None
        Number of planes  : 1
        Flags             :
        Colorspace        : Default
        Transfer Function : Default
        YCbCr Encoding    : Default
        Quantizatio[   16.770205] rkisp-vir0: update sensor info failed -19
n      : Full Range
        Plane 0           :
           Bytes per Line : 800
           Size Image     : 720000
VIDIOC_G_SELECTION: ok
VIDIOC_S_SELECTION: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: failed: No such device

如上记录,media-ctl和v4l2-ctl使用情况,附件为开机log。
同样的开发板和摄像头,烧录ubuntu20,ubuntu18的固件可以使用。
猜测与rtlinux专用固件相关,但是还不确定。
请各位工程师朋友积极提供解决思路,谢谢!

tchip_askquestions
log.zip (20.2 KB)

rtlinux版的系统镜像,官方教程rtlinxu使用说明没有提到关于摄像头的内容。
如果想要驱动CAM-8MS1M摄像头,就要重新编译kernel,但是目前没有找到官方rtlinux版kernel的开源。
是我没找对地方,还是官方目前还没有打算在此版本上支持摄像头?望看到的工程师朋友提点,谢谢!

我把系统升级为AIO-3568J-UBUNTU18.04-GPT-20220222-1626,同样使用以下两个命令
media-ctl -p -d /dev/media0
v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=‘NV12’ --stream-mmap=4 --set-selection=target=crop,flags=0,top=0,left=ght=1080 --stream-to=./out.yuv
就能够正常使用摄像头。

发布的 rtlinux 固件默认没有打开这个摄像头的支持

哦,那就明白了,谢谢大神回复。
请问是否知道,rtlinux的内核有开源计划吗?