top of page
  • Zach Pfeffer

How to Figure out Which Yocto Recipe is Getting Built by PetaLinux Tools 2017.4


This post shows how to figure out which Yocto recipe is getting built by PetaLinux Tools 2017.4.

TL;DR

Run the following and grep for the recipe you're interested in from inside the PetaLinux project, just above the build directory:

This should drop you into the build directory. If it does, type the following to show the current and preferred versions of all recipes:

Grep this to filter for the recipe you're interested in.

This has been adapted from "Accessing BitBake in a Project" on page 80 of the PetaLinux Tools Reference Guide (link to doc below).

Motivation

Add a Yocto Layer to a PetaLinux Project and Build a Recipe in the Layer with PetaLinux Tools listed the steps to add a new Yocto layer to a PetaLinux Tools managed build.

Some layers contain multiple recipe versions.

Figuring out the Version without bitbake -s

This example uses SWUpdate.

The morty branch of the SWUpdate layer @ link contains three release recipes and a tip recipe:

Which one gets used and why?

Which one is Used and Why?

BitBake defaults to the highest version of a provider. PREFERRED_VERSION can be used to specify a particular version.

DEFAULT_PREFERENCE can influence the default:

  • By default, files have a preference of "0"

  • Setting DEFAULT_PREFERENCE to "-1" makes the recipe unlikely to be used unless it is explicitly referenced

  • Setting DEFAULT_PREFERENCE to "1" makes it likely the recipe will be used

PREFERRED_VERSION overrides any DEFAULT_PREFERENCE setting.

To figure out which version of SWUpdate will be pulled in grep with:

By the rules above, BitBake will choose the highest version: 2017.1. Running bitbake -s confirms it.

This has been adapted from sections 2.3 Providers and 2.4 Preferences in version 2.2.3 of the BitBake User Manual(link to doc below).

References

  • Bitbake User Manual 2.2.3 @ link

  • PetaLinux Tools Reference Guide UG1144 (v2017.3) October 4, 2017 @ link

  • The Xilinx + Yocto graphic is an amalgamation of Xilinx and Yocto icons.

Get SWUpdate

Get SWUpdate layer and checkout morty with:

bottom of page