mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2 5/5] glmark2: add new package
Date: Thu, 9 Mar 2017 17:07:51 +0100	[thread overview]
Message-ID: <20170309160751.3pom5m4wxutznqlz@pengutronix.de> (raw)
In-Reply-To: <1489059948-19114-6-git-send-email-niebelm@tqsc.de>

On Thu, Mar 09, 2017 at 12:45:48PM +0100, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@tq-group.com>
> 
> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
> ---
>  ...NativeStateDRM-add-imx-drm-driver-support.patch |  29 ++++
>  .../series                                         |   1 +
>  rules/glmark2.in                                   |  45 ++++++
>  rules/glmark2.make                                 | 156 +++++++++++++++++++++
>  4 files changed, 231 insertions(+)
>  create mode 100644 patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/0001-NativeStateDRM-add-imx-drm-driver-support.patch
>  create mode 100644 patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/series
>  create mode 100644 rules/glmark2.in
>  create mode 100644 rules/glmark2.make
> 
> diff --git a/patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/0001-NativeStateDRM-add-imx-drm-driver-support.patch b/patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/0001-NativeStateDRM-add-imx-drm-driver-support.patch
> new file mode 100644
> index 0000000..275db2b
> --- /dev/null
> +++ b/patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/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-7215c0f337dae0b232535549c37fca441747a891/series b/patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/series
> new file mode 100644
> index 0000000..873d5a7
> --- /dev/null
> +++ b/patches/glmark2-7215c0f337dae0b232535549c37fca441747a891/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..d549196
> --- /dev/null
> +++ b/rules/glmark2.in
> @@ -0,0 +1,45 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig GLMARK2
> +	tristate
> +	prompt "glmark2"
> +	select MESALIB
> +	select HOST_PYTHON

No. HOST_PYTHON is to build a target python. PTXdist already needs a system
python.

> +	select LIBPNG
> +	select LIBJPEG
> +	help
> +	  FIXME
> +
> +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..d286708
> --- /dev/null
> +++ b/rules/glmark2.make
> @@ -0,0 +1,156 @@
> +# -*-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
> +#
> +GLMARK2_VERSION	:= 7215c0f337dae0b232535549c37fca441747a891

See my comment for kmscube.

> +GLMARK2_MD5	:= 7547b54da2ff7335c9316e084519adc9
> +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=899fbe7e42d494c7c8c159c7001693d5 \
> +	file://COPYING.SGI;md5=899fbe7e42d494c7c8c159c7001693d5
> +
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +GLMARK2_CONF_ENV	:= \
> +	$(CROSS_ENV)
> +
> +space :=
> +space +=
> +comma := ,

we have such definitions in rules/other/Definitions.make

> +GLMARK2_FLAVORS :=
> +

GLMARK2_FLAVORS-y :=
GLMARK2_FLAVORS-$(PTXCONF_GLMARK2_FLAVOR_X11_GL) += x11-gl
...

is more compact and imho more readable as well.

> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_X11_GL),y)
> +GLMARK2_FLAVORS += x11-gl
> +endif
> +
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_X11_GLES2),y)
> +GLMARK2_FLAVORS += x11-gles2
> +endif
> +
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_DRM_GL),y)
> +GLMARK2_FLAVORS += drm-gl
> +endif
> +
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_DRM_GLES2),y)
> +GLMARK2_FLAVORS += drm-glesv2
> +endif
> +
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GL),y)
> +GLMARK2_FLAVORS += wayland-gl
> +endif
> +
> +ifeq ($(PTXCONF_GLMARK2_FLAVOR_WAYLAND_GLES2),y)
> +GLMARK2_FLAVORS += wayland-glesv2
> +endif
> +
> +GLMARK2_FLAVORS := $(strip $(GLMARK2_FLAVORS))
> +GLMARK2_FLAVORS := $(subst $(space),$(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_PATH) $(GLMARK2_CONF_ENV) \

GLMARK2_PATH is not defined and probably not needed.

> +		python2 ./waf configure $(GLMARK2_CONF_OPT)
> +	@$(call touch)

The 'python' in $PATH should be python2 so just call ./waf.


> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/glmark2.compile:
> +	@$(call targetinfo)
> +	cd $(GLMARK2_DIR) && \
> +		$(GLMARK2_PATH) $(GLMARK2_ENV) \

GLMARK2_ENV is not defined. Maybe nothing special needed after configure?

> +		python2 ./waf build -j 1
> +	@$(call touch)

dito.

> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/glmark2.install:
> +	@$(call targetinfo)
> +	rm -rf "$(GLMARK2_PKGDIR)"
> +	mkdir -p "$(GLMARK2_PKGDIR)"
> +	cd "$(GLMARK2_DIR)" && \
> +		$(GLMARK2_PATH) $(GLMARK2_ENV) \
> +		python2 ./waf --destdir=$(GLMARK2_PKGDIR) install
> +	@$(call touch)

dito.

> +
> +# ----------------------------------------------------------------------------
> +# 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)
> +
> +#	#
> +#	# example code:; copy all libraries, links and binaries
> +#	#

remove.

> +
> +	@for i in $(shell cd $(GLMARK2_PKGDIR) && find bin sbin usr/bin usr/sbin -type f); do \
> +		$(call install_copy, glmark2, 0, 0, 0755, -, /$$i); \
> +	done
> +	@for i in $(shell cd $(GLMARK2_PKGDIR) && find lib usr/lib -name "*.so*"); do \
> +		$(call install_copy, glmark2, 0, 0, 0644, -, /$$i); \
> +	done
> +	@links="$(shell cd $(GLMARK2_PKGDIR) && find lib usr/lib -type l)"; \
> +	if [ -n "$$links" ]; then \
> +		for i in $$links; do \
> +			from="`readlink $(GLMARK2_PKGDIR)/$$i`"; \
> +			to="/$$i"; \
> +			$(call install_link, glmark2, $$from, $$to); \
> +		done; \
> +	fi

I don't no how many files are installed here. Please use explicit
install_copy / install_lib calls when reasonable. And install_tree /
install_glob for the rest.

> +
> +#	#
> +#	# FIXME: add all necessary things here
> +#	#
> +
> +	@$(call install_finish, glmark2)
> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/glmark2.clean:
> +#	@$(call targetinfo)
> +#	@$(call clean_pkg, GLMARK2)

remove.

Michael

> +
> +# vim: syntax=make
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-03-09 16:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 11:45 [ptxdist] [PATCH v2 0/5] update drm / mesa support and add testtools Markus Niebel
2017-03-09 11:45 ` [ptxdist] [PATCH v2 1/5] host-system-python: add check for mako Markus Niebel
2017-03-09 11:45 ` [ptxdist] [PATCH v2 2/5] mesalib: version bump 13.0.2 -> 17.0.1 Markus Niebel
2017-03-09 11:45 ` [ptxdist] [PATCH v2 3/5] libdrm: version bump 2.7.74 -> 2.7.75 Markus Niebel
2017-03-09 16:36   ` Michael Olbrich
2017-03-09 11:45 ` [ptxdist] [PATCH v2 4/5] kmscube: add new package Markus Niebel
2017-03-09 15:47   ` Michael Olbrich
2017-03-09 16:08   ` Michael Olbrich
2017-03-09 11:45 ` [ptxdist] [PATCH v2 5/5] glmark2: " Markus Niebel
2017-03-09 16:07   ` Michael Olbrich [this message]
2017-03-10  9:44 ` [ptxdist] [PATCH v2 0/5] update drm / mesa support and add testtools Michael Olbrich

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=20170309160751.3pom5m4wxutznqlz@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox