1. 程式人生 > >Ubuntu16.04 安裝 PetaLinux2017.4 教程

Ubuntu16.04 安裝 PetaLinux2017.4 教程

 

在Xilinx官網下載PetaLinux2017.4的安裝檔案

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

參考Xilinx官方ug1144-petalinux-tools-reference-guide.pdf文件

Step 1:按照UG1144文件裡的要求,將所需的依賴庫都先安裝好。

檢視P9 Table 1-3: Packages and Linux Workstation Environments裡Ubuntu 16.04.1一欄的要求

sudo apt-get install tofrodos iproute2 gawk
sudo apt-get install gcc git make
sudo apt-get install xvfb
sudo apt-get install net-tools libncurses5-dev tftpd
sudo apt-get install zlib1g-dev zlib1g-dev:i386 libssl-dev flex bison libselinux1
sudo apt-get install gnupg wget diffstat chrpath socat xterm
sudo apt-get install autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev
sudo apt-get install screen pax gzip tar

Step 2:Ubuntu系統預設的/bin/sh是dash,而PetaLinux要求的是bash在終端中,執行如下命令。

sudo dpkg-reconfigure bash

Step 3:進入.run檔案的目錄,修改其執行屬性。

chmod +x petalinux-v2017.4-final-installer.run

Step 4:安裝PetaLinux

因為安裝PetaLinux時不能用root許可權,所以先在非root目錄下建立一個資料夾,並且修改許可權為:755

mkdir -p ~/home/petalinux
chmod 755 ~/home/petalinux

我在/home目錄下建立petalinux資料夾,並且修改許可權為755.

進入.run檔案所在的目錄,執行安裝命令。

./petalinux-v2017.4-final-installer.run ~/home/petalinux

 需要一段時間等待.run安裝包的校驗、提取,然後出現許可檔案的閱讀,按Enter回車鍵閱讀,按Q鍵退出,按Y鍵接受許可,需要操作3次,然後等待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

Step 5:驗證PetaLinux安裝成功

(1)先設定環境變數

source ~/home/petalinux/settings.sh

(2)驗證環境變數設定成功

echo $PETALINUX

如果出現安裝路徑,則表示成功。

/home/XXX/home/petalinux

Step 6:如何使用PetaLinux參照UG1144文件