PetaLinuxとはXilinx社がメンテナンスを行い、公開している組込み向けLnuxディストリビューションです。
主にXilinx社のFPGAデバイス、Zynqシリーズの評価ボード向けにチューニングされたLinuxディストリビューションです。
PetaLinuxのリファレンス・ドキュメントを下記から入手できます。
PetaLinux Tool
日本語:https://japan.xilinx.com/products/design-tools/embedded-software/petalinux-sdk.html
英語:https://www.xilinx.com/products/design-tools/embedded-software/petalinux-sdk.html
PetaLinux Tools Documentation(PDF)
PDFの資料は日本語のバージョンがv2019.2と古いため、英語版をメインとして読み、日本語版で補助しましょう。
基本的にこれらのドキュメントを読めば、インストールすることができ、PetaLinuxを使用することができます。
PetaLinuxには次のツールが含まれています。
YoctoエクステンシブルSDKは次の4つのアーキテクチャのSDKがインストールされます。
次のURLからPetaLinuxをダウンロードします。
petalinux-v2020.2-final-installer.runというファイルをダウンロードします。
PetaLinuxのインストール要件を下記に示します。
ここで注意すべきところはCentoOSは開発が終了したので上位へアップグレードできないこと、Ubuntuは20.04.xや18.04.5の最新版に対応していないことです。
本試行では次の環境を使用しています。
インストールは次のように実行します。
$ mkdir -p /opt/pkg/petalinux/2020.2
$ ./petalinux-v2020.2-final-installer.run --dir /opt/pkg/petalinux/2020.2
この実行によってPetaLinuxのツールが/opt/pkg/petalinux/2020.2にインストールされます。
petalinux-v2020.2-final-installer.runに実行権がない場合は次のように実行権を付与して実行しましょう。
$ chmod 755 ./petalinux-v2020.2-final-installer.run
次が実際に実行した結果です。
$ ./petalinux-v2020.2-final-installer.run --dir /opt/pkg/petalinux/2020.2
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 PetaLinux Tools Documentation Reference Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...
ライセンス許可
インストールの最初にPetaLinuxが使用しているライセンスに同意できるか求められますので同意できるようであれば、'Y'を入力して進みます。
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
ライセンスを承諾してインストールを進めるとインストール先のディレクトリに何らかのファイルがあれば次のように聞いてくるのでここも'y'で進めます。 もし、クリーンインストールをする場合はディレクトリの内容を確認しましょう。
INFO: Installing PetaLinux...
*********************************************
WARNING: PetaLinux installation directory: /opt/pkg/petalinux/2020.2/. is not empty!
*********************************************
Please input "y" to continue to install PetaLinux in that directory?[n]y
インストール直後のディレクトリは次のとおりです。
$ ls /opt/pkg/petalinux/2020.2
components
doc
etc
tools
settings.sh
settings.csh
petalinux_installation_log
PetaLinuxを使用するには作業環境をセットアップします。
$ source /opt/pkg/petalinux/2020.2/settings.sh
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 2020.2 PetaLinux Tools Documentation Reference Guide" for its impact and solution