Petalinux Tools Documentation: Reference Guide
Total Page:16
File Type:pdf, Size:1020Kb
See all versions of this document PetaLinux Tools Documentation Reference Guide UG1144 (v2021.1) June 16, 2021 Revision History Revision History The following table shows the revision history for this document. Section Revision Summary 06/16/2021 Version 2021.1 Chapter 7: Customizing the Project Added a new section: Configuring UBIFS Boot. Chapter 5: Booting and Packaging Updated Steps to Boot a PetaLinux Image on Hardware with SD Card. Appendix A: Migration Added FPGA Manager Changes, Yocto Recipe Name Changes, Host GCC Version Upgrade. Chapter 10: Advanced Configurations Updated U-Boot Configuration and Image Packaging Configuration. UG1144 (v2021.1) June 16, 2021Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 2 Table of Contents Revision History...............................................................................................................2 Chapter 1: Overview.................................................................................................... 8 Introduction................................................................................................................................. 8 Navigating Content by Design Process.................................................................................... 9 Chapter 2: Setting Up Your Environment...................................................... 11 Installation Steps.......................................................................................................................11 PetaLinux Working Environment Setup................................................................................. 15 Design Flow Overview...............................................................................................................16 Chapter 3: Creating a Project................................................................................18 Project Creation Using PetaLinux BSP....................................................................................18 Configuring Hardware Platform with Vivado Design Suite..................................................20 Exporting Hardware Platform to PetaLinux Project............................................................. 22 Creating an Empty Project from a Template..........................................................................23 Chapter 4: Configuring and Building................................................................24 Version Control..........................................................................................................................24 Importing Hardware Configuration........................................................................................25 Build System Image.................................................................................................................. 28 Generate Boot Image for Versal ACAP................................................................................... 30 Generate Boot Image for Zynq UltraScale+ MPSoC..............................................................31 Generate Boot Image for Zynq-7000 Devices........................................................................32 Generate Boot Image for MicroBlaze Processor...................................................................33 Modify Bitstream File for MicroBlaze Processor................................................................... 34 Build Optimizations...................................................................................................................34 Chapter 5: Booting and Packaging.................................................................... 37 Packaging Prebuilt Images...................................................................................................... 37 Using petalinux-boot Command with Prebuilt Images........................................................38 Booting a PetaLinux Image on QEMU.................................................................................... 39 Boot a PetaLinux Image on Hardware with an SD Card.......................................................61 UG1144 (v2021.1) June 16, 2021Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 3 Boot a PetaLinux Image on Hardware with JTAG..................................................................72 Boot a PetaLinux Image on Hardware with TFTP..................................................................85 BSP Packaging........................................................................................................................... 87 Chapter 6: Upgrading the Workspace...............................................................89 Upgrading Between Minor Releases (2021.1 Tool with 2021.X Tool) .................................89 Upgrading the Installed Tool with More Platforms.............................................................. 91 Upgrading the Installed Tool with your Customized Platform............................................92 Chapter 7: Customizing the Project.................................................................. 93 Firmware Version Configuration............................................................................................. 93 Root File System Type Configuration......................................................................................93 Boot Images Storage Configuration.......................................................................................94 Primary Flash Partition Configuration....................................................................................97 Managing Image Size............................................................................................................... 97 Configuring INITRD BOOT....................................................................................................... 99 Configuring INITRAMFS Boot................................................................................................ 100 Configure TFTP Boot............................................................................................................... 101 Configuring NFS Boot............................................................................................................. 102 Configuring JFFS2 Boot...........................................................................................................103 Configuring UBIFS Boot......................................................................................................... 105 Configuring SD Card ext File System Boot...........................................................................109 Chapter 8: Customizing the Root File System........................................... 112 Including Prebuilt Libraries....................................................................................................112 Including Prebuilt Applications............................................................................................. 114 Creating and Adding Custom Libraries................................................................................ 115 Testing User Libraries.............................................................................................................117 Creating and Adding Custom Applications..........................................................................118 Creating and Adding Custom Kernel Modules....................................................................120 Building User Applications.....................................................................................................121 Testing User Applications.......................................................................................................123 Building User Modules........................................................................................................... 123 PetaLinux Auto Login..............................................................................................................124 Application Auto Run at Startup............................................................................................125 Adding Layers.......................................................................................................................... 127 Adding an Existing Recipe into the Root File System..........................................................128 Adding a Package Group........................................................................................................129 Appending Root File System Packages.................................................................................130 UG1144 (v2021.1) June 16, 2021Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 4 Chapter 9: Debugging............................................................................................. 131 Debugging the Linux Kernel in QEMU..................................................................................131 Debugging Applications with TCF Agent..............................................................................133 Debugging Zynq UltraScale+ MPSoC and Versal ACAP Applications with GDB.............. 138 Debugging Individual PetaLinux Components................................................................... 142 Chapter 10: Advanced Configurations...........................................................143 Menuconfig Usage.................................................................................................................. 143 PetaLinux Menuconfig System.............................................................................................