[yocto] How to use two recipes to satisfy different PROVIDES -- gpu support

Khem Raj raj.khem at gmail.com
Wed Oct 11 18:00:43 PDT 2017


On Wed, Oct 11, 2017 at 3:15 PM, Gutierrez, Hernan Ildefonso (Boise
R&D, FW) <hernan_gutierrez at hp.com> wrote:
> Hi,
>
> We have a GPU in our system. We created a recipe to satisfy all the dependencies for core-image-weston (virtual/egl, virtual/libgl, etc.), except virtual/mesa, which is not provided by our GPU recipe.
>
> When one builds core-image-weston, the image requires mesa to build as well.
>
> Our approach to satisfy dependencies is very similar to what Freescale and other vendors with Mali GPU support use, which is through the following statements:
>
> PREFERRED_PROVIDER_virtual/egl = "my-gpu-recipe"
> PREFERRED_PROVIDER_virtual/libgles1 = " my-gpu-recipe "
> PREFERRED_PROVIDER_virtual/libgles2 = " my-gpu-recipe "
> PREFERRED_PROVIDER_virtual/libgl = "my-gpu-recipe"
> PREFERRED_PROVIDER_virtual/mesa = "mesa"
>
> The way to remove mesa support for virtual/egl, virtual/libgles1, etc. is by adding a mesa_%.bbappend where it states explicitly to remove those provides from mesa recipe.
>
> e.g.
> PROVIDES_remove = "virtual/libgles1 virtual/libgles2 virtual/libopenvg virtual/egl"
>
>
> The problem I am running into is that bitbake complains stating that virtual/mesa is not satisfied (Nothing PROVIDES 'virtual/mesa')
>
> When I do bitbake-layers show-recipes, I see that mesa recipe is skipped because it gave priority to my-gpu-recipe.
>
> How can two recipes be used and let bitbake satisfy parts of each recipe?
>
> Any hints will be appreciated.

there is no easy way to control providers once a recipe is pulled in.
you can refactor mesa recipe like we have done for mesa and mesa-gl
which will mean adding a another recipe which just builds the needed
portions of mesa in each recipe, if your GPU driver provides everything
you need to run weston, then you can let it provide everything that mesa
provides and bitbake wont pick up mesa at all.

>
> Thanks,
>
> --Hernan
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list