petalinux 2018.2 在ubuntu 16下的安装

我第一次安装petalinux2018.2, 是在 ubuntu18, 因为最新的ubuntu 就是 ubuntu18。 在安装中会报一些错,但能安装完成。配置的时候也会报错。看到论坛提问,说目前petalinux2018.2 只是支持ubuntu16。这样我最后选择了ubuntu16。

我的ubuntu16 是安装在虚拟机里的 vm14。 

1: 下载

下载地址是:

https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

选择其中的 PetaLinux 2018.2 Installer (TAR/GZIP - 6.15 GB)

petalinux 2018.2 在ubuntu 16下的安装_第1张图片

下载你需要注册号,填写基本信息,email 等就可以注册。他的密码要求比较复杂,需要包含特别字符,比如 @#$%^&*()之类的。

下载后文件名是 petalinux-v2018.2-final-installer.run。 本来想放一个百度下载的,但文件超过4g , 就不让我上传了。

我是ubuntu 下下载的,如果你是windows 下载的,那就要放到ubuntu 下去,可以看看我那篇windows linux共享的博文。其实我最后还是通过共享方式给ubuntu 16的。在ubuntu18 下的,传到共享目录,然后ubuntu16 就不用再下载了。

2: 安装的前提条件

在xilinx的ug1144 里详细列出了petalinux 安装的前提条件以及如何在3种linux 下的安装方法或内容。

我在这里也做一个列出。我第一次看他的列表,心里就有点发麻,这么多。其实每一项只是执行一个命令而已,并不需要你去寻找,下载。

petalinux 2018.2 在ubuntu 16下的安装_第2张图片

这是ug 1144的 9.,10, 11页内容节选,第3列是ubuntu16下需要的安装内容。

比如第一项说需要 openssldevel  第3项是 libssl-dev , 那么要做的就是 apt install libssl-dev

当然要做这个还需要先切换到超级用户权限, sudo su 然后输入密码。

上面只是介绍其中一项,下面做个列表:

apt install build-essential vim tofrodos

apt install iproute2 gawk gcc git make net-tools zlib1g-dev 

apt install libssl-dev flex bison libselinux1 libncurses5-dev 

apt install tftpd lib32z1 lib32ncurses5 libbz2-1.0:i386 

apt install lib32stdc++6 xvfb chrpath socat autoconf libtool

apt install texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386

这些都是你在ubuntu 下超级用户权限下执行的。中间有空格的,你也可以多次安装,而不是放在一个命令里执行。每次执行的时候都会问你,要你的确认,你都要y做确认安装。

分次安装比如最后一行:

apt install texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev zlib1g:i386

你也可以

apt install texinfo

apt install gcc-multilib

apt install libsdl1.2-dev

apt install libglib2.0-dev

apt install zlib1g:i386

3; 安装

xilinx要求安装必须不是超级用户。如果你是超级用户状态,必须切换回普通用户状态。

你cd 到petalinux-v2018.2-final-installer.run所在目录,或者下面命令在其前面加上其所在目录。

chmod +x  petalinux-v2018.2-final-installer.run

上面是改变petalinux-v2018.2-final-installer.run 具有执行权限。如果你不能做这个,那你就cp petalinux-v2018.2-final-installer.run 到一个你可以执行的目录。

下面你要考虑的是你安装到哪个目录。 

我是在home 目录下建立一个petalinux 目录: mkdir petalinux

ubuntu 下面这么显示的:   liwenz@ubuntu:~$ mkdir petalinux
然后 cd petalinux 

在命令行输入 /mnt/hgfs/xilinx/petalinux-v2018.2-final-installer.run  .

这个. 表示当前目录。 而前面是全目录。

ug1144里是这样说的

$ mkdir -p /opt/pkg/petalinux
$ ./petalinux-v2018.1-final-installer.run /opt/pkg/petalinux

我这样操作说没有权限,用超级用户可以建立,但后来会说没有权限。我对ubuntu 还不是很熟,但我上面那样操作最后成功了。

安装时,没有权限是碰到的第一个问题,我就上面那样解决了。

还有就是重新操作安装的时候,需要删除log 文件。 每次安装的时候都有一个log 文件,再安装时必须删除它,可能是为了避免多次安装。

安装过程有很几次你必须回答y 才能安装,Enter 然后你读文章, q 退出读文章, 退出后选择y 让你继续走。

在2章的时候,如果前提条件没有安装好,安装时就会告诉你需要安装什么东西。我希望你都安装完全了,不会有这个显示。

每次安装都需要很长的时间,先检查,再解压,然后报错。我都安装了十多次,希望你的次数比较少,我当时没找到合适资料。

下面是我在ubuntu18 上的安装过程,ubuntu16的找不到记录了,但16 就是没有那个错误提示。

