Petalinux Tools Documentation: Reference Guide
Total Page:16
File Type:pdf, Size:1020Kb
PetaLinux Tools Documentation Reference Guide UG1144 (v2018.3) December 5, 2018 Revision History The following table shows the revision history for this document. Section Revision Summary 12/05/2018 Version 2018.3 General updates • Made changes to PetaLinux project directory structure. Installation Requirements • Added new section Quick Installation of Packages Customizing the Project • Added new section Configuring INITRD BOOT • Added new section Configuring JFFS2 BOOT Migration • Added new section FSBL/PMUFW Patching Mechanism Advanced Configurations • Added new section FPGA Manager Configuration and Usage for Zynq Ultrascale+ Customizing the Rootfs • Added new section Creating and Adding Custom Libraries 06/06/2018 Version 2018.2 CR updates • Removed DSA warning and recommendations throughout the book. 04/18/2018 Version 2018.1 General updates • Merged the contents of PetaLinux Tools Documentation: Workflow Tutorial (UG1156) and made it obsolete • Removed Appendix - Obsolete Features • Organized the content in the document Yocto Features • Added a new section SDK Generation • Added a new section Machine Support • Added a new section SOC Variant Support • Added a new section Image Features Configuring and Building • Added a new section Build Optimization Migration • Added a new Appendix Reference Guide Send Feedback 2 UG1144 (v2018.3) December 5, 2018 www.xilinx.com Table of Contents Revision History . 2 Chapter 1: Overview Introduction . 7 Chapter 2: Setting Up Your Environment Installation Requirements. 10 Installation Steps . 13 PetaLinux Working Environment Setup . 15 Design Flow Overview . 18 Chapter 3: Creating a Project PetaLinux BSP Installation. 19 Creating Hardware Platform with Vivado . 21 Exporting Hardware Platform to PetaLinux Project . 23 Creating a New PetaLinux Project. 23 Chapter 4: Configuring and Building Version Control . 26 Importing Hardware Configuration . 27 Build System Image . 29 Generate Boot Image for Zynq-7000 Devices . 32 Generate Boot Image for MicroBlaze . 32 Generate Bitstream for MicroBlaze . 33 Build Optimizations . 33 Chapter 5: Booting and Packaging Packaging Prebuilt Images. 38 Using petalinux-boot Command with Prebuilt Images . 38 Booting a PetaLinux Image on QEMU. 39 Boot a PetaLinux Image on Hardware with SD Card . 43 Boot a PetaLinux Image on Hardware with JTAG . 45 Boot a PetaLinux Image on Hardware with TFTP. 49 Reference Guide Send Feedback 3 UG1144 (v2018.3) December 5, 2018 www.xilinx.com BSP Packaging. 51 Chapter 6: Customizing the Project Firmware Version Configuration. 53 Root File System Type Configuration . 54 Boot Images Storage Configuration . 54 Primary Flash Partition Configuration . 55 Managing Image Size . 56 Configuring INITRD BOOT . 57 Configuring INITRAMFS Boot . 58 Configure TFTP Boot . 59 Configuring NFS Boot. 60 Configuring JFFS2 Boot . 61 Configuring SD Card ext filesystem Boot . 63 Chapter 7: Customizing the Rootfs Including Prebuilt Libraries . 65 Including Prebuilt Applications . 66 Including Prebuilt Modules . 67 Creating and Adding Custom Libraries . 68 Testing User Libraries . 71 Creating and Adding Custom Applications. 72 Creating and Adding Custom Modules. 74 Building User Applications . 75 Testing User Application . 76 Building User Modules. 77 PetaLinux Auto Login. 78 Application Auto Run at Startup. 79 Adding Layers . 81 Adding an Existing Recipe into Rootfs . 81 Adding a Package Group . 82 Chapter 8: Debugging Debugging the Linux Kernel in QEMU. 84 Debugging Applications with TCF Agent. 85 Debugging Zynq UltraScale+ MPSoC Applications with GDB . 90 Chapter 9: Advanced Configurations Menuconfig Usage . 95 PetaLinux Menuconfig System . 95 Reference Guide Send Feedback 4 UG1144 (v2018.3) December 5, 2018 www.xilinx.com Configuring Out-of-tree Build . 103 Configuring Project Components . 106 Chapter 10: Yocto.