根据黑金的vcu例程,使用petalinux创建工程之后,获取内核的.config文件,编译出Image文件替换调petalinux中生成Image,出现无法解码的问题
下面是现象
root@petalinux:~# gst-launch-1.0 uridecodebin uri=File:///media/sd-mmcblk1p1/h264_720P.mp4 ! queue max-size-bytes=0 ! videoconvert ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
[2021-07-09 03:56:31.704481480] [omx_core.cpp:181] [OMX_GetHandle] Couldnt allocate dma allocator (tried using /dev/allegroDecodeIP)
Missing element: H.264 (High Profile) decoder
WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)4.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)bt709, parsed=(boolean)true'.
Additional debug info:
../../../git/gst/playback/gsturidecodebin.c(920): unknown_type_cb (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0
WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: Delayed linking failed.
Additional debug info:
../../../git/gst/parse/grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0:
failed delayed linking some pad of GstURIDecodeBin named uridecodebin0 to some pad of GstQueue named queue0
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: Internal data stream error.
Additional debug info:
../../../git/gst/isomp4/qtdemux.c(6605): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
1、首先dmesg查看内核是否报错
未发现错误尝试其他解决办法
2、查看petalinux创建的vcu例程,发现在内核起来之后,加载了很多ko驱动文件
3、去xilinx的wiki上面找到一篇这样的贴子,里面包含了包的路径
xilinx的wiki链接地址
4、下面我们开始移植vcu的驱动,先介绍一下开发环境
开发平台 ubuntu 18.04
内核版本 kernel 4.19
u-boot版本 u-boot 2020.01
vitis版本 vitis 2020.2
5、搭建vivado工程,生成bit文件以及包含硬件信息的xsa文件
vivado工程文件
6、使用vitis通过xsa文件,生成启动文件fsbl.elf pmufw.elf 和 设备树代码
vitis工程文件
7、linux驱动移植
vcu视频编解码linux驱动包