当前位置:   article > 正文

VitisAI_1.2 Vitis2020.1 zynq7020环境搭建(一)_zynq7020 vitis

zynq7020 vitis

VitisAI_1.2 Vitis2020.1 zynq7020环境搭建(一)

安装Vitis_2020.1环境

  1. 下载vitis_2020.1软件安装包 官方网站35.5个G
  2. 安装虚拟机Ubuntu18.04.1(240Gssd + 8Gram + 12kernel)
  3. 更换系统设置软件下载服务器为阿里云
  4. vitis安装说明
  5. 将vitis安装包拷贝到虚拟机中,解压
  6. ubuntu安装依赖
sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update
sudo apt-get install libgl1-mesa-glx
sudo apt-get install libgl1-mesa-dri
sudo apt-get install libgl1-mesa-dev
sudo add-apt-repository --remove ppa:xorg-edgers/ppa
sudo apt install net-tools
sudo apt-get install -y unzip
sudo apt install gcc
sudo apt install g++
sudo apt install python
ln -s /usr/bin/python2 /usr/bin/python
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  1. 在主目录中新建/tools 并改变所有者为自己的用户 我的是wim
cd /
sudo mkdir tools
sudo chgrp wim tools -R
sudo chown wim tools -R
  • 1
  • 2
  • 3
  • 4
  1. 安装vitis
    在安装包解压后目录中运行xsetup,避免后续权限问题,不可用sudo
./xsetup
选择安装vitis,会自动安装vivado
  • 1
  • 2

安装petalinx20.1

  1. 安装anaconda3
./Anaconda3-4.3.1-Linux-x86_64.sh
  • 1
  1. 创建petalinux环境
conda create --n petalinux pip python=3.6
  • 1
  1. 进入petalinux环境
source activate petalinux
  • 1
  1. 切换/bin/sh 为bash
sudo dpkg-reconfigure dash
选择no
  • 1
  • 2
  1. 安装依赖包,(xilinx/support/answers/73296.html下有脚本)可以下载,下面是脚本
plnx-env-setup.sh

#!/bin/bash

#PetaLinux environment setup script
#original version by Tony McDowell (tmcdowe@xilinx.com)
#updated version by Sandeep Gundlupet Raju (sandeep.gundlupet-raju@xilinx.com)

# Enable debug=1 mode -- this disables actual changes on the host machine using dry-run options.
# Disable debbug=0 to proceed with installation
debug=0;

#get OS pretty name
osPrettyName=`cat /etc/os-release | grep PRETTY_NAME | sed 's/.*="\(.*\)"/\1/'`;
centosVersion=`cat /etc/centos-release | sed 's/[^0-9.]*\([0-9.]*\).*/\1/'`;
osKernelVer=`uname -r`

echo "***************************************************************";
echo "PetaLinux Environment Setup Tool";
echo "Running on $osPrettyName ($osKernelVer)";
echo "***************************************************************";
#print the debug message header
if [ $debug -eq 1 ]; then echo "***DEBUG MODE ON!***"; fi; 
echo " "

echo -n "NOTE: Check for superuser..."
#get the actual user
if [ $SUDO_USER ]; then actualUser=$SUDO_USER; else actualUser=`whoami`; fi
#get the effective user
currentUser=`whoami`
if [ $currentUser != "root" ]; then echo "FAILED! \r\n Please re-run this script as sudo"; exit 1; else echo "SUCCESS! (from "$actualUser")"; fi;

#determine the host OS from the pretty_name
if [[ $(echo $osPrettyName | grep buntu) ]]; then
	hostOS="ubuntu";
	#echo "Running on Ubuntu";
elif [[ $(echo $osPrettyName | grep CentOS) ]]; then
	hostOS="centos";
	echo "Running on CentOS version $centosVersion";
elif [[ $(echo $osPrettyName | grep "Red Hat") ]]; then
	hostOS="rhel";
	#echo "Running on Red Hat";
else
	echo "ERROR: Cannot determine host operating system!"
	echo "This script is only supported on Ubuntu, CentOS, and RHEL Linux distribution!"
	exit 1;	
fi;

## declare the package lists
debPackages=(iproute2 gawk python3 python build-essential gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget git-core diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib automake zlib1g:i386 screen pax gzip cpio python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3);

rhelPackages=(net-tools gawk make wget tar bzip2 gzip python3 unzip perl patch diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python3-pip python3-GitPython python3-jinja2 python3-pexpect xz which SDL-devel xterm autoconf libtool.x86_64 zlib-devel automake glib2-devel zlib ncurses-devel openssl-devel dos2unix flex bison glibc.i686 glibc.x86_64 screen pax glibc-devel.i686 compat-libstdc++-33.i686 libstdc++.i686 libstdc++.x86_64);