liwen@ubuntu:~/Downloads$ ./p* ../petalinux
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...

LICENSE AGREEMENTS

PetaLinux SDK contains software from a number of sources. Please review
the following licenses and indicate your acceptance of each to continue.

You do not have to accept the licenses, however if you do not then you may
not use PetaLinux SDK.

Use PgUp/PgDn to navigate the license viewer, and press 'q' to close

Press Enter to display the license agreements
Do you accept Xilinx End User License Agreement? [y/N] > y
Do you accept Webtalk Terms and Conditions? [y/N] > y
Do you accept Third Party End User License Agreement? [y/N] > y
INFO: Checking installation environment requirements...
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 281: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 285: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide" for its impact and solution
INFO: Installing PetaLinux...
*********************************************
WARNING: PetaLinux installation directory: ../petalinux/. is not empty!
*********************************************
Please input "y" to continue to install PetaLinux in that directory?[n]y
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "../petalinux/."
................................................................................................................................................................................................................................................................................INFO: Installing aarch64 Yocto SDK to "../petalinux/./components/yocto/source/aarch64"...
PetaLinux Extensible SDK installer version 2018.2
=================================================
The directory "/home/liwen/petalinux/components/yocto/source/aarch64" already contains a SDK for this architecture.
If you continue, existing files will be overwritten! Proceed[y/N]? Y
Extracting SDK................................done
Setting it up...
Extracting buildtools...
done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /home/liwen/petalinux/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux
INFO: Installing Yocto SDK to "../petalinux/./components/yocto/source/"...
PetaLinux Extensible SDK installer version 2018.2
=================================================
The directory "/home/liwen/petalinux/components/yocto/source" already contains a SDK for this architecture.
If you continue, existing files will be overwritten! Proceed[y/N]? Y
Extracting SDK..............................done
Setting it up...
Extracting buildtools...
done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-cortexa9hf-neon-xilinx-linux-gnueabi
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-microblazeel-v10.0-bs-cmp-re-mh-div-xilinx-linux
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-microblazeel-v10.0-bs-cmp-re-ml-xilinx-linux
environment: line 277: locked_signs: bad array subscript
INFO: Installing Yocto SDK to "../petalinux/./components/yocto/source/"...
PetaLinux Extensible SDK installer version 2018.2
=================================================
The directory "/home/liwen/petalinux/components/yocto/source" already contains a SDK for this architecture.
If you continue, existing files will be overwritten! Proceed[y/N]? Y
Extracting SDK.............................done
Setting it up...
Extracting buildtools...
done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-cortexa9hf-neon-xilinx-linux-gnueabi
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-microblazeel-v10.0-bs-cmp-re-mh-div-xilinx-linux
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-microblazeel-v10.0-bs-cmp-re-ml-xilinx-linux
environment: line 277: locked_signs: bad array subscript
INFO: Installing Yocto SDK to "../petalinux/./components/yocto/source/"...
PetaLinux Extensible SDK installer version 2018.2
=================================================
The directory "/home/liwen/petalinux/components/yocto/source" already contains a SDK for this architecture.
If you continue, existing files will be overwritten! Proceed[y/N]? Y
Extracting SDK.............................done
Setting it up...
Extracting buildtools...
done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-cortexa9hf-neon-xilinx-linux-gnueabi
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-microblazeel-v10.0-bs-cmp-re-mh-div-xilinx-linux
$ . /home/liwen/petalinux/components/yocto/source/environment-setup-microblazeel-v10.0-bs-cmp-re-ml-xilinx-linux
environment: line 277: locked_signs: bad array subscript
INFO: PetaLinux SDK has been installed to ../petalinux/.
liwen@ubuntu:~/Downloads$

4:安装验证

source /home/liwenz/petalinux/settings.sh
成功定位不报错的话,基本是成功了的 。 这里 /home/liwenz/petalinux 是你的安装目录,当然你也可以先列表下你安装目录内容。下面是我配置petalinux的操作和显示内容:

liwenz@ubuntu:~/petalinux$ source /home/liwenz/petalinux/settings.sh
PetaLinux environment set to '/home/liwenz/petalinux'
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
liwenz@ubuntu:~/petalinux$ 

echo $PETALINUX 
命令行会显示出安装路径/home/liwenz/petalinux

liwenz@ubuntu:~/petalinux$ echo $PETALINUX
/home/liwenz/petalinux
liwenz@ubuntu:~/petalinux$ 

如果这样,整个安装就做好了。下面准备做一个简单工程,启动。

 

 


 

 

 

 

 

 

 

 

 

你可能感兴趣的:(zynq,fpga,petalinux,xilinx,ubuntu,install,zynq)