mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3] glmark2: add new package
@ 2017-03-16 15:45 Markus Niebel
  2017-03-16 15:55 ` Markus Niebel
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Niebel @ 2017-03-16 15:45 UTC (permalink / raw)
  To: ptxdist; +Cc: m.olbrich, Markus Niebel

From: Markus Niebel <Markus.Niebel@tq-group.com>

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
---
changes since v2

- handle as single patch, part of original series was applied
- fix HOST_SYSTEM_PYTHON dependency as suggested
- fix versioning as suggested
- simplify flavor selection in make rule as suggested
- fix var usage in make rule as suggested
- cleanup build stages as suggested
- rewrite targetinstall as suggested
- add useful help entry in Kconfig

 ...NativeStateDRM-add-imx-drm-driver-support.patch |  29 +++++
 patches/glmark2-2017-02-10-g7215c0f/series         |   1 +
 rules/glmark2.in                                   |  45 ++++++++
 rules/glmark2.make                                 | 121 +++++++++++++++++++++
 4 files changed, 196 insertions(+)
 create mode 100644 patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
 create mode 100644 patches/glmark2-2017-02-10-g7215c0f/series
 create mode 100644 rules/glmark2.in
 create mode 100644 rules/glmark2.make

diff --git a/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch b/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
new file mode 100644
index 0000000..275db2b
--- /dev/null
+++ b/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
@@ -0,0 +1,29 @@
+From e002a3f6d912591cfc33404174ce7140120b7d6c Mon Sep 17 00:00:00 2001
+From: Markus Niebel <Markus.Niebel@tq-group.com>
+Date: Tue, 7 Mar 2017 13:53:33 +0100
+Subject: [PATCH] NativeStateDRM: add imx-drm driver support
+
+originated from buildroot commit a10b15ebeb5fd82fdb0530d485095f5800103a49
+
+glmark2: add imx-drm driver support
+Upstream status: pending
+https://github.com/glmark2/glmark2/pull/29
+
+Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
+Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
+---
+ src/native-state-drm.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
+index 4df75ec..454a24d 100644
+--- a/src/native-state-drm.cpp
++++ b/src/native-state-drm.cpp
+@@ -201,6 +201,7 @@ NativeStateDRM::init()
+     // driver (udev?).
+     static const char* drm_modules[] = {
+         "i915",
++        "imx-drm",
+         "nouveau",
+         "radeon",
+         "vmgfx",
diff --git a/patches/glmark2-2017-02-10-g7215c0f/series b/patches/glmark2-2017-02-10-g7215c0f/series
new file mode 100644
index 0000000..873d5a7
--- /dev/null
+++ b/patches/glmark2-2017-02-10-g7215c0f/series
@@ -0,0 +1 @@
+0001-NativeStateDRM-add-imx-drm-driver-support.patch
diff --git a/rules/glmark2.in b/rules/glmark2.in
new file mode 100644
index 0000000..093e256
--- /dev/null
+++ b/rules/glmark2.in
@@ -0,0 +1,45 @@
+## SECTION=multimedia_libs
+
+menuconfig GLMARK2
+	tristate
+	prompt "glmark2"
+	select MESALIB
+	select HOST_SYSTEM_PYTHON
+	select LIBPNG
+	select LIBJPEG
+	help
+	  glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.
+
+if GLMARK2
+
+config GLMARK2_FLAVOR_X11_GL
+	bool
+	prompt "x11-gl"
+	depends on MESALIB_GLX && MESALIB_OPENGL
+
+config GLMARK2_FLAVOR_X11_GLES2
+	bool
+	prompt "x11-gles2"
+	depends on MESALIB_GLX && MESALIB_GLES2
+
+config GLMARK2_FLAVOR_DRM_GL
+	bool
+	prompt "drm-gl"
+	depends on MESALIB_EGL_DRM && MESALIB_OPENGL
+
+config GLMARK2_FLAVOR_DRM_GLES2
+	bool
+	prompt "drm-gles2"
+	depends on MESALIB_EGL_DRM && MESALIB_GLES2
+
+config GLMARK2_FLAVOR_WAYLAND_GL
+	bool
+	prompt "wayland-gl"
+	depends on MESALIB_EGL_WAYLAND && MESALIB_OPENGL
+
+config GLMARK2_FLAVOR_WAYLAND_GLES2
+	bool
+	prompt "wayland-gles2"
+	depends on MESALIB_EGL_WAYLAND && MESALIB_GLES2
+
+endif
diff --git a/rules/glmark2.make b/rules/glmark2.make
new file mode 100644
index 0000000..c9d9930
--- /dev/null
+++ b/rules/glmark2.make
@@ -0,0 +1,121 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Markus Niebel <Markus.Niebel@tqs.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLMARK2) += glmark2
+
+#
+# Paths and names
+#
+# No tags: use a fake descriptive commit-ish to include the date
+GLMARK2_VERSION	:= 2017-02-10-g7215c0f
+GLMARK2_MD5	:= 215d7687a561fe356bc460765ab85ae1
+GLMARK2		:= glmark2-$(GLMARK2_VERSION)
+GLMARK2_SUFFIX	:= tar.xz
+GLMARK2_URL	:= https://github.com/glmark2/glmark2.git;tag=$(GLMARK2_VERSION)
+GLMARK2_SOURCE	:= $(SRCDIR)/$(GLMARK2).$(GLMARK2_SUFFIX)
+GLMARK2_DIR	:= $(BUILDDIR)/$(GLMARK2)
+GLMARK2_LICENSE	:= GPL-3.0, SGIv1
+GLMARK2_LICENSE_FILES := \
+	file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+	file://COPYING.SGI;md5=7125c8894bd29eddfd44ede5ce3ab1e4
+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+GLMARK2_CONF_ENV	:= \
+	$(CROSS_ENV)
+
+GLMARK2_FLAVORS-y :=
+GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_X11_GL) += x11-gl
+GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_X11_GLES2) += x11-gles2
+GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_DRM_GL) += drm-gl
+GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_DRM_GLES2) += drm-glesv2
+GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GL) += wayland-gl
+GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GLES2) += wayland-glesv2
+
+GLMARK2_FLAVORS := $(strip $(GLMARK2_FLAVORS-y))
+GLMARK2_FLAVORS := $(subst $(ptx/def/space),$(ptx/def/comma),$(GLMARK2_FLAVORS))
+
+GLMARK2_CONF_TOOL	:= NO
+GLMARK2_CONF_OPT	:= \
+	--prefix=/usr \
+	--with-flavors=$(GLMARK2_FLAVORS)
+
+$(STATEDIR)/glmark2.prepare:
+	@$(call targetinfo)
+	@cd $(GLMARK2_DIR) && \
+		$(GLMARK2_CONF_ENV) ./waf configure $(GLMARK2_CONF_OPT)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/glmark2.compile:
+	@$(call targetinfo)
+	@cd $(GLMARK2_DIR) && ./waf build -j 1
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/glmark2.install:
+	@$(call targetinfo)
+	@rm -rf "$(GLMARK2_PKGDIR)"
+	@mkdir -p "$(GLMARK2_PKGDIR)"
+	@cd "$(GLMARK2_DIR)" && ./waf --destdir=$(GLMARK2_PKGDIR) install
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/glmark2.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, glmark2)
+	@$(call install_fixup, glmark2, PRIORITY, optional)
+	@$(call install_fixup, glmark2, SECTION, base)
+	@$(call install_fixup, glmark2, AUTHOR, "Markus Niebel <Markus.Niebel@tqs.de>")
+	@$(call install_fixup, glmark2, DESCRIPTION, missing)
+
+	@$(call install_tree, glmark2, 0, 0, -, /usr/share/glmark2)
+ifeq ($(PTXCONF_GLMARK2_FLAVOR_X11_GL),y)
+	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2)
+endif
+ifeq ($(PTXCONF_GLMARK2_FLAVOR_X11_GLES2),y)
+	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-es2)
+endif
+ifeq ($(PTXCONF_GLMARK2_FLAVOR_DRM_GL),y)
+	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-drm)
+endif
+ifeq ($(PTXCONF_GLMARK2_FLAVOR_DRM_GLES2),y)
+	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-es2-drm)
+endif
+ifeq ($(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GL),y)
+	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-wayland)
+endif
+ifeq ($(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GLES2),y)
+	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-es2-wayland)
+endif
+
+	@$(call install_tree, glmark2, 0, 0, -, /usr/bin)
+
+	@$(call install_finish, glmark2)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
1.9.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH v3] glmark2: add new package
  2017-03-16 15:45 [ptxdist] [PATCH v3] glmark2: add new package Markus Niebel
@ 2017-03-16 15:55 ` Markus Niebel
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Niebel @ 2017-03-16 15:55 UTC (permalink / raw)
  To: ptxdist; +Cc: m.olbrich, Markus Niebel

please drop and use v4

Am Donnerstag, den 16.03.2017, 16:45 +0100 schrieb Markus Niebel:
> From: Markus Niebel <Markus.Niebel@tq-group.com>
> 
> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
> ---
> changes since v2
> 
> - handle as single patch, part of original series was applied
> - fix HOST_SYSTEM_PYTHON dependency as suggested
> - fix versioning as suggested
> - simplify flavor selection in make rule as suggested
> - fix var usage in make rule as suggested
> - cleanup build stages as suggested
> - rewrite targetinstall as suggested
> - add useful help entry in Kconfig
> 
>  ...NativeStateDRM-add-imx-drm-driver-support.patch |  29 +++++
>  patches/glmark2-2017-02-10-g7215c0f/series         |   1 +
>  rules/glmark2.in                                   |  45 ++++++++
>  rules/glmark2.make                                 | 121 +++++++++++++++++++++
>  4 files changed, 196 insertions(+)
>  create mode 100644 patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
>  create mode 100644 patches/glmark2-2017-02-10-g7215c0f/series
>  create mode 100644 rules/glmark2.in
>  create mode 100644 rules/glmark2.make
> 
> diff --git a/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch b/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
> new file mode 100644
> index 0000000..275db2b
> --- /dev/null
> +++ b/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
> @@ -0,0 +1,29 @@
> +From e002a3f6d912591cfc33404174ce7140120b7d6c Mon Sep 17 00:00:00 2001
> +From: Markus Niebel <Markus.Niebel@tq-group.com>
> +Date: Tue, 7 Mar 2017 13:53:33 +0100
> +Subject: [PATCH] NativeStateDRM: add imx-drm driver support
> +
> +originated from buildroot commit a10b15ebeb5fd82fdb0530d485095f5800103a49
> +
> +glmark2: add imx-drm driver support
> +Upstream status: pending
> +https://github.com/glmark2/glmark2/pull/29
> +
> +Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
> +Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> +---
> + src/native-state-drm.cpp | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
> +index 4df75ec..454a24d 100644
> +--- a/src/native-state-drm.cpp
> ++++ b/src/native-state-drm.cpp
> +@@ -201,6 +201,7 @@ NativeStateDRM::init()
> +     // driver (udev?).
> +     static const char* drm_modules[] = {
> +         "i915",
> ++        "imx-drm",
> +         "nouveau",
> +         "radeon",
> +         "vmgfx",
> diff --git a/patches/glmark2-2017-02-10-g7215c0f/series b/patches/glmark2-2017-02-10-g7215c0f/series
> new file mode 100644
> index 0000000..873d5a7
> --- /dev/null
> +++ b/patches/glmark2-2017-02-10-g7215c0f/series
> @@ -0,0 +1 @@
> +0001-NativeStateDRM-add-imx-drm-driver-support.patch
> diff --git a/rules/glmark2.in b/rules/glmark2.in
> new file mode 100644
> index 0000000..093e256
> --- /dev/null
> +++ b/rules/glmark2.in
> @@ -0,0 +1,45 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig GLMARK2
> +	tristate
> +	prompt "glmark2"
> +	select MESALIB
> +	select HOST_SYSTEM_PYTHON
> +	select LIBPNG
> +	select LIBJPEG
> +	help
> +	  glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.
> +
> +if GLMARK2
> +
> +config GLMARK2_FLAVOR_X11_GL
> +	bool
> +	prompt "x11-gl"
> +	depends on MESALIB_GLX && MESALIB_OPENGL
> +
> +config GLMARK2_FLAVOR_X11_GLES2
> +	bool
> +	prompt "x11-gles2"
> +	depends on MESALIB_GLX && MESALIB_GLES2
> +
> +config GLMARK2_FLAVOR_DRM_GL
> +	bool
> +	prompt "drm-gl"
> +	depends on MESALIB_EGL_DRM && MESALIB_OPENGL
> +
> +config GLMARK2_FLAVOR_DRM_GLES2
> +	bool
> +	prompt "drm-gles2"
> +	depends on MESALIB_EGL_DRM && MESALIB_GLES2
> +
> +config GLMARK2_FLAVOR_WAYLAND_GL
> +	bool
> +	prompt "wayland-gl"
> +	depends on MESALIB_EGL_WAYLAND && MESALIB_OPENGL
> +
> +config GLMARK2_FLAVOR_WAYLAND_GLES2
> +	bool
> +	prompt "wayland-gles2"
> +	depends on MESALIB_EGL_WAYLAND && MESALIB_GLES2
> +
> +endif
> diff --git a/rules/glmark2.make b/rules/glmark2.make
> new file mode 100644
> index 0000000..c9d9930
> --- /dev/null
> +++ b/rules/glmark2.make
> @@ -0,0 +1,121 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Markus Niebel <Markus.Niebel@tqs.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_GLMARK2) += glmark2
> +
> +#
> +# Paths and names
> +#
> +# No tags: use a fake descriptive commit-ish to include the date
> +GLMARK2_VERSION	:= 2017-02-10-g7215c0f
> +GLMARK2_MD5	:= 215d7687a561fe356bc460765ab85ae1
> +GLMARK2		:= glmark2-$(GLMARK2_VERSION)
> +GLMARK2_SUFFIX	:= tar.xz
> +GLMARK2_URL	:= https://github.com/glmark2/glmark2.git;tag=$(GLMARK2_VERSION)
> +GLMARK2_SOURCE	:= $(SRCDIR)/$(GLMARK2).$(GLMARK2_SUFFIX)
> +GLMARK2_DIR	:= $(BUILDDIR)/$(GLMARK2)
> +GLMARK2_LICENSE	:= GPL-3.0, SGIv1
> +GLMARK2_LICENSE_FILES := \
> +	file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> +	file://COPYING.SGI;md5=7125c8894bd29eddfd44ede5ce3ab1e4
> +
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +GLMARK2_CONF_ENV	:= \
> +	$(CROSS_ENV)
> +
> +GLMARK2_FLAVORS-y :=
> +GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_X11_GL) += x11-gl
> +GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_X11_GLES2) += x11-gles2
> +GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_DRM_GL) += drm-gl
> +GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_DRM_GLES2) += drm-glesv2
> +GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GL) += wayland-gl
> +GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GLES2) += wayland-glesv2
> +
> +GLMARK2_FLAVORS := $(strip $(GLMARK2_FLAVORS-y))
> +GLMARK2_FLAVORS := $(subst $(ptx/def/space),$(ptx/def/comma),$(GLMARK2_FLAVORS))
> +
> +GLMARK2_CONF_TOOL	:= NO
> +GLMARK2_CONF_OPT	:= \
> +	--prefix=/usr \
> +	--with-flavors=$(GLMARK2_FLAVORS)
> +
> +$(STATEDIR)/glmark2.prepare:
> +	@$(call targetinfo)
> +	@cd $(GLMARK2_DIR) && \
> +		$(GLMARK2_CONF_ENV) ./waf configure $(GLMARK2_CONF_OPT)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/glmark2.compile:
> +	@$(call targetinfo)
> +	@cd $(GLMARK2_DIR) && ./waf build -j 1
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/glmark2.install:
> +	@$(call targetinfo)
> +	@rm -rf "$(GLMARK2_PKGDIR)"
> +	@mkdir -p "$(GLMARK2_PKGDIR)"
> +	@cd "$(GLMARK2_DIR)" && ./waf --destdir=$(GLMARK2_PKGDIR) install
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/glmark2.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, glmark2)
> +	@$(call install_fixup, glmark2, PRIORITY, optional)
> +	@$(call install_fixup, glmark2, SECTION, base)
> +	@$(call install_fixup, glmark2, AUTHOR, "Markus Niebel <Markus.Niebel@tqs.de>")
> +	@$(call install_fixup, glmark2, DESCRIPTION, missing)
> +
> +	@$(call install_tree, glmark2, 0, 0, -, /usr/share/glmark2)
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_X11_GL),y)
> +	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2)
> +endif
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_X11_GLES2),y)
> +	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-es2)
> +endif
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_DRM_GL),y)
> +	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-drm)
> +endif
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_DRM_GLES2),y)
> +	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-es2-drm)
> +endif
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GL),y)
> +	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-wayland)
> +endif
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GLES2),y)
> +	@$(call install_copy, glmark2, 0, 0, 0755, -, /usr/bin/glmark2-es2-wayland)
> +endif
> +
> +	@$(call install_tree, glmark2, 0, 0, -, /usr/bin)
> +
> +	@$(call install_finish, glmark2)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make



_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-16 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16 15:45 [ptxdist] [PATCH v3] glmark2: add new package Markus Niebel
2017-03-16 15:55 ` Markus Niebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox