Build Optimizations - 2022.1 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2022-04-26
Version
2022.1 English

This section describes the build optimization techniques with the PetaLinux tools.

Deselecting Default Components

You can deselect default components, if they are not needed. To disable the FSBL and PMU firmware for Zynq® UltraScale+™ MPSoC, deselect the following options in petalinux-config > Linux Components Selection.

  • FSBL > [ ] First Stage Boot Loader
  • PMUFW > [ ] PMU Firmware
To disable the PLM and PSM firmware for Versal® , deselect the following option in petalinux-config > Linux Components Selection.
  • PLM > [ ] PLM
  • PSM > [ ] PSM Firmware

Deselecting these components removes these components from the default build flow.

Note: If the FSBL, PMU firmware, PLM firmware, and PSM firmware are not built with PetaLinux, they must be built in the Vitis™ software platform. The final load image must include all required components regardless of which tool built them.

Local Mirror Servers

You can set internal mirrors on the NFS or web server which can speed up the builds. By default, PetaLinux uses sstate-cache and download mirrors from petalinux.xilinx.com. Follow these steps to work with local, NFS, or the internal web server copy of sstate in PetaLinux. You can download the sstate from the download area along with PetaLinux.

Table 1. Local Mirror Servers
Server Description
downloads Source of download files are available in https://petalinux.xilinx.com/sswreleases/rel-v2021/downloads
aarch64 sstate mirrors for Zynq UltraScale+ MPSoC/RFSoC , and Versal devices.
arm sstate mirrors for Zynq-7000
microblaze sstate mirrors for MicroBlaze™

Source Mirrors

You can set source mirrors through petalinux-config > Yocto-settings > Add pre-mirror URL. Select file://<local downloads path> for all projects. Save the configuration to use the download mirrors and verify the changes in build/conf/plnxtool.conf.

Example: file:///home/user/daily-downloads-2022

Reduce Build Time

To reduce the build time by disabling the network sstate feeds, de-select the petalinux-config > Yocto Settings > Enable Network sstate feeds.

Sstate Feeds

You can set sstate feeds through petalinux-config.

  • sstate feeds on NFS: Go to petalinux-config > Yocto Settings > Local sstate feeds settings and enter the full path of the sstate directory. By enabling this option, you can point to your own shared state which is available at a NFS/local mount point.

    For example, to enable, use /opt/petalinux/sstate-cache_2020/aarch64.

  • sstate feeds on webserver: Go to petalinux-config > Yocto Settings > Enable Network sstate feeds > Network sstate feeds URL and enter the URL for sstate feeds.

    For more information, see How to reduce build time using SSTATE CACHE

Note: This is set to https://petalinux.xilinx.com/sswreleases/rel-v2022/aarch64/sstate-cache/, by default for Zynq UltraScale+ MPSoC and Versal projects, by default.