Transcription of PetaLinux Tools Documentation: Reference Guide
1 PetaLinux ToolsDocumentationReference GuideUG1144 ( ) October 30, 2019 See all versionsof this documentRevision HistoryThe following table shows the revision history for this Summary10/30/2019 Version A: MigrationAdded new sections: Menuconfig Changes and AppendingRootfs 11: Yocto FeaturesAdded new sections: Creating and Adding Patches ForSoftware Components within a PetaLinux project and Filtering RootFS Packages Based on Not Seen for Kernel and U-BootAdded new sectionInstallation StepsRemoved Quick Installation of Packages from UG1144 andincluded them in the release notesBuild OptimizationsAdded list of commands to be deprecated in the future05/22/2019 Version 6: Upgrading the WorkspaceAdded new section for PetaLinux -upgrade 12: Technical FAQsAdded new section Package 10: Advanced ConfigurationsUpdated FPGA Manager Configuration and Usage for Zynq UltraScale+ MPSoC and Zynq-7000 HistoryUG1144 ( ) October 30, 2019 Tools documentation Reference Guide 2 Send FeedbackTable of ContentsRevision 1: 2: Setting Up Your 9 Installation Working Environment 13 Design Flow 3: Creating a BSP 16 Configuring Hardware Platform with Vivado Design Hardware Platform to PetaLinux 19 Creating a New PetaLinux 4: Configuring and Hardware System Boot Image for Zynq UltraScale+ Boot Image for Zynq-7000 Boot Image for MicroBlaze Bitstream File for MicroBlaze 29 Build 5.
2 Booting and Prebuilt PetaLinux -boot Command with Prebuilt a PetaLinux Image on a PetaLinux Image on Hardware with an SD a PetaLinux Image on Hardware with a PetaLinux Image on Hardware with ( ) October 30, 2019 Tools documentation Reference Guide 3 Send FeedbackBSP 6: Upgrading the PetaLinux PetaLinux 7: Customizing the Version File System Type Images Storage Flash Partition Image INITRD 59 Configuring INITRAMFS 60 Configure TFTP NFS JFFS2 SD Card ext File System 8: Customizing the Prebuilt Prebuilt 69 Creating and Adding Custom User and Adding Custom and Adding Custom User User User Auto Auto Run at an Existing Recipe into a Package 9: the Linux Kernel in Applications with TCF ( ) October 30, 2019 Tools documentation Reference Guide 4 Send FeedbackDebugging Zynq UltraScale+ MPSoC Applications with Individual PetaLinux 96 Chapter 10: Advanced Menuconfig Out-of-tree project 109 Chapter 11: Yocto Generation (Target Sysroot Generation).
3 115 Accessing BitBake in a Variant RootFS Packages Based on and Adding Patches For Software Components within a PetaLinux 12: Technical ..122 Appendix A: Directory Overlay Rootfs B: PetaLinux project 129 project 132 Appendix C: Generating Boot Stage Boot Loader for Zynq UltraScale+ and Zynq-7000 Trusted Firmware (ATF)..135 PMU for MicroBlaze Platform D: QEMU Virtual Networking ( ) October 30, 2019 Tools documentation Reference Guide 5 Send FeedbackRedirecting Ports in Non-root the QEMU Virtual 139 Appendix E: xilinx IP Models Supported by 140 Appendix F: Xen Zynq UltraScale+ MPSoC Prebuilt Linux as Built Linux as 143 Appendix G: Booting Prebuilt H: Additional Resources and Legal Navigator and Design 146 Please Read: Important Legal 146UG1144 ( ) October 30, 2019 Tools documentation Reference Guide 6 Send FeedbackChapter 1 OverviewIntroductionPetaLinux is an embedded Linux Software Development Kit (SDK) targeting FPGA-based System-on-Chip designs.
4 This Guide helps the reader to familiarize with the tool enabling overall usage are assumed to have basic Linux knowledge, such as how to run Linux commands. Youshould be aware of OS and host system features, such as OS version, Linux distribution, securityprivileges, and basic Yocto PetaLinux tool contains: Yocto Extensible SDK (eSDK) Minimal downloads XSCT and toolchains PetaLinux CLI toolsNote: Vitis unified software platform is the integrated design environment (IDE) for creating embeddedapplications on xilinx SDK is a xilinx development tool that contains everything necessary to build, develop, test, anddeploy embedded Linux Extensible SDKThe following table details the four extensible SDKs 1: Extensible SDKsPathArchitecture$ PetaLinux /component s/yocto/source/aarch64 Zynq UltraScale+ MPSoC$ PetaLinux /components/yocto/source/ armZynq-7000 devices$ PetaLinux /components/yocto/sourc e/microblaze_fullMicroBlaze platform full designsUG1144 ( ) October 30, 2019 Tools documentation Reference Guide 7 Send FeedbackTable 1.
5 Extensible SDKs (cont'd)PathArchitecture$ PetaLinux /compo nents/yocto/source/microblaze_liteMicroB laze platform lite designsMinimal DownloadsBitBake checks PREMIRRORS before looking upstream for any source files. PREMIRRORS areappropriate when you have a shared directory that is not defined by the DL_DIR variable. Allprojects of the tool use these PREMIRRORS and fetch the source code from PREMIRROR in the tool points to: $ PetaLinux /components/yocto/downloads. Thedownloads directory has tarballs of source code for Linux kernel, U-Boot, and other minimalutilities. For more information, see Downloading and toolchainsFor all embedded software applications, the PetaLinux tool uses XSCT underneath. The Linuxtoolchain for all three architectures is from Command Line Interface (CLI) toolsThis contains all the PetaLinux commands that you 1: OverviewUG1144 ( ) October 30, 2019 Tools documentation Reference Guide 8 Send FeedbackChapter 2 Setting Up Your EnvironmentInstallation StepsInstallation RequirementsThe PetaLinux Tools Installation requirements are: Minimum workstation requirements: 8 GB RAM (recommended minimum for xilinx Tools ) 2 GHz CPU clock or equivalent (minimum of 8 cores) 100 GB free HDD space Supported OS:- Red Hat Enterprise Workstation/Server , , (64-bit)- CentOS Workstation/Server , , (64-bit)- Ubuntu Linux Workstation/Server , , , (64-bit) You need to have root access to install the required packages mentioned in the followingtable.
6 The PetaLinux Tools need to be installed as a non-root user. PetaLinux requires a number of standard development Tools and libraries to be installed onyour Linux host workstation. Install the libraries and Tools listed in the following table on thehost Linux. All of the listed Linux Workstation Environments below have the 32-bit librariesneeded by the PetaLinux tool. If there are any additional toolchain packages that need 32-bitlibraries on the host, install the same before issuing PetaLinux -build. The table shownbelow describes the required packages, and how to install them on different Linux workstationenvironments. PetaLinux Tools require that your host system /bin/sh is 'bash'. If you are using Ubuntudistribution and your /bin/sh is 'dash', consult your system administrator to change yourdefault system shell /bin/sh with the sudo dpkg-reconfigure dash ( ) October 30, 2019 Tools documentation Reference Guide 9 Send FeedbackTable 2: Packages and Linux Workstation EnvironmentsTool / LibraryCentOS Workstation/Server , , (64-bit)Red Hat EnterpriseWorkstation/Server , , (64-bit)Ubuntu , , , (64-bit)dos2unixdos2unixdos2unixtofrodos + ++ (gcc-c++)gcc-c++gcc-c++-makemakemakemake netstatnet-toolsnet-toolsnet-toolsncurse sdevelncurses-develncurses-devellibncurs es5-devtftp servertftp-servertftp-servertftpdzlib devel (also,install 32-bit ofthis version)zlib-develzlib-develzlib1g:i386o penssldevelopenssl-developenssl-devel glibcglibcglibc-glib2-develglib2-develgl ib2-devel-automakeautomakeautomake-scree nscreenscreenscreenChapter 2.
7 Setting Up Your EnvironmentUG1144 ( ) October 30, 2019 Tools documentation Reference Guide 10 Send FeedbackTable 2: Packages and Linux Workstation Environments (cont'd)Tool / LibraryCentOS Workstation/Server , , (64-bit)Red Hat EnterpriseWorkstation/Server , , (64-bit)Ubuntu , , , (64-bit)paxpaxpaxpaxgzipgzipgzipgziplibs tdc++libstdc++libstdc++-python--python : For the exact package versions, refer to the PetaLinux release For Quick installation steps, refer to the first row for eachoperating system in the same excel ! Consult your system administrator if you are not sure about the correct procedures for host systempackage ! PetaLinux works only with hardware designs exported from Vivado Design The PetaLinux Tools installation requirements are met. See the Installation Requirements formore information. The PetaLinux installer is downloaded. You can download PetaLinux installer from PetaLinuxDownloads.
8 Vivado Design Suite, Vitis software platform, and PetaLinux versions are in PetaLinux Tools InstallerWithout any options, the PetaLinux Tools are installed into the current working , you can specify an installation example: To install PetaLinux Tools under /opt/pkg/ :$ mkdir -p /opt/pkg/ $ . /opt/pkg/ : Do not change the installer permissions to CHMOD 775 as it might cause BitBake installs the PetaLinux Tools into /opt/pkg/ 2: Setting Up Your EnvironmentUG1144 ( ) October 30, 2019 Tools documentation Reference Guide 11 Send FeedbackIMPORTANT! Once installed, you cannot move or copy the installed directory. In the above example, youcannot move or copy /opt/pkg/ PetaLinux since the full path will be stored into Yocto e-SDK : You cannot install the tool as root user. Ensure that /opt/pkg/ PetaLinux is writeable. You canchange the permissions after installation to make it globally read-execute (0755).
9 It is not mandatory toinstall tool in /opt/pkg/ PetaLinux directory. You can install at any desired location that has the and agreeing to the PetaLinux End User License Agreement (EULA) is a required andintegral part of the PetaLinux Tools installation process. You can read the license agreement priorto running the installation. If you wish to keep the license for your records, the licenses areavailable in plain ASCII text in the following files: $ PetaLinux /etc/ : EULA specifies in detail the rightsand restrictions that apply to PetaLinux . $ PetaLinux /etc/ : This third party license agreement details the licenses of the distributable andnon-distributable components in PetaLinux default, the WebTalk option is disabled to send Tools usage statistics back to xilinx . You canturn on the WebTalk feature by running the PetaLinux -util --webtalk command after theinstallation is ! Before running the PetaLinux command, you need to source PetaLinux settings.
10 For moreinformation, see PetaLinux Working Environment Setup.$ PetaLinux -util --webtalk onTroubleshootingThis section describes some common issues you may experience while installing the PetaLinuxtools. If the PetaLinux Tools installation fails, the file $ will begenerated in your PetaLinux installation 3: PetaLinux Installation TroubleshootingProblem / Error MessageDescription and SolutionWARNING: You have less than 1 GBfree space on the installationdriveProblem Description:This warning message indicates that the installation drive is almost full. Youmight not have enough free space to develop the hardware project and/orsoftware project after the :Clean up the installation drive to clear some more free , move PetaLinux installation to another hard disk 2: Setting Up Your EnvironmentUG1144 ( ) October 30, 2019 Tools documentation Reference Guide 12 Send FeedbackTable 3: PetaLinux Installation Troubleshooting (cont'd)Problem / Error MessageDescription and SolutionWARNING: No tftp server foundProblem Description:This warning message indicates that you do not have a TFTP service runningon the workstation.