All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca" <magnabosco.luca@gmail.com>
To: meta-ti@lists.yoctoproject.org
Subject: Re: Build core-image-weston for beaglebone/am335x with GPU SGX530 enabled
Date: Sun, 17 May 2020 14:22:39 -0700	[thread overview]
Message-ID: <23459.1589750559600576112@lists.yoctoproject.org> (raw)
In-Reply-To: <zrPI.1589209669954801158.UpYg@lists.yoctoproject.org>

[-- Attachment #1: Type: text/plain, Size: 2572 bytes --]

Probably the topic was too broad,

I think I got a partial solution and here you have a partial reply:

To my understanding, when using OpenGL and EGL there are two common scenarios:
* The provider for both GL and EGL is mesa: that works fine in our case
* The provider for GL is mesa (specifically mesa-gl) and the provider for EGL is a GPU user space module (in our case ti-sgx-ddk-um): that at the moment is giving some bitbake errors due to a conflict. Indeed both mesa-gl and ti-sgx-ddk-um provide the header khrplatform.h and the library libglapi
Since my goal is to use the GPU provided by the am335x SOC I have to focus on the second one.

To setup the second scenario in a .conf file we have to set:

IMAGE_INSTALL_append = " ti-sgx-ddk-km ti-sgx-ddk-um libdrm"
PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um"
PREFERRED_PROVIDER_virtual/libgles1= "ti-sgx-ddk-um"
PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
PREFERRED_PROVIDER_libgbm = "libgbm"
PREFERRED_PROVIDER_libgbm-dev = "libgbm-dev"

Moreover, since TI provides its own version of libgbm, in a mesa-gl_%.bbappend we set

PACKAGES_remove = "libgbm"
PACKAGES_remove = "libgbm-dev"
EXTRA_OECONF_remove = "--enable-gbm"

(Reference Automotive Grade Linux ( https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl.git;a=blob;f=meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%25.bbappend;h=a5a69513ab927aa054d358aa699845fc435012a6;hb=HEAD) ) )

This way the "providers should be set up properly" but unfortunately (depending on the openembedded-core we are using) we could get the error:
" file /usr/include/KHR/khrplatform.h is installed by both ti-sgx-ddk-um and mesa-gl, aborting "

This seems to be caused by mesa commit 87c156183 ( https://lists.yoctoproject.org/g/meta-ti/topic/build_core_image_weston_for/87c1561 ) that installs the header khrplatform.h even when mesa should provide only opengl.
In other BSP layers the issue has been fixed preventing the GPU module to install the header (See meta-xilinx ( https://www.yoctoproject.org/pipermail/meta-xilinx/2019-November/004555.html ) ).
I don't know if it is the proper solution, but I tried to implement it and I patched the Makefile in omap5-sgx-ddk-um-linux, results:
- The error related to khrplatform.h is gone
- I get another similar error about libglapi.so being installed by both ti-sgx-ddk-um and mesa-gl. Should I disable its installation too? Not sure...

Any suggestion?

Regards
Luca

[-- Attachment #2: Type: text/html, Size: 3772 bytes --]

  reply	other threads:[~2020-05-17 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 15:07 Build core-image-weston for beaglebone/am335x with GPU SGX530 enabled Luca
2020-05-17 21:22 ` Luca [this message]
2020-05-18 18:03   ` [meta-ti] " Andrew F. Davis
2020-05-18 19:19     ` Luca
2020-05-18 19:30       ` [meta-ti] " Denys Dmytriyenko
2020-05-19  8:04         ` Luca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23459.1589750559600576112@lists.yoctoproject.org \
    --to=magnabosco.luca@gmail.com \
    --cc=meta-ti@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.