layeryoctobsp

Issue when integrating different bsp-layers on a single bblayers.conf


I am trying to integrate several BSP-layers for different platforms on a single Yocto repository to build a Linux Yocto-based distro for all those platforms easily.

The idea is maintaining a single bblayers.conf with all the layers available, set PLATFORM and DISTRO on local.conf, call bitbake and get the final image for that platform.

When setting the "build" directory with a bblayers.conf customized for a single platform, each platform builds the image recipe properly.

However, when I have integrated all bsp-layers in a single bblayers.conf, the compilation of some platforms has been broken.

The specific problem is this: one bsp layer (meta-rockchip + meta-rockchip-extra) defines a recipes-graphics/mesa/mesa_%.bbappend with this content inside:

PROVIDES_remove = "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libwayland-egl"

That alters gstreamer recipe on the poky layer, getting this error when building for a meta-intel platform:

ERROR: Nothing PROVIDES 'virtual/egl' (but /data/yocto/yocto/sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.12.2.bb, /data/yocto/yocto/sources/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.12.2.bb DEPENDS on or otherwise requires it)

My questions are:

Do you think it's a good practice to define a custom bblayers.conf depending on the choosen PLATFORM? Is there some any other way to disable a BSP-layer completely when building for a different one? Can some of you suggest a fix to solve this rockchip-extra bsp-layer issue?

Thanks a lot in advance! :)


Solution

  • In theory all BSP layers are supposed to follow the project guidelines to make sure they can be intermixed with other BSP layers as the user wishes.

    https://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html

    https://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#best-practices-to-follow-when-creating-layers

    Unfortunately BSP layers created and maintained by vendors themselves often don't meet these criteria since the vendor is only really interested in show-casing their own hardware. Mixing BSP layers is just not something they're likely to test.

    You could work on a fix and submit it to them via a github pull request. Otherwise you could do anything you wish that works for you (fork and modify, etc).