Adding Layers - 2021.1 English

PetaLinux Tools Documentation Reference Guide (UG1144)

Document ID
UG1144
Release Date
2021-06-16
Version
2021.1 English
You can add layers to the PetaLinux project. The upstream layers for the Gatesgarth version of Yocto can be found at http://layers.openembedded.org/layerindex/branch/gatesgarth/layers/.

The following steps demonstrate how to add the meta-my layer into the PetaLinux project.

  1. Copy or create a layer in <proj_root>/project-spec/meta-mylayer.
  2. Run petalinux-config > Yocto Settings > User Layers.
  3. Enter the following:
    ${PROOT}/project-spec/meta-mylayer
  4. Save and exit.
  5. Verify by viewing the file in <proj_root>/build/conf/bblayers.conf.
Note: The 2021 release of the PetaLinux tool is on the Gatesgarth base line. Choose the layers/recipes from the Gatesgarth branch only. Some of the layers/recipes might not be compatible with the current architecture. You are responsible for all additional layers/recipes.
Note: You can also add a layer that is outside your project; such layers can be shared across projects. Ensure that the added layer has <layer>/conf/layer.conf; otherwise, it causes build errors.
Important: If you want to change the layer priority, you can update ${PROOT}/project-spec/meta-mylayer/conf/layer.conf to set BBFILE_PRIORITY_meta-mylayer = 6 (0 to 10, higher values have higher priority).