zynqmp (ultra96-v2)mipi 链接raspberry pi v2.1摄像头模组 一ubuntu16.04实现

petalinux和vivado的工程参考
zynqmp (ultra96-v2)mipi 链接raspberry pi v2.1摄像头模组 一linux+petalinux_rootfs实现

ubuntu16.04的移植参考
移植ubuntu16.04到arm/aarch64
需要做的修改如下:

  • 1.修改petalinux的config文件如下

  • 2.重新执行petalinux-build

  • 3.将petalinux生成的文件系统的/lib/mod* 以及firmware拷贝到ubuntu16.04的同等目录

  • 4.将petalinux生成的文件系统的/root目录下的wifi相关的文件拷贝到ubuntu6.04的wifi目录,并修改wifi相关的参数

  • 5.上电,此时屏幕上应该有控制台的输出,连接wifi

  • 6.执行如下命令

#安装包
apt-get install -y locales dialog
apt-get install console-setup
#执行
dpkg-reconfigure console-setup
dpkg-reconfigure keyboard-configuration
#重启
apt install build-essential pkg-config python  python-dev  python-setuptools  python-wheel  python-pip python3 python3-dev python3-setuptools python3-wheel python3-pip python-numpy python3-numpy cmake make 

apt install x-window-system-core xorg matchbox-window-manager  matchbox-desktop

9..将如下xorg.conf拷贝到/etc/X11/目录,没有该文件则新建

Section "Device"
        Identifier      "ZynqMP"
        Driver          "armsoc"
        Option          "DRI2"                  "true"
        Option          "DRI2_PAGE_FLIP"        "false"
        Option          "DRI2_WAIT_VSYNC"       "true"
        Option          "DEBUG"                 "true"
EndSection

Section "Screen"
        Identifier      "DefaultScreen"
        Device          "ZynqMP"
EndSection
  • 10.在/etc/init.d中添加matchbox_start.sh并添加如下文件,添加到自动启动(执行update-rc.d matchbox_start.sh defaults 99)
#!/bin/sh
export DISPLAY=:0.0
xinit &
matchbox-window-manager &
  • 12.源码交叉编译opencv3.4.1
  • 13.将v4l2.ko caminit 以及test拷贝板子上,加入opencv的动态链接路径,
  • 14.上电执行insmod v4l2.ko ./caminit
  • test
posted @ 2020-07-15 15:18  tccxy  阅读(628)  评论(0编辑  收藏  举报