Installing the PetaLinux Tool - 2023.2 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2023-10-18
Version
2023.2 English

The PetaLinux tool is installed into the current working directory without any options tool is installed into the current working directory.

chmod 755 ./petalinux-v<petalinux-version>-final-installer.run
./petalinux-v<petalinux-version>-final-installer.run 

Alternatively, you can specify an installation path.

./petalinux-v<petalinux-version>-final-installer.run [--log <LOGFILE>] [-d|--dir <INSTALL_DIR>] [options]
Table 1. PetaLinux Installer Options
Options Description
--log <LOGFILE> Specifies where the log file should be created. By default, it is petalinux_installation_log in your working directory.
-d|--dir [INSTALL_DIR] Specifies the directory where you want to install the tool kit. If not specified, the tool kit is installed in your working directory.
-p|--platform <arch_name> Specifies the architecture:
  • aarch64: Sources for Zynq UltraScale+ MPSoC devices and Versal devices.
  • arm: sources for Zynq devices.
  • If -p is not specified, it installs all the platforms by default.
  • MicroBlaze™ : sources for MicroBlaze devices

For example: To install PetaLinux tools at /home/<user>/petalinux/<petalinux-version>:

mkdir -p /home/<user>/petalinux/<petalinux-version>
./petalinux-v<petalinux-version>-final-installer.run --dir /home/<user>/petalinux/<petalinux-version>
Note: You cannot install PetaLinux as the root user. If you try to run PetaLinux commands as root, you might get a BitBake sanity check failure that prevents the build from continuing. This check is done because it is very risky to run builds as root; if any build script mistakenly tries to install files to the root path (/) instead of where it is supposed to, it must be made to fail immediately and not (in the worst case) overwrite files critical to your Linux system's operation, for example, in /bin or /etc. Thus, running the build as root is not supported. The only time root access is needed (completely outside of a build) when the runqemu script uses sudo to set up TAP devices for networking.

This installs the PetaLinux tool into the /home/<user>/petalinux/<petalinux-version> directory. By default, it installs all three eSDKs compressed script files. To install a specific eSDK as part of the PetaLinux tool, see Installing a Preferred eSDK as part of the PetaLinux Tool.

Important: You cannot move or copy the installed directory once installed. In the previous example, you cannot move or copy /home/<user>/petalinux/<petalinux-version> because the full path is stored in the Yocto e-SDK environment file.
Note: While installing the software, ensure that /home/<user>/petalinux is writable for you. After installation, you can change the permissions to make it globally read-execute (0755). Installing the tool in /home/<user>/petalinux​ directory is not mandatory. You can install it at any location that has the 755 permissions.

Reading and agreeing to the PetaLinux End User License Agreement (EULA) is integral to the PetaLinux tools installation process. You can read the license agreement before running the installation by reading the following files. If you wish to keep the license for your records, the licenses are available in plain ASCII text in the following files:

$PETALINUX/etc/license/petalinux_EULA.txt
EULA specifies in detail the rights and restrictions that apply to PetaLinux.
$PETALINUX/etc/license/Third_Party_Software_End_User_License_Agree ment.txt
This third-party license agreement details the licenses of the distributable and non-distributable components in PetaLinux tools.