赞
踩
xilinx-pynqz2-dpu3.0-PYNQv2.5.img
提取码:s2fe
直接把img烧写进SD卡上电即可在jupyter notebook下调用DPU进行编程。
烧写成功后将上一步生成的image.ub及BOOT.bin复制到SD卡的fat32分区,复制之前建议备份一下原来的文件。而后上电并确认IP地址,ssh到板子。
# 将xilinx用户添加进vim
sudo su
echo "xilinx ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
exit
sudo apt-mark hold vim*
sudo vim /etc/apt/sources.list
输入如下内容
deb https://mirrors.geekpie.club/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.geekpie.club/ubuntu-ports/ bionic main main restricted universe multiverse
deb https://mirrors.geekpie.club/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.geekpie.club/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.geekpie.club/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.geekpie.club/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.geekpie.club/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.geekpie.club/ubuntu-ports/ bionic-security main restricted universe multiversesudo
sudo apt update
sudo apt upgrade -y
# DNNDK C++环境需要google-glog
sudo apt install libgoogle-glog-dev -y
# DNNDK C++环境需要opencv3.1,3.3或3.4,但是ubuntu18.04默认的是opencv3.2,需要卸载掉opencv3.2才能继续安装
sudo apt remove libopencv-dev -y
# DNNDK安装Python环境需要pip
sudo apt install python-pip -y
# 目前DNNDK的Python API是基于Python2的,为了让jupyter notebook支持python2需要安装ipython kernel
sudo pip install ipykernel matplotlib==2.2.0 pillow -i https://pypi.tuna.tsinghua.edu.cn/simple
mkdir rootfs
tar -xvf rootfs.tar.gz -C rootfs
mkdir -p /usr/local/lib
mkdir -p /usr/local/bin
# 手动将opencv3.3相关的库复制到/usr/lib下
sudo cp -r rootfs/usr/include/openc* /usr/include
sudo cp -d rootfs/usr/lib/libopencv* /usr/lib
sudo cp -d rootfs/usr/lib/libwebp* /usr/lib
sudo cp rootfs/usr/lib/pkgconfig/opencv.pc /usr/lib/pkgconfig
cd PYNQ-Z2
sudo chmod +x install.sh
sudo ./install.sh
sudo reboot
cd PYNQ-Z2/samples/resnet50
make
cd model
gcc -fPIC -shared dpu_resnet50_0.elf -o libdpumodelresnet50.so
sudo cp libdpumodelresnet50.so /usr/lib
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。