if [ $hostOS == "ubuntu" ]; then
	packageList=(${debPackages[@]});
elif [ $hostOS == "rhel" ]; then
	packageList=(${rhelPackages[@]});
elif [ $hostOS == "centos" ]; then
	packageList=(${rhelPackages[@]});
fi;

#update shell on UBUNTU only
#place this portion near the start of the script so that it runs before sudo expires if package installation takes a long time
if [ $hostOS == "ubuntu" ]; then
	echo -n "NOTE: Checking for DASH shell as default (Ubuntu only)...";
	if echo `echo $0` | grep 'dash'; then
		echo "FOUND!";
		echo -n "NOTE: Changing default shell to from DASH to BASH...";
		export DEBIAN_FRONTEND=noninteractive;
		export DEBCONF_NONINTERACTIVE_SEEN=true;

		echo "dash dash/sh boolean false" | debconf-set-selections;
		dpkg-reconfigure dash;

		unset DEBIAN_FRONTEND;
		unset DEBCONF_NONINTERACTIVE_SEEN;
		echo "DONE!";
		echo "INFO: You must log out of this shell and back in for change to take effect";
	else
		echo "NOT FOUND!";
	fi;
fi;

#start building the package installation command line
if [ $hostOS == "ubuntu" ]; then
	packageCommand="apt";
elif [ $hostOS == "rhel" ]; then
	packageCommand="yum";
elif [ $hostOS == "centos" ]; then
	packageCommand="yum";	
fi;

#DEBIAN/UBUNTU ONLY -- check if dpkg repo is set up for 32-bit packages
if [ $hostOS == "ubuntu" ]; then
	echo -n "NOTE: Check for x86 package access..."
	foreignArchitecture=`dpkg --print-foreign-architectures | grep i386`;
	if [ $foreignArchitecture == "i386" ]; then 
		echo "FOUND!"; 
	else 
		echo "NOT FOUND! Now adding i386 foreign archiecture to dpkg";
		sudo dpkg --add-architexture i386; 
	fi;
fi;

#make sure the package lists are up-to-date
echo "NOTE: Updating the package lists...";
if [ $hostOS == "ubuntu" ]; then
	sudo $packageCommand update;
elif [ $hostOS == "rhel" ]; then
	sudo $packageCommand makecache;
elif [ $hostOS == "centos" ]; then
	sudo $packageCommand makecache;
fi;

#install the packages
for package in "${packageList[@]}"; do
	echo "######";
	echo "NOTE: Processing package: "$package;
	echo -n "NOTE: Checking to see if package is already installed..."
	installPackage=0;
	
	if [ $hostOS == "ubuntu" ]; then
		if [[ $($packageCommand -qq list $package | grep installed) ]]; then
			echo "INSTALLED! Skipping."
		else
			echo "NOT INSTALLED!";
			echo "Starting installation of package $package";
			packageInstallCommand="$packageCommand install";
			if [ $debug -eq 1 ]; then 
				packageInstallCommand+=" --dry-run";
			else
				packageInstallCommand+=" -y";
			fi;
			sudo $packageInstallCommand $package;
		fi;
	elif [ $hostOS == "rhel" ] || [ $hostOS == "centos" ]; then
		if [[ $($packageCommand list installed | grep $package) ]]; then
			echo "INSTALLED! Skipping."
		else
			echo "NOT INSTALLED!";
			echo "Starting installation of package $package";
			packageInstallCommand="$packageCommand install";
			if [ $debug -eq 1 ]; then 
				packageInstallCommand+=" --assumeno";
			else
				packageInstallCommand+=" -y";
			fi;
			sudo $packageInstallCommand $package;
		fi;
		
	fi;	
	echo "Package installation complete for package $package";
	echo -e "######\n";

done;

# For CentOS/RHEL version 7 install GitPython jinja2 using pip3 commands
if [ $hostOS == "rhel" ] || [ $hostOS == "centos" ] && [ $debug -eq 0 ]; then
	echo "NOTE: Installing GitPython jinja2 using pip3 commands";
	pip3 install GitPython jinja2;
fi;

echo "INFO: Environment setup complete!";
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  1. 下载并安装petalinux,不可以用sudo
./petalinux-v2020.1-final-installer.run
安装在安装文件所在目录
  • 1
  • 2
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号