我刷了晕哥的OV2640固件,然后我自己弄了一个OV2640的内核。使用晕哥固件拍照没问题。
然后换上Debian9.9的系统,里面安装了ffmpeg。我使用指令
ffmpeg -f v4l2 -video_size 800x600 -i /dev/video0 -frames 1 out.jpg
然后报错如下。这玩意怎么解决???
[video4linux2,v4l2 @ 0x5231e0] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0x5231e0] Time per frame unknown
[ 655.763013] ffmpeg: page allocation failure: order:8, mode:0xcc0(GFP_KERNEL), nodemask=(null)
[ 655.771678] CPU: 0 PID: 236 Comm: ffmpeg Not tainted 5.2.0-licheepi-zero #1
[ 655.778630] Hardware name: Allwinner sun8i Family
[ 655.783363] [<c010ed14>] (unwind_backtrace) from [<c010b72c>] (show_stack+0x10/0x14)
[ 655.791107] [<c010b72c>] (show_stack) from [<c0699330>] (dump_stack+0x84/0x98)
[ 655.798330] [<c0699330>] (dump_stack) from [<c01fbf30>] (warn_alloc+0xcc/0x170)
[ 655.805638] [<c01fbf30>] (warn_alloc) from [<c01fcb40>] (__alloc_pages_nodemask+0xacc/0xcf4)
[ 655.814070] [<c01fcb40>] (__alloc_pages_nodemask) from [<c0114350>] (__dma_alloc_buffer.constprop.4+0x34/0x17c)
[ 655.824147] [<c0114350>] (__dma_alloc_buffer.constprop.4) from [<c01144bc>] (__alloc_remap_buffer+0x24/0x98)
[ 655.833962] [<c01144bc>] (__alloc_remap_buffer) from [<c0114558>] (remap_allocator_alloc+0x28/0x30)
[ 655.842996] [<c0114558>] (remap_allocator_alloc) from [<c01146fc>] (__dma_alloc+0x16c/0x2c8)
[ 655.851424] [<c01146fc>] (__dma_alloc) from [<c01148d4>] (arm_dma_alloc+0x40/0x48)
[ 655.858988] [<c01148d4>] (arm_dma_alloc) from [<c017c928>] (dma_alloc_attrs+0x100/0x110)
[ 655.867080] [<c017c928>] (dma_alloc_attrs) from [<c0512da0>] (vb2_dc_alloc+0x60/0x104)
[ 655.874994] [<c0512da0>] (vb2_dc_alloc) from [<c050ccac>] (__vb2_queue_alloc+0x184/0x444)
[ 655.883165] [<c050ccac>] (__vb2_queue_alloc) from [<c050d4bc>] (vb2_core_reqbufs+0x2c4/0x440)
[ 655.891681] [<c050d4bc>] (vb2_core_reqbufs) from [<c0510d34>] (vb2_ioctl_reqbufs+0xa0/0xc8)
[ 655.900029] [<c0510d34>] (vb2_ioctl_reqbufs) from [<c04ecd20>] (__video_do_ioctl+0x288/0x454)
[ 655.908549] [<c04ecd20>] (__video_do_ioctl) from [<c04ed280>] (video_usercopy+0x23c/0x504)
[ 655.916808] [<c04ed280>] (video_usercopy) from [<c02287a8>] (do_vfs_ioctl+0xac/0x8cc)
[ 655.924631] [<c02287a8>] (do_vfs_ioctl) from [<c0228ffc>] (ksys_ioctl+0x34/0x58)
[ 655.932021] [<c0228ffc>] (ksys_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 655.939665] Exception stack(0xc3173fa8 to 0xc3173ff0)
[ 655.944713] 3fa0: 005231e0 00000000 00000003 c0145608 beab41f8 b5857af1
[ 655.952882] 3fc0: 005231e0 00000000 beab4290 00000036 ffffffe7 00000000 005238c0 beab41f8
[ 655.961047] 3fe0: 00000001 beab41b4 b6f167b7 b5857af8
[ 655.966218] Mem-Info:
[ 655.968511] active_anon:3427 inactive_anon:154 isolated_anon:1
[ 655.968511] active_file:3577 inactive_file:2858 isolated_file:1
[ 655.968511] unevictable:4 dirty:7 writeback:0 unstable:0
[ 655.968511] slab_reclaimable:630 slab_unreclaimable:1467
[ 655.968511] mapped:5008 shmem:429 pagetables:140 bounce:0
[ 655.968511] free:1421 free_pcp:17 free_cma:0
[ 656.000905] Node 0 active_anon:13708kB inactive_anon:616kB active_file:14308kB inactive_file:11432kB unevictable:16kB isolated(anon):4kB isolated(file):4kB mapped:20032kB dirty:28kB writeback:0kB shmem:1716kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[ 656.024016] Normal free:5684kB min:936kB low:1168kB high:1400kB active_anon:13708kB inactive_anon:616kB active_file:14308kB inactive_file:11432kB unevictable:16kB writepending:28kB present:65536kB managed:56092kB mlocked:16kB kernel_stack:392kB pagetables:560kB bounce:0kB free_pcp:68kB local_pcp:68kB free_cma:0kB
[ 656.051697] lowmem_reserve[]: 0 0 0
[ 656.055185] Normal: 173*4kB (ME) 87*8kB (UME) 51*16kB (ME) 25*32kB (ME) 12*64kB (ME) 7*128kB (M) 2*256kB (M) 1*512kB (M) 0*1024kB 0*2048kB 0*4096kB = 5692kB
[ 656.069205] 6865 total pagecache pages
[ 656.072949] 0 pages in swap cache
[ 656.076271] Swap cache stats: add 0, delete 0, find 0/0
[ 656.081486] Free swap = 0kB
[ 656.084360] Total swap = 0kB
[ 656.087252] 16384 pages RAM
[ 656.090040] 0 pages HighMem/MovableOnly
[ 656.093868] 2361 pages reserved
[ 656.097039] sun6i-csi 1cb4000.csi: dma_alloc_coherent of size 720896 failed
[video4linux2,v4l2 @ 0x5231e0] ioctl(VIDIOC_REQBUFS): Cannot allocate memory
/dev/video0: Cannot allocate memory
离线
@ookk303
好的谢谢ChatGPT。爱来自openai。
(刚刚好准备起床去问ChatGPT,你就帮我问了)
离线