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 (v2020.2) November 24, 2020 Revision History Revision History The following table shows the revision history for this document. Section Revision Summary 11/24/2020 Version 2020.2 Updated to include Versal™ ACAP N/A Appendix J: PetaLinux Commands PetaLinux Tools Documentation: PetaLinux Command Line Reference (UG1157) is now a part of this document. Chapter 12: Technical FAQs Added new section: Generating Image for Flash/QSPI Boot in MicroBlaze Devices. Chapter 10: Advanced Configurations Updated U-Boot Configuration and Image Packaging Configuration. Chapter 11: Yocto Features Updated Creating and Adding Patches For Software Components within a PetaLinux Project section. Appendix A: Migration Added Deprecating microblaze_lite Designs and U-Boot Environment Changes sections. Appendix I: Auto-mounting an SD card Added a new appendix. petalinux-create Command Line Options Added a new option: tmdir. petalinux-devtool Added a new section. 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-devtool Command Line Options 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.2) November 24, 2020Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 2 Table of Contents Revision History...............................................................................................................2 Chapter 1: Overview.................................................................................................... 7 Introduction................................................................................................................................. 7 Navigating Content by Design Process.................................................................................... 8 Chapter 2: Setting Up Your Environment...................................................... 10 Installation Steps.......................................................................................................................10 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..................................................19 Exporting Hardware Platform to PetaLinux Project............................................................. 21 Creating an Empty Project from a Template..........................................................................21 Chapter 4: Configuring and Building................................................................23 Version Control..........................................................................................................................23 Importing Hardware Configuration........................................................................................24 Build System Image.................................................................................................................. 27 Generate Boot Image for Versal ACAP................................................................................... 29 Generate Boot Image for Zynq UltraScale+ MPSoC..............................................................30 Generate Boot Image for Zynq-7000 Devices........................................................................31 Generate Boot Image for MicroBlaze Processor...................................................................32 Modify Bitstream File for MicroBlaze Processor................................................................... 33 Build Optimizations...................................................................................................................33 Chapter 5: Booting and Packaging.................................................................... 36 Packaging Prebuilt Images...................................................................................................... 36 Using petalinux-boot Command with Prebuilt Images........................................................37 Booting a PetaLinux Image on QEMU.................................................................................... 38 Boot a PetaLinux Image on Hardware with an SD Card.......................................................61 UG1144 (v2020.2) November 24, 2020Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 3 Boot a PetaLinux Image on Hardware with JTAG..................................................................74 Boot a PetaLinux Image on Hardware with TFTP..................................................................87 BSP Packaging........................................................................................................................... 89 Chapter 6: Upgrading the Workspace...............................................................91 Upgrading Between Minor Releases (2020.1 Tool with 2020.2 Tool) .................................91 Upgrading the Installed Tool with More Platforms.............................................................. 93 Upgrading the Installed Tool with your Customized Platform............................................94 Chapter 7: Customizing the Project.................................................................. 95 Firmware Version Configuration............................................................................................. 95 Root File System Type Configuration......................................................................................95 Boot Images Storage Configuration.......................................................................................96 Primary Flash Partition Configuration....................................................................................98 Managing Image Size............................................................................................................... 98 Configuring INITRD BOOT..................................................................................................... 101 Configuring INITRAMFS Boot................................................................................................ 102 Configure TFTP Boot............................................................................................................... 103 Configuring NFS Boot............................................................................................................. 103 Configuring JFFS2 Boot...........................................................................................................105 Configuring SD Card ext File System Boot...........................................................................107 Chapter 8: Customizing the Root File System........................................... 110 Including Prebuilt Libraries....................................................................................................110 Including Prebuilt Applications............................................................................................. 112 Creating and Adding Custom Libraries................................................................................ 113 Testing User Libraries.............................................................................................................115 Creating and Adding Custom Applications..........................................................................116 Creating and Adding Custom Kernel Modules....................................................................118 Building User Applications.....................................................................................................119 Testing User Applications.......................................................................................................121 Building User Modules........................................................................................................... 121 PetaLinux Auto Login..............................................................................................................122 Application Auto Run at Startup............................................................................................123 Adding Layers.........................................................................................................................