Openembedded - Howto know which linux version is selected


I am diving into openembedded to prepare for our own custom image, which to begin with includes minor kernel patches, such as device tree files.

(Btw, thanks for the two excellent webinars on the subject)

However, in meta-toradex-nxp, several bb-files exists for different versions of Linux (3.14, 4.1 and 4.4 as of LinuxImageV2.7). How and where is it selected which version is used?

Best regards,

Bitbake uses the layer priority and package version to determine which recipe to select. You can use the bitbake-layers command in your OpenEmbedded build directory. The subcommand show-recipes shows the viable recipes and which one will be chosen:

$ MACHINE=colibri-imx7 bitbake-layers show-recipes linux-toradex
Parsing recipes.. done.
=== Matching recipes: ===
  meta-toradex-nxp     4.1-2.0.x
  meta-freescale-3rdparty 4.1.15
  meta-toradex-tegra   3.10.40 (skipped)
  meta-toradex-tegra   git (skipped)
  meta-freescale-3rdparty 3.14.52 (skipped)
  meta-freescale-3rdparty 4.4 (skipped)
  meta-freescale-3rdparty 4.1 (skipped)

You can also find out which appends get applied by using show-appends subcommand

MACHINE=colibri-imx7 bitbake-layers show-appends | grep linux-toradex

For future reference, I found these links useful when disecting the behaviour of OE when selecting recipies:

hi, thanks for this useful information.

The version is selected by default as the highest number available for the same package.

The package (the kernel name) is selected by the PREFERRED_PROVIDER variable in the machine configuration.

The version of such package can be overridden by the PREFERRED_VERSION_nameofthekernel vailable in the machine configuration.

Marco Cavallini | KOAN sas | Bergamo - Italia -