* [Buildroot] [PATCH v4 1/1] glmark2: new package
@ 2014-10-17 21:11 Bernd Kuhls
2014-10-28 18:34 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Bernd Kuhls @ 2014-10-17 21:11 UTC (permalink / raw)
To: buildroot
From: Spenser Gilliland <spenser@gillilanding.com>
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v4: - rebased Spenser?s patch: http://patchwork.ozlabs.org/patch/278304/
- switched to new official repo, see https://launchpad.net/glmark2
this also removes fbdev support, since I can not test it
- removed Spencer?s SUNXI_MALI patches, due to lack of hardware I can not
test it
- renamed options for virtual GL packages
- reworked dependencies, I hope I got all combinations right
- added patch to support current libpng
runtime-time tested on an uClibc-based system:
=======================================================
glmark2 2012.12
=======================================================
OpenGL Information
GL_VENDOR: Intel Open Source Technology Center
GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop
GL_VERSION: 3.0 Mesa 10.3.1
=======================================================
package/Config.in | 1 +
package/glmark2/Config.in | 31 +++++++++++++
package/glmark2/glmark2-0001-libpng16.patch | 16 +++++++
package/glmark2/glmark2.mk | 64 +++++++++++++++++++++++++++
4 files changed, 112 insertions(+)
create mode 100644 package/glmark2/Config.in
create mode 100644 package/glmark2/glmark2-0001-libpng16.patch
create mode 100644 package/glmark2/glmark2.mk
diff --git a/package/Config.in b/package/Config.in
index 0d5f212..661de71 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -183,6 +183,7 @@ menu "Graphic libraries and applications (graphic/text)"
comment "Graphic applications"
source "package/fswebcam/Config.in"
+ source "package/glmark2/Config.in"
source "package/gnuplot/Config.in"
source "package/jhead/Config.in"
source "package/mesa3d-demos/Config.in"
diff --git a/package/glmark2/Config.in b/package/glmark2/Config.in
new file mode 100644
index 0000000..b60d9d1
--- /dev/null
+++ b/package/glmark2/Config.in
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_GLMARK2_EGL_GLES
+ bool
+ default y
+ depends on BR2_PACKAGE_HAS_LIBEGL
+ depends on BR2_PACKAGE_HAS_LIBGLES
+ depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
+
+config BR2_PACKAGE_GLMARK2_GL
+ bool
+ default y
+ depends on BR2_PACKAGE_HAS_LIBGL
+ depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
+
+comment "glmark2 needs an OpenGL or an openGL ES and EGL backend with mesa3d, libX11 or wayland"
+ depends on BR2_LARGEFILE
+ depends on !BR2_PACKAGE_GLMARK2_GL && !BR2_PACKAGE_GLMARK2_EGL_GLES
+
+comment "glmark2 needs a toolchain w/ largefile"
+ depends on !BR2_LARGEFILE
+
+config BR2_PACKAGE_GLMARK2
+ bool "glmark2"
+ depends on BR2_LARGEFILE
+ depends on BR2_PACKAGE_GLMARK2_EGL_GLES || BR2_PACKAGE_GLMARK2_GL
+ depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
+ select BR2_PACKAGE_JPEG
+ select BR2_PACKAGE_LIBPNG
+ help
+ glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.
+
+ https://github.com/glmark2/glmark2
diff --git a/package/glmark2/glmark2-0001-libpng16.patch b/package/glmark2/glmark2-0001-libpng16.patch
new file mode 100644
index 0000000..05d4804
--- /dev/null
+++ b/package/glmark2/glmark2-0001-libpng16.patch
@@ -0,0 +1,16 @@
+glmark2: Add support for libpng16
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript
+--- glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript 2014-09-26 11:14:47.000000000 +0200
++++ glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript 2014-10-17 19:40:16.011722310 +0200
+@@ -94,7 +94,7 @@
+ uselib = uselib, mandatory = True)
+
+ # Check for a supported version of libpng
+- supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'),)
++ supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'), ('libpng16', '1.6'),)
+ have_png = False
+ for (pkg, atleast) in supp_png_pkgs:
+ try:
diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
new file mode 100644
index 0000000..f2bfd45
--- /dev/null
+++ b/package/glmark2/glmark2.mk
@@ -0,0 +1,64 @@
+################################################################################
+#
+# glmark2
+#
+################################################################################
+
+GLMARK2_VERSION = 0005100d7221190720dc130605d07cbd56e83047
+GLMARK2_SITE = $(call github,glmark2,glmark2,$(GLMARK2_VERSION))
+GLMARK2_LICENSE = GPLv3+ SGIv1
+GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
+GLMARK2_DEPENDENCIES = host-pkgconf jpeg libpng
+
+GLMARK2_CONF_OPTS = --prefix=/usr
+
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES)$(BR2_PACKAGE_XLIB_LIBX11),yyy)
+GLMARK2_DEPENDENCIES += libegl libgles xlib_libX11
+GLMARK2_FLAVORS += x11-glesv2
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_XLIB_LIBX11),yy)
+GLMARK2_DEPENDENCIES += libgl xlib_libX11
+GLMARK2_FLAVORS += x11-gl
+endif
+
+# drm support depends on gbm which is only provided by mesa3d with enabled egl
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES)$(BR2_PACKAGE_MESA3D),yyy)
+GLMARK2_DEPENDENCIES += libegl libgles mesa3d
+GLMARK2_FLAVORS += drm-glesv2
+endif
+
+# drm support depends on gbm which is only provided by mesa3d with enabled egl
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_MESA3D),yyy)
+GLMARK2_DEPENDENCIES += libgl mesa3d
+GLMARK2_FLAVORS += drm-gl
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yyy)
+GLMARK2_DEPENDENCIES += libegl libgles wayland
+GLMARK2_FLAVORS += wayland-glesv2
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_HAS_LIBGL),yy)
+GLMARK2_DEPENDENCIES += libgl wayland
+GLMARK2_FLAVORS += wayland-gl
+endif
+
+GLMARK2_CONF_OPTS += \
+ --with-flavors=$(subst $(space),$(comma),$(GLMARK2_FLAVORS))
+
+define GLMARK2_CONFIGURE_CMDS
+ cd $(@D) && \
+ $(TARGET_MAKE_ENV) $(GLMARK2_CONF_ENV) $(TARGET_CONFIGURE_OPTS) \
+ ./waf configure $(GLMARK2_CONF_OPTS)
+endef
+
+define GLMARK2_BUILD_CMDS
+ cd $(@D) && $(TARGET_MAKE_ENV) ./waf
+endef
+
+define GLMARK2_INSTALL_TARGET_CMDS
+ cd $(@D) && $(TARGET_MAKE_ENV) ./waf install --destdir=$(TARGET_DIR)
+endef
+
+$(eval $(generic-package))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 1/1] glmark2: new package
2014-10-17 21:11 [Buildroot] [PATCH v4 1/1] glmark2: new package Bernd Kuhls
@ 2014-10-28 18:34 ` Thomas Petazzoni
2014-10-28 19:39 ` Bernd Kuhls
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 18:34 UTC (permalink / raw)
To: buildroot
Dear Bernd Kuhls,
On Fri, 17 Oct 2014 23:11:38 +0200, Bernd Kuhls wrote:
> From: Spenser Gilliland <spenser@gillilanding.com>
>
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Thanks for taking care of this package. However, it fails to build
here, with this defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2014.08.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16=y
BR2_TOOLCHAIN_EXTERNAL_LARGEFILE=y
BR2_TOOLCHAIN_EXTERNAL_INET_IPV6=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_GLMARK2=y
BR2_PACKAGE_RPI_USERLAND=y
BR2_PACKAGE_WAYLAND=y
# BR2_TARGET_ROOTFS_TAR is not set
Which gives the following error:
Setting top to : /home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047
Setting out to : /home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047/build
Checking for 'gcc' (c compiler) : /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-gcc
Checking for 'g++' (c++ compiler) : /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-g++
Checking for header stdlib.h : yes
Checking for header string.h : yes
Checking for header unistd.h : yes
Checking for header stdint.h : yes
Checking for header stdio.h : yes
Checking for header jpeglib.h : yes
Checking for library m : yes
Checking for library jpeg : yes
Checking for function memset : yes
Checking for function sqrt : yes
Checking for program pkg-config : /home/thomas/projets/buildroot/output/host/usr/bin/pkg-config
Checking for 'libpng12' >= 1.2 : not found
Checking for 'libpng15' >= 1.5 : not found
Checking for 'libpng16' >= 1.6 : yes
Checking for 'x11' : not found
Checking for 'gl' : not found
Checking for 'egl' : yes
Checking for 'glesv2' : yes
Checking for 'libdrm' : not found
Checking for 'gbm' : not found
Checking for 'mirclient' : not found
Checking for 'wayland-client' : yes
Checking for 'wayland-egl' : not found
The configuration failed
(complete log in /home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047/build/config.log)
make: *** [/home/thomas/projets/buildroot/output/build/glmark2-0005100d7221190720dc130605d07cbd56e83047/.stamp_configured] Erreur 1
> + depends on BR2_PACKAGE_HAS_LIBEGL
> + depends on BR2_PACKAGE_HAS_LIBGLES
> + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
> +
> +config BR2_PACKAGE_GLMARK2_GL
> + bool
> + default y
> + depends on BR2_PACKAGE_HAS_LIBGL
> + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
> +
> +comment "glmark2 needs an OpenGL or an openGL ES and EGL backend with mesa3d, libX11 or wayland"
> + depends on BR2_LARGEFILE
> + depends on !BR2_PACKAGE_GLMARK2_GL && !BR2_PACKAGE_GLMARK2_EGL_GLES
> +
> +comment "glmark2 needs a toolchain w/ largefile"
> + depends on !BR2_LARGEFILE
> +
> +config BR2_PACKAGE_GLMARK2
> + bool "glmark2"
> + depends on BR2_LARGEFILE
> + depends on BR2_PACKAGE_GLMARK2_EGL_GLES || BR2_PACKAGE_GLMARK2_GL
> + depends on BR2_PACKAGE_MESA3D || BR2_PACKAGE_XLIB_LIBX11 || BR2_PACKAGE_WAYLAND
Do we need this dependency since we already have either
BR2_PACKAGE_GLMARK2_EGL_GLES or BR2_PACKAGE_GLMARK2_GL ?
> + select BR2_PACKAGE_JPEG
> + select BR2_PACKAGE_LIBPNG
> + help
> + glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.
> +
> + https://github.com/glmark2/glmark2
> diff --git a/package/glmark2/glmark2-0001-libpng16.patch b/package/glmark2/glmark2-0001-libpng16.patch
> new file mode 100644
> index 0000000..05d4804
> --- /dev/null
> +++ b/package/glmark2/glmark2-0001-libpng16.patch
> @@ -0,0 +1,16 @@
> +glmark2: Add support for libpng16
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +
> +diff -uNr glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript
> +--- glmark2-0005100d7221190720dc130605d07cbd56e83047.org/wscript 2014-09-26 11:14:47.000000000 +0200
> ++++ glmark2-0005100d7221190720dc130605d07cbd56e83047/wscript 2014-10-17 19:40:16.011722310 +0200
> +@@ -94,7 +94,7 @@
> + uselib = uselib, mandatory = True)
> +
> + # Check for a supported version of libpng
> +- supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'),)
> ++ supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'), ('libpng16', '1.6'),)
> + have_png = False
> + for (pkg, atleast) in supp_png_pkgs:
> + try:
Great. Glad to see supporting a modern libpng is as simple as that. Can
you submit this patch upstream?
> +define GLMARK2_CONFIGURE_CMDS
> + cd $(@D) && \
> + $(TARGET_MAKE_ENV) $(GLMARK2_CONF_ENV) $(TARGET_CONFIGURE_OPTS) \
> + ./waf configure $(GLMARK2_CONF_OPTS)
> +endef
> +
> +define GLMARK2_BUILD_CMDS
> + cd $(@D) && $(TARGET_MAKE_ENV) ./waf
> +endef
> +
> +define GLMARK2_INSTALL_TARGET_CMDS
> + cd $(@D) && $(TARGET_MAKE_ENV) ./waf install --destdir=$(TARGET_DIR)
> +endef
For several of other packages that use waf (example: jack2), we had to
add a dependency on host-python, because waf does not necessarily work
with Python 3. So if the Python provided by the host distribution is
too recent, waf will not work. Even though I hate to add too many host
dependencies, shouldn't we do the same here?
Can you look into those issues, and submit an updated version?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 1/1] glmark2: new package
2014-10-28 18:34 ` Thomas Petazzoni
@ 2014-10-28 19:39 ` Bernd Kuhls
2014-10-28 21:00 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Bernd Kuhls @ 2014-10-28 19:39 UTC (permalink / raw)
To: buildroot
[posted and mailed]
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:20141028193444.72b79a2d at free-electrons.com:
> Checking for 'wayland-egl' : not found
Hi,
glmark2 searches for wayland-egl.pc. Afaics the only package providing this
file is mesa3d:
https://packages.debian.org/search?searchon=contents&keywords=wayland-
egl.pc&mode=path&suite=stable&arch=any
According to this posting from 2012 the RPI does not provide wayland-egl:
http://lists.freedesktop.org/archives/wayland-devel/2012-November/006216.html
As I do not have access to a RPI I would like to ask if this is still
correct. If yes, I need to change the dependencies.
Regards, Bernd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 1/1] glmark2: new package
2014-10-28 19:39 ` Bernd Kuhls
@ 2014-10-28 21:00 ` Thomas Petazzoni
2014-11-18 18:10 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 21:00 UTC (permalink / raw)
To: buildroot
Dear Bernd Kuhls,
On Tue, 28 Oct 2014 20:39:37 +0100, Bernd Kuhls wrote:
> [posted and mailed]
>
> Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
> @public.gmane.org> wrote in news:20141028193444.72b79a2d at free-electrons.com:
>
> > Checking for 'wayland-egl' : not found
>
> Hi,
>
> glmark2 searches for wayland-egl.pc. Afaics the only package providing this
> file is mesa3d:
> https://packages.debian.org/search?searchon=contents&keywords=wayland-
> egl.pc&mode=path&suite=stable&arch=any
>
> According to this posting from 2012 the RPI does not provide wayland-egl:
> http://lists.freedesktop.org/archives/wayland-devel/2012-November/006216.html
>
> As I do not have access to a RPI I would like to ask if this is still
> correct. If yes, I need to change the dependencies.
Yann, maybe?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v4 1/1] glmark2: new package
2014-10-28 21:00 ` Thomas Petazzoni
@ 2014-11-18 18:10 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2014-11-18 18:10 UTC (permalink / raw)
To: buildroot
Thomas, Bernd,
On 2014-10-28 22:00 +0100, Thomas Petazzoni spake thusly:
> On Tue, 28 Oct 2014 20:39:37 +0100, Bernd Kuhls wrote:
> > [posted and mailed]
> >
> > Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
> > @public.gmane.org> wrote in news:20141028193444.72b79a2d at free-electrons.com:
> >
> > > Checking for 'wayland-egl' : not found
> >
> > Hi,
> >
> > glmark2 searches for wayland-egl.pc. Afaics the only package providing this
> > file is mesa3d:
> > https://packages.debian.org/search?searchon=contents&keywords=wayland-
> > egl.pc&mode=path&suite=stable&arch=any
> >
> > According to this posting from 2012 the RPI does not provide wayland-egl:
> > http://lists.freedesktop.org/archives/wayland-devel/2012-November/006216.html
> >
> > As I do not have access to a RPI I would like to ask if this is still
> > correct. If yes, I need to change the dependencies.
>
> Yann, maybe?
Indeed, the RPi EGL implementation does not provide the sepcific GL
extension required by Wayland, so we can't do native wayland on the RPi
(for now).
The weston compositor has support for the RPi, but using a specific
backend, that directly uses Broadcom's APIs.
So, the best course of actions for now is to simply depend on mesa3d.
However, I was thinking a bit further about that the other day:
- having wayland stuff depend on _HAS_EGL is incorrect, because not
all EGL providers has the required GL extension
- on some platforms, an additional library exists, besides the EGL
lib, that provides the GL extension.
So having Wayland stuff only depend on mesa3d is not correct either (it
is in Buildroot for now), because it might be possible to have an EGL
provider that has the required extension (I thing the NVidia driver has
it), or an additional library provides it.
The only solution I can see is to add a new virtual package (name to be
discussed) BR2_PACKAGE_HAS_WAYLAND_EGL that providers could select it is
they have that extension. It can even be a package different from the
one that provides EGL.
But, work for later. For now, packages that require the Wayland
extension can simply depend on mesa3d.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-18 18:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 21:11 [Buildroot] [PATCH v4 1/1] glmark2: new package Bernd Kuhls
2014-10-28 18:34 ` Thomas Petazzoni
2014-10-28 19:39 ` Bernd Kuhls
2014-10-28 21:00 ` Thomas Petazzoni
2014-11-18 18:10 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox