Binary graphics library fixes
cover Binary graphics library fixes
Hi,
I'm working on an application that needs the graphics libraries. Right now I'm still using the binary libraries (which are still default in meta-raspberrypi). Unfortunately, the current default configuration has two problems:
a) It chooses the wrong ABI version (hardfp instead of softfp). To reduce the possibility for error here I changed the recipe to automatically select the right version.
b) Many applications dlopen the OpenGL libraries. For that to work, they need to be listed in the RPROVIDES list. The second patch does that.
I'm aware of the fact that those binary graphics libraries will be replaced with the new "userland" libraries, but until this is all ready I'd be grat if those patches could be accepted to have a working-by-default configuration in the meta-raspberrypi tree.
Philipp
Philipp Wagner (2):
Choose correct ABI version of graphics binaries
Add RPROVIDES for OpenGL libraries
conf/machine/include/rpi-default-providers.inc | 10 +++++++--- recipes-bcm/vc-graphics/vc-graphics.inc | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 Choose correct ABI version of graphics binaries
From: Philipp Wagner <[email protected]>
Depending on the used calling convention use the hardfp or the softfp binary graphics libraries.
--- conf/machine/include/rpi-default-providers.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
conf/machine/include/rpi-default-providers.inc +7 -3
@@ -2,7 +2,11 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "vc-graphics-hardfp" -PREFERRED_PROVIDER_virtual/libgles2 ?= "vc-graphics-hardfp" -PREFERRED_PROVIDER_virtual/libgl ?= "vc-graphics-hardfp" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-raspberrypi" + +# The graphics libraries are closed source and provided as binaries with either +# hardfp and softfp calling conventions. We need to choose the one that fits +# in with the rest of the system. +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "vc-graphics-hardfp", "vc-graphics", d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "vc-graphics-hardfp", "vc-graphics", d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "vc-graphics-hardfp", "vc-graphics", d)}"
Signature · 1 line
1.7.9.5
Re: [meta-raspberrypi][PATCH 1/2] Choose correct ABI version of graphics binaries
Quoted 30 lines · Philipp Wagner
From: Philipp Wagner <[email protected]>
Depending on the used calling convention use the hardfp or the softfp binary graphics libraries.
Signed-off-by Philipp Wagner <[email protected]>--- conf/machine/include/rpi-default-providers.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)conf/machine/include/rpi-default-providers.inc +2
-3@@ -2,7 +2,11 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "vc-graphics-hardfp" -PREFERRED_PROVIDER_virtual/libgles2 ?= "vc-graphics-hardfp" -PREFERRED_PROVIDER_virtual/libgl ?= "vc-graphics-hardfp" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-raspberrypi" + +# The graphics libraries are closed source and provided as binaries witheither
+# hardfp and softfp calling conventions. We need to choose the one that fitsconf/machine/include/rpi-default-providers.inc +2
-0+# in with the rest of the system. +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("TUNE_FEATURES",
Quoted 8 lines
"callconvention-hard", "vc-graphics-hardfp", "vc-graphics", d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "vc-graphics-hardfp", "vc-graphics", d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "vc-graphics-hardfp", "vc-graphics", d)}"
I like this change but I think the best way would be to switch to userland. So we can compile our own libraries. I sent some patches so please give them a try.
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
Re: [meta-raspberrypi][PATCH 1/2] Choose correct ABI version of graphics binaries
Quoted 3 lines · Andrei Gherzan
I like this change but I think the best way would be to switch to userland. So we can compile our own libraries. I sent some patches so please give them a try.
I agree that switching to userland is the best solution. I'll give it a try in the next couple days and report back.
Philipp
Re: [meta-raspberrypi][PATCH 1/2] Choose correct ABI version of graphics binaries
I will drop this patch as we use useland now as default provider.
Thank you.
Quoted 10 lines · Philipp Wagner
Quoted 3 lines · Andrei Gherzan
I like this change but I think the best way would be to switch to userland. So we can compile our own libraries. I sent some patches so please give them a try.
I agree that switching to userland is the best solution. I'll give it a try in the next couple days and report back.
Philipp
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
PATCH 2/2 Add RPROVIDES for OpenGL libraries
In reply to Philipp WagnerFrom: Philipp Wagner <[email protected]>
Often the OpenGL libraries are dlopen'ed rather than linked against, which makes it necessary to add OpenGL libraries to RDEPENDS of the package. This of course requires that they are RPROVIDE'd somewhere.
I've seen a bug report about this at
https://github.com/djwillis/meta-raspberrypi/issues/55
but I don't know enough to judge how/why virtual/libgl is required, so I'm leaving it in for now and only adding the runtime library provider.
--- recipes-bcm/vc-graphics/vc-graphics.inc | 1 + 1 file changed, 1 insertion(+)
recipes-bcm/vc-graphics/vc-graphics.inc +1 -0
@@ -4,6 +4,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl" +RPROVIDES = "virtual/libgl virtual/libgles2 virtual/egl" COMPATIBLE_MACHINE = "raspberrypi" include ../common/firmware.inc
Signature · 1 line
1.7.9.5
Re: [meta-raspberrypi][PATCH 2/2] Add RPROVIDES for OpenGL libraries
Quoted 4 lines · Philipp Wagner
https://github.com/djwillis/meta-raspberrypi/issues/55
PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
+RPROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
As I noted in the above issue, this really is wrong; there is *no* libgl provided by the RPi firmware.
Tomas
Signature · 1 line
http://sleepfive.com
Re: [meta-raspberrypi][PATCH 2/2] Add RPROVIDES for OpenGL libraries
Am 05.02.2013 19:50, schrieb Tomas Frydrych:
Quoted 8 lines · Philipp Wagner
Quoted 4 lines
https://github.com/djwillis/meta-raspberrypi/issues/55
PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
+RPROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"As I noted in the above issue, this really is wrong; there is *no* libgl provided by the RPi firmware.
In the bug report, Andrei also mentions that it is required for some reason, but I don't know exactly what the reason is.
Andrei, could you explain that in more detail?
Philipp
Re: [meta-raspberrypi][PATCH 2/2] Add RPROVIDES for OpenGL libraries
Quoted 7 lines · Philipp Wagner
Am 05.02.2013 19:50, schrieb Tomas Frydrych:
Quoted 6 lines · Philipp Wagner
Quoted 4 lines
https://github.com/djwillis/meta-raspberrypi/issues/55
PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
+RPROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
Quoted 8 lines
Quoted 2 lines
As I noted in the above issue, this really is wrong; there is *no* libgl provided by the RPi firmware.
In the bug report, Andrei also mentions that it is required for some reason, but I don't know exactly what the reason is.
Andrei, could you explain that in more detail?
Well it was a workaround. In this way opengl distro features would point to our libraries even if that is not the right thing to do. Think about libsdl. I actually did this for this case as i remember. libsdl was a dependency for omxplayer and libsdl was triggering mesa in build because of this opengl dependency taken from DISTRO FEATURES. So I made this to trick the package not to depend on mesa but on rpi graphic libraries.
But I dropped this ugly thing. We need a real way to fix this now. There is a discussion on ml already about this.
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
We are moving to userland repo. So we will build our libraries so this patch says on hold - sorry for delay - been ill.
Quoted 34 lines · Philipp Wagner
Hi,
I'm working on an application that needs the graphics libraries. Right now I'm still using the binary libraries (which are still default in meta-raspberrypi). Unfortunately, the current default configuration has two problems:
a) It chooses the wrong ABI version (hardfp instead of softfp). To reduce the possibility for error here I changed the recipe to automatically select the right version.
b) Many applications dlopen the OpenGL libraries. For that to work, they need to be listed in the RPROVIDES list. The second patch does that.I'm aware of the fact that those binary graphics libraries will be replaced with the new "userland" libraries, but until this is all ready I'd be grat if those patches could be accepted to have a working-by-default configuration in the meta-raspberrypi tree.
Philipp
Philipp Wagner (2):
Choose correct ABI version of graphics binaries
Add RPROVIDES for OpenGL librariesconf/machine/include/rpi-default-providers.inc | 10 +++++++--- recipes-bcm/vc-graphics/vc-graphics.inc | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)--
1.7.9.5
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
Hi Andrei,
Quoted 1 line · Andrei Gherzan
We are moving to userland repo. So we will build our libraries
I tried to use the userland repo about a week ago and had to revert back to using the binary firmware; the userland tree seem to miss some bcm headers, so it was impossible to build apps against the libs whose includes require those.
Tomas
On Fri, Feb 8, 2013 at 12:17 PM, Tomas Frydrych <[email protected]
Quoted 4 lines
wrote:
Hi Andrei,
Quoted 9 lines
Quoted 1 line · Andrei Gherzan
We are moving to userland repo. So we will build our libraries
I tried to use the userland repo about a week ago and had to revert back to using the binary firmware; the userland tree seem to miss some bcm headers, so it was impossible to build apps against the libs whose includes require those.
I will push some patches this weekend. Would you give it a try?
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
Quoted 11 lines · Andrei Gherzan
On Fri, Feb 8, 2013 at 12:17 PM, Tomas Frydrych <[email protected] <mailto:[email protected]>> wrote:
Hi Andrei,
On 07/02/13 14:26, Andrei Gherzan wrote:
> We are moving to userland repo. So we will build our libraries
Quoted 7 lines
I tried to use the userland repo about a week ago and had to revert back to using the binary firmware; the userland tree seem to miss some bcm headers, so it was impossible to build apps against the libs whose includes require those.
I will push some patches this weekend. Would you give it a try?
Time allowing, of course. But the problem was not with the meta-rpi packaging, the files were missing in the upstream userland git repository.
Tomas
Signature · 1 line
http://sleepfive.com
Quoted 20 lines · Tomas Frydrych
Quoted 5 lines · Andrei Gherzan
On Fri, Feb 8, 2013 at 12:17 PM, Tomas Frydrych <[email protected] <mailto:[email protected]>>
Quoted 7 lines · wrote:
Hi Andrei,
On 07/02/13 14:26, Andrei Gherzan wrote:
> We are moving to userland repo. So we will build our librariesI tried to use the userland repo about a week ago and had to revert
back
Quoted 5 lines
to using the binary firmware; the userland tree seem to miss some bcm headers, so it was impossible to build apps against the libs whose includes require those.
Quoted 4 lines
Quoted 1 line
I will push some patches this weekend. Would you give it a try?
Time allowing, of course. But the problem was not with the meta-rpi packaging, the files were missing in the upstream userland git repository.
Maybe newer updates include those. Just need to know.
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12