UG1144 (V2020.1) July 24, 2020 Revision History
Total Page:16
File Type:pdf, Size:1020Kb
See all versions of this document PetaLinux Tools Documentation Reference Guide UG1144 (v2020.1) July 24, 2020 Revision History Revision History The following table shows the revision history for this document. Section Revision Summary 07/24/2020 Version 2020.1 Appendix H: Partitioning and Formatting an SD Card Added a new appendix. 06/03/2020 Version 2020.1 Chapter 2: Setting Up Your Environment Added the Installing a Preferred eSDK as part of the PetaLinux Tool section. Chapter 4: Configuring and Building Added the PetaLinux Commands with Equivalent devtool Commands section. Chapter 6: Upgrading the Workspace Added new sections: petalinux-upgrade Options, Upgrading Between Minor Releases (2020.1 Tool with 2020.2 Tool) , Upgrading the Installed Tool with More Platforms, and Upgrading the Installed Tool with your Customized Platform. Chapter 7: Customizing the Project Added new sections: Creating Partitioned Images Using Wic and Configuring SD Card ext File System Boot. Chapter 8: Customizing the Root File System Added the Appending Root File System Packages section. Chapter 10: Advanced Configurations Updated PetaLinux Menuconfig System. Chapter 11: Yocto Features Added the Adding Extra Users to the PetaLinux System section. Appendix A: Migration Added Tool/Project Directory Structure. UG1144 (v2020.1) July 24, 2020Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 2 Table of Contents Revision History...............................................................................................................2 Chapter 1: Overview.................................................................................................... 7 Introduction................................................................................................................................. 7 Chapter 2: Setting Up Your Environment........................................................ 9 Installation Steps.........................................................................................................................9 PetaLinux Working Environment Setup................................................................................. 14 Design Flow Overview...............................................................................................................16 Chapter 3: Creating a Project................................................................................17 PetaLinux BSP Installation....................................................................................................... 17 Configuring Hardware Platform with Vivado Design Suite..................................................18 Exporting Hardware Platform to PetaLinux Project............................................................. 20 Creating an Empty Project from a Template..........................................................................21 Chapter 4: Configuring and Building................................................................23 Version Control..........................................................................................................................23 Importing Hardware Configuration........................................................................................24 Build System Image.................................................................................................................. 26 Generate Boot Image for Zynq UltraScale+ MPSoC..............................................................29 Generate Boot Image for Zynq-7000 Devices........................................................................30 Generate Boot Image for MicroBlaze Processor...................................................................30 Modify Bitstream File for MicroBlaze Processor................................................................... 31 Build Optimizations...................................................................................................................32 Chapter 5: Booting and Packaging.................................................................... 35 Packaging Prebuilt Images...................................................................................................... 35 Using petalinux-boot Command with Prebuilt Images........................................................36 Booting a PetaLinux Image on QEMU.................................................................................... 37 Boot a PetaLinux Image on Hardware with an SD Card.......................................................49 Boot a PetaLinux Image on Hardware with JTAG..................................................................53 Boot a PetaLinux Image on Hardware with TFTP..................................................................57 UG1144 (v2020.1) July 24, 2020Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 3 BSP Packaging........................................................................................................................... 59 Chapter 6: Upgrading the Workspace...............................................................61 petalinux-upgrade Options......................................................................................................61 Upgrading Between Minor Releases (2020.1 Tool with 2020.2 Tool) .................................61 Upgrading the Installed Tool with More Platforms.............................................................. 64 Upgrading the Installed Tool with your Customized Platform............................................64 Chapter 7: Customizing the Project.................................................................. 66 Firmware Version Configuration............................................................................................. 66 Root File System Type Configuration......................................................................................66 Boot Images Storage Configuration.......................................................................................67 Primary Flash Partition Configuration....................................................................................69 Managing Image Size............................................................................................................... 69 Configuring INITRD BOOT....................................................................................................... 70 Configuring INITRAMFS Boot.................................................................................................. 71 Configure TFTP Boot................................................................................................................. 72 Configuring NFS Boot............................................................................................................... 73 Configuring JFFS2 Boot.............................................................................................................75 Configuring SD Card ext File System Boot............................................................................. 77 Creating Partitioned Images Using Wic................................................................................. 79 Chapter 8: Customizing the Root File System............................................. 81 Including Prebuilt Libraries......................................................................................................81 Including Prebuilt Applications............................................................................................... 83 Creating and Adding Custom Libraries.................................................................................. 84 Testing User Libraries............................................................................................................... 85 Creating and Adding Custom Applications............................................................................87 Creating and Adding Custom Kernel Modules...................................................................... 88 Building User Applications....................................................................................................... 90 Testing User Applications.........................................................................................................91 Building User Modules............................................................................................................. 92 PetaLinux Auto Login................................................................................................................93 Application Auto Run at Startup..............................................................................................94 Adding Layers............................................................................................................................ 95 Adding an Existing Recipe into the Root File System............................................................96 Adding a Package Group..........................................................................................................97 Appending Root File System Packages...................................................................................98 UG1144 (v2020.1) July 24, 2020Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 4 Chapter 9: Debugging............................................................................................... 99 Debugging the Linux Kernel in QEMU....................................................................................99 Debugging