Yocto Dunfell error 'No recipes available for' with multiple machines in single custom meta layer
Asked Answered
C

2

6

I maintain a custom Yocto meta layer compatible with Dunfell. It supports a Microchip SAMA5D27 processor based board. I have several bbappend files in this layer that apply only to file from the meta-atmel and other Microchip specific packages.

Now, I want to re-use many parts of this custom meta layer and support a new processor from a different vendor. I have created my own new image recipe in my layer that does not include these bbappend files that are only relevant to Microchip.

The problem is that Yocto throws as error 'No recipes available for' regarding my bbappend files. The error seems to happen during parsing and does not consider whether I use the recipe or not in the current target.

I have searched extensively for a solution, but so far have come up empty. How can I use 1 meta-layer and maintain different bbappend files, while being able to switch MACHINE variables for different target builds?

Bitbake Version:

root@buildmachine:/$ bitbake --version
BitBake Build Tool Core version 1.46.0

I have tried to use the COMPATIBLE_HOST and COMPATIBLE_MACHINE variables in these bbappend files, but the error remains.

# Only compatible with sama5d27 microchip
COMPATIBLE_HOST = "arm-poky-linux-musleabi"
COMPATIBLE_MACHINE = "sama5d27-wlsom1-ek-sd"

Error output:

root@buildmachine:~/Desktop/compulab/build-cmdline$ MACHINE=iot-gate-imx8 bitbake iot-gate-imx8-image
WARNING: Host distribution "ubuntu-20.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#######################################################################################################################################################| Time: 0:00:01
Loaded 4938 entries from dependency cache.
ERROR: No recipes available for:
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/at91bootstrap/at91bootstrap_3.10.0.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/dt-overlay-at91/dt-overlay-at91_git.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/libubootenv/libubootenv_%.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-bsp/u-boot/u-boot-at91_2020.01.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-core/initrdscripts/initramfs-debug_%.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-httpd/nginx/nginx_%.bbappend
  /home/me/Desktop/compulab/sources/meta-proprietary/recipes-kernel/linux/linux-at91_5.4.bbappend
Caseate answered 7/5, 2021 at 18:2 Comment(0)
P
10

The issue as you've discovered is that Yocto is unable to match the .bbappend files to any recipes when you switch to another MACHINE.

You can solve the problem by conditionally including your .bbappend files only if particular layers are enabled. Yocto supports this through the BBFILE_DYNAMIC variable.

For instance, if you keep your .bbappend files in the dynamic-layers/meta-atmel folder within your own layer, and you only want to include those .bbappend files if meta-atmel is in use, then add the following to your layer.conf:

BBFILES_DYNAMIC += "\
    meta-atmel:${LAYERDIR}/dynamic-layers/meta-atmel/recipes-*/*/*.bbappend \
    meta-atmel:${LAYERDIR}/dynamic-layers/meta-atmel/recipes-*/*/*/*.bbappend \
"

(adjust paths / folder depth as appropriate).

This says that if meta-atmel is included in the list of layers, then add the two dynamic-layers/... paths to the search path.

Peasecod answered 9/5, 2021 at 14:42 Comment(0)
V
0

You cannot append to a recipe that does not exist in the first place.

If the recipes exist:

  • at91bootstrap_3.10.0.bb
  • dt-overlay-at91_git.bb
  • ...

make sure that their layer is added to bblayers.conf.

Vitalize answered 8/5, 2021 at 10:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.