PetaLinuxのビルド(メモ1)

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と古いため、英語版をメインとして読み、日本語版で補助しましょう。

日本語:https://japan.xilinx.com/support/documentation/sw_manuals_j/xilinx2019_2/ug1144-petalinux-tools-reference-guide.pdf

英語:https://japan.xilinx.com/support/documentation/sw_manuals_j/xilinx2020_2/ug1144-petalinux-tools-reference-guide.pdf

基本的にこれらのドキュメントを読めば、インストールすることができ、PetaLinuxを使用することができます。

PetaLinuxに含まれるもの

PetaLinuxには次のツールが含まれています。

  • YoctoエクステンシブルSDK(eSDK)
  • 最小ダウンロード
  • XSCTおよびツールチェーン
  • PetaLinux CLIツール

YoctoエクステンシブルSDKは次の4つのアーキテクチャのSDKがインストールされます。

  • Zynq UltraScale+ MPSoC
  • Zynq-7000
  • MicroBlazeフルデザイン
  • MicroBlaze軽量デザイン

ダウンロード

次のURLからPetaLinuxをダウンロードします。

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

petalinux-v2020.2-final-installer.runというファイルをダウンロードします。

インストール

要件

PetaLinuxのインストール要件を下記に示します。

  • 8GB以上のRAM
  • 2GHz以上のCPU(少なくとも8コア)
  • 100GB以上のストレージ
  • OS(以下の64bit OS)
    • Reg Hat Enterprise Workstatio/Server 7.4, 7.5, 7.6, 7.7
    • CentOS Workstation/Server 7.4, 7.5, 7.6, 7.7
    • Ubuntu Linux Workstation 16.04.5, 16.04.6, 18.04.1, 18.04.2, 18.04.3, 18.04.4

ここで注意すべきところはCentoOSは開発が終了したので上位へアップグレードできないこと、Ubuntuは20.04.xや18.04.5の最新版に対応していないことです。

本試行では次の環境を使用しています。

  • Ubuntu 20.04.1 LTS

インストールの実行

インストールは次のように実行します。

$ 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
write: 2021/01/03/ 00:00:00