All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application.
@ 2013-08-24 19:41 Spenser Gilliland
  2013-08-24 19:41 ` [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support Spenser Gilliland
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:41 UTC (permalink / raw)
  To: buildroot

This patch series improves Mesa support and adds the glmark2 benchmark.

Spenser Gilliland (6):
  libdrm: bump and add experimental ARM framebuffer support
  sunxi-mali: bug fixes for pc and init script
  sunxi-cedarx: bump to newer version, use armel2 binaries, add demo
  mesa3d: reorganize, modularize, and bump to version 9.1.6
  libpng12: new package
  glmark2: new package

 package/Config.in                                  |   3 +
 package/glmark2/Config.in                          |  49 ++++++
 package/glmark2/glmark2-add-mali-support.patch     | 102 ++++++++++++
 package/glmark2/glmark2-fix-add-GLchar.patch       |  17 ++
 .../glmark2-gl-to-glesv2-on-drm-flavor.patch       |  25 +++
 package/glmark2/glmark2.mk                         |  70 +++++++++
 package/libdrm/Config.in                           |  14 +-
 package/libdrm/libdrm.mk                           |  24 ++-
 package/libpng12/Config.in                         |   8 +
 package/libpng12/libpng12.mk                       |  18 +++
 package/mesa3d/Config.in                           | 172 +++++++++++++++++++++
 package/mesa3d/mesa3d-cross-glsl-compiler.patch    |  41 +++++
 package/mesa3d/mesa3d-gbm-without-dri.patch        |  30 ++++
 package/mesa3d/mesa3d.mk                           | 149 ++++++++++++++++++
 package/opengl/Config.in                           |   3 +
 package/opengl/libegl/libegl.mk                    |   4 +
 package/opengl/libgl/libgl.mk                      |  20 +++
 package/opengl/libgles/libgles.mk                  |   4 +
 package/opengl/libopenvg/libopenvg.mk              |   4 +
 package/sunxi-cedarx/Config.in                     |  10 ++
 package/sunxi-cedarx/sunxi-cedarx.mk               |  26 +++-
 package/sunxi-mali/S80mali                         |   2 +-
 package/sunxi-mali/glesv2.pc                       |   2 +-
 package/x11r7/Config.in                            |   1 -
 package/x11r7/mesa3d/Config.in                     |  15 --
 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch    |  56 -------
 package/x11r7/mesa3d/mesa3d.mk                     |  40 -----
 .../xserver_xorg-server/xserver_xorg-server.mk     |   4 +-
 28 files changed, 767 insertions(+), 146 deletions(-)
 create mode 100644 package/glmark2/Config.in
 create mode 100644 package/glmark2/glmark2-add-mali-support.patch
 create mode 100644 package/glmark2/glmark2-fix-add-GLchar.patch
 create mode 100644 package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
 create mode 100644 package/glmark2/glmark2.mk
 create mode 100644 package/libpng12/Config.in
 create mode 100644 package/libpng12/libpng12.mk
 create mode 100644 package/mesa3d/Config.in
 create mode 100644 package/mesa3d/mesa3d-cross-glsl-compiler.patch
 create mode 100644 package/mesa3d/mesa3d-gbm-without-dri.patch
 create mode 100644 package/mesa3d/mesa3d.mk
 create mode 100644 package/opengl/libgl/libgl.mk
 delete mode 100644 package/x11r7/mesa3d/Config.in
 delete mode 100644 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
 delete mode 100644 package/x11r7/mesa3d/mesa3d.mk

-- 
1.8.1.2

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

* [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support
  2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
@ 2013-08-24 19:41 ` Spenser Gilliland
  2013-08-26 17:33   ` Arnout Vandecappelle
  2013-08-27  7:38   ` Thomas Petazzoni
  2013-08-24 19:41 ` [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script Spenser Gilliland
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:41 UTC (permalink / raw)
  To: buildroot

The newer versions of libdrm have substantially fewer dependencies as drm is
moving to be a subsystem for both wayland and Xorg.

Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/libdrm/Config.in | 14 +++-----------
 package/libdrm/libdrm.mk | 24 +++++++++---------------
 2 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
index 8bf676b..f976ef1 100644
--- a/package/libdrm/Config.in
+++ b/package/libdrm/Config.in
@@ -1,18 +1,10 @@
 config BR2_PACKAGE_LIBDRM
 	bool "libdrm"
+	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
+	select BR2_PACKAGE_LIBATOMIC_OPS
+	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_LARGEFILE
-	select BR2_PACKAGE_XPROTO_GLPROTO
-	select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
-	select BR2_PACKAGE_XLIB_LIBXXF86VM
-	select BR2_PACKAGE_XLIB_LIBXMU
-	select BR2_PACKAGE_XLIB_LIBPCIACCESS
-	select BR2_PACKAGE_XPROTO_DRI2PROTO
-	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
-	# libatomic_ops is only available on a subset of the supported
-	# architectures, and we make the assumption that the intel
-	# driver can only be used on x86 and x86_64 machines.
-	select BR2_PACKAGE_LIBATOMIC_OPS if (BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL && (BR2_i386 || BR2_x86_64))
 	help
 	  Direct Rendering Manager
 
diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
index d3d2b2d..8388e68 100644
--- a/package/libdrm/libdrm.mk
+++ b/package/libdrm/libdrm.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBDRM_VERSION = 2.4.38
+LIBDRM_VERSION = 2.4.46
 LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
 LIBDRM_SITE = http://dri.freedesktop.org/libdrm/
 LIBDRM_LICENSE = MIT
@@ -12,24 +12,18 @@ LIBDRM_LICENSE = MIT
 LIBDRM_INSTALL_STAGING = YES
 
 LIBDRM_DEPENDENCIES = \
-	xproto_glproto \
-	xproto_xf86vidmodeproto \
-	xlib_libXxf86vm \
-	xlib_libXmu \
-	xlib_libpciaccess \
-	xproto_dri2proto \
 	xlib_libpthread-stubs \
 	host-pkgconf
 
-ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y)
-LIBDRM_CONF_OPT += --enable-intel
-LIBDRM_DEPENDENCIES += libatomic_ops
-else
-LIBDRM_CONF_OPT += --disable-intel
-endif
+LIBDRM_CONF_OPT = \
+	--disable-cairo-tests \
+	--disable-manpages
 
-ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
-LIBDRM_CONF_OPT += --disable-radeon
+ifeq ($(BR2_arm),y)
+LIBDRM_CONF_OPT += \
+	--enable-omap-experimental-api \
+	--enable-exynos-experimental-api \
+	--enable-freedreno-experimental-api
 endif
 
 ifeq ($(BR2_PACKAGE_UDEV),y)
-- 
1.8.1.2

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

* [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script
  2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
  2013-08-24 19:41 ` [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support Spenser Gilliland
@ 2013-08-24 19:41 ` Spenser Gilliland
  2013-08-27  7:39   ` Thomas Petazzoni
  2013-08-28 11:44   ` Peter Korsgaard
  2013-08-24 19:41 ` [Buildroot] [PATCH 3/6] sunxi-cedarx: bump to newer version, use armel2 binaries, add demo Spenser Gilliland
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:41 UTC (permalink / raw)
  To: buildroot

fix bad escape sequences in init script and add correct lib for pc file.

Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/sunxi-mali/S80mali   | 2 +-
 package/sunxi-mali/glesv2.pc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/sunxi-mali/S80mali b/package/sunxi-mali/S80mali
index 6f51cc4..ecfbab9 100644
--- a/package/sunxi-mali/S80mali
+++ b/package/sunxi-mali/S80mali
@@ -5,7 +5,7 @@ install_driver() {
 	OPTS=$2
 
 	modprobe $DRIVER $OPTS
-	maj=$(awk "$$2==\"${DRIVER}\" { print $$1; }" /proc/devices)
+	maj=$(awk "\$2==\"${DRIVER}\" { print \$1; }" /proc/devices)
 
 	rm -f /dev/${DRIVER}
 
diff --git a/package/sunxi-mali/glesv2.pc b/package/sunxi-mali/glesv2.pc
index 4e112ee..9273678 100644
--- a/package/sunxi-mali/glesv2.pc
+++ b/package/sunxi-mali/glesv2.pc
@@ -7,6 +7,6 @@ Name: glesv2
 Description: ARM Mali implementation of OpenGL ESv2
 Version: 2.0
 Requires:
-Libs: -L${libdir} -lGLESv2 -lGLES_CM -lUMP
+Libs: -L${libdir} -lGLESv2 -lGLESv1_CM -lUMP
 Cflags: -I${includedir}/GLES2
 
-- 
1.8.1.2

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

* [Buildroot] [PATCH 3/6] sunxi-cedarx: bump to newer version, use armel2 binaries, add demo
  2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
  2013-08-24 19:41 ` [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support Spenser Gilliland
  2013-08-24 19:41 ` [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script Spenser Gilliland
@ 2013-08-24 19:41 ` Spenser Gilliland
  2013-08-24 19:41 ` [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6 Spenser Gilliland
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:41 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/sunxi-cedarx/Config.in       | 10 ++++++++++
 package/sunxi-cedarx/sunxi-cedarx.mk | 26 ++++++++++++++++++++++----
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/package/sunxi-cedarx/Config.in b/package/sunxi-cedarx/Config.in
index b280db0..aa520b5 100644
--- a/package/sunxi-cedarx/Config.in
+++ b/package/sunxi-cedarx/Config.in
@@ -10,5 +10,15 @@ config BR2_PACKAGE_SUNXI_CEDARX
 	  http://github.com/linux-sunxi/cedarx-libs
 	  http://linux-sunxi.org/CedarX
 
+if BR2_PACKAGE_SUNXI_CEDARX
+
+config BR2_PACKAGE_SUNXI_CEDARX_DEMO
+	bool "install enc_dec_test demo"
+	help
+	  Install a test program which verifies the functionality of the CedarX
+	  libraries
+
+endif
+
 comment "sunxi-cedarx requires an eglibc/glibc based toolchain"
 	depends on !BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
diff --git a/package/sunxi-cedarx/sunxi-cedarx.mk b/package/sunxi-cedarx/sunxi-cedarx.mk
index 07c85d4..bc8ee32 100644
--- a/package/sunxi-cedarx/sunxi-cedarx.mk
+++ b/package/sunxi-cedarx/sunxi-cedarx.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SUNXI_CEDARX_VERSION = 74923e55fc
+SUNXI_CEDARX_VERSION = 74c3e9052
 SUNXI_CEDARX_SITE = http://github.com/linux-sunxi/cedarx-libs/tarball/$(SUNXI_CEDARX_VERSION)
 
 SUNXI_CEDARX_INSTALL_STAGING = YES
@@ -14,7 +14,12 @@ SUNXI_CEDARX_CONFIGURE_OPTS = \
 
 ifeq ($(BR2_ARM_EABIHF),y)
 SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf
-# libavheap.so is only available on EABIHF
+SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/ve
+else
+SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel2
+SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/output/ve
+endif
+
 define SUNXI_CEDARX_BUILD_AVHEAP
 	$(TARGET_CC) $(TARGET_CFLAGS) \
 		-c $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.c \
@@ -25,18 +30,30 @@ define SUNXI_CEDARX_BUILD_AVHEAP
 		-o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \
 		$(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o
 endef
+
 define SUNXI_CEDARX_INSTALL_AVHEAP
 	$(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \
 		$(1)/usr/lib/libavheap.so
 endef
-else
-SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel
+
+ifeq ($(BR2_PACKAGE_SUNXI_CEDARX_DEMO),y)
+
+define SUNXI_CEDARX_BUILD_DEMO
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR)/sample
+endef
+
+define SUNXI_CEDARX_INSTALL_DEMO
+	$(INSTALL) -D -m 755 $(SUNXI_CEDARX_SAMPLE_LOC) \
+		$(TARGET_DIR)/usr/bin/ve
+endef
+
 endif
 
 define SUNXI_CEDARX_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR) \
 		$(SUNXI_CEDARX_CONFIGURE_OPTS)
 	$(SUNXI_CEDARX_BUILD_AVHEAP)
+	$(SUNXI_CEDARX_BUILD_DEMO)
 endef
 
 define SUNXI_CEDARX_INSTALL_STAGING_CMDS
@@ -54,6 +71,7 @@ define SUNXI_CEDARX_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \
 		$(TARGET_DIR)/usr/lib/libvecore.so
 	$(call SUNXI_CEDARX_INSTALL_AVHEAP, $(TARGET_DIR))
+	$(SUNXI_CEDARX_INSTALL_DEMO)
 endef
 
 $(eval $(generic-package))
-- 
1.8.1.2

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

* [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6
  2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
                   ` (2 preceding siblings ...)
  2013-08-24 19:41 ` [Buildroot] [PATCH 3/6] sunxi-cedarx: bump to newer version, use armel2 binaries, add demo Spenser Gilliland
@ 2013-08-24 19:41 ` Spenser Gilliland
  2013-08-25  6:45   ` Thomas De Schampheleire
  2013-08-26 17:27   ` Arnout Vandecappelle
  2013-08-24 19:42 ` [Buildroot] [PATCH 5/6] libpng12: new package Spenser Gilliland
  2013-08-24 19:42 ` [Buildroot] [PATCH 6/6] glmark2: " Spenser Gilliland
  5 siblings, 2 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:41 UTC (permalink / raw)
  To: buildroot

move mesa3d out of xorg as it is not really an Xorg component.


Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/Config.in                                  |   1 +
 package/mesa3d/Config.in                           | 172 +++++++++++++++++++++
 package/mesa3d/mesa3d-cross-glsl-compiler.patch    |  41 +++++
 package/mesa3d/mesa3d-gbm-without-dri.patch        |  30 ++++
 package/mesa3d/mesa3d.mk                           | 149 ++++++++++++++++++
 package/opengl/Config.in                           |   3 +
 package/opengl/libegl/libegl.mk                    |   4 +
 package/opengl/libgl/libgl.mk                      |  20 +++
 package/opengl/libgles/libgles.mk                  |   4 +
 package/opengl/libopenvg/libopenvg.mk              |   4 +
 package/x11r7/Config.in                            |   1 -
 package/x11r7/mesa3d/Config.in                     |  15 --
 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch    |  56 -------
 package/x11r7/mesa3d/mesa3d.mk                     |  40 -----
 .../xserver_xorg-server/xserver_xorg-server.mk     |   4 +-
 15 files changed, 430 insertions(+), 114 deletions(-)
 create mode 100644 package/mesa3d/Config.in
 create mode 100644 package/mesa3d/mesa3d-cross-glsl-compiler.patch
 create mode 100644 package/mesa3d/mesa3d-gbm-without-dri.patch
 create mode 100644 package/mesa3d/mesa3d.mk
 create mode 100644 package/opengl/libgl/libgl.mk
 delete mode 100644 package/x11r7/mesa3d/Config.in
 delete mode 100644 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
 delete mode 100644 package/x11r7/mesa3d/mesa3d.mk

diff --git a/package/Config.in b/package/Config.in
index 7069d77..0278885 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -273,6 +273,7 @@ source "package/lvm2/Config.in"
 source "package/mdadm/Config.in"
 source "package/media-ctl/Config.in"
 source "package/memtester/Config.in"
+source "package/mesa3d/Config.in"
 source "package/minicom/Config.in"
 source "package/nanocom/Config.in"
 source "package/neard/Config.in"
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
new file mode 100644
index 0000000..65d269a
--- /dev/null
+++ b/package/mesa3d/Config.in
@@ -0,0 +1,172 @@
+config BR2_PACKAGE_MESA3D
+	bool "Mesa 3D Graphics Library"
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_EXPAT
+	select BR2_PACKAGE_HOST_LIBXML2_PYTHON
+	select BR2_PACKAGE_XPROTO_DRI2_PROTO if BR2_PACKAGE_XSERVER_XORG_SERVER
+	select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_XSERVER_XORG_SERVER
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XSERVER_XORG_SERVER
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XSERVER_XORG_SERVER
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XSERVER_XORG_SERVER
+	select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XSERVER_XORG_SERVER
+	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XSERVER_XORG_SERVER
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_LARGEFILE
+	depends on BR2_PACKAGE_XORG7 # libdrm
+	help
+	  Mesa 3D, an open-source implementation of the OpenGL specification.
+
+	  http://mesa3d.org
+
+if BR2_PACKAGE_MESA3D
+
+menu "libraries"
+
+config BR2_PACKAGE_MESA3D_GBM
+	depends on BR2_PACKAGE_UDEV
+	bool "gbm support"
+	help
+	  Add support for Graphics Buffer Manager.
+
+config BR2_PACKAGE_MESA3D_XVMC
+	bool "xvmc support"
+	help
+	  Add support for X Video Motion Compensation.
+
+config BR2_PACKAGE_MESA3D_VDPAU
+	bool "vdpau support"
+	help
+	  Add support for Video Decode and Presentation API for Unix.
+
+endmenu
+
+menu "Drivers"
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
+	bool "Gallium i915 driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  Supports intel chips with Gallium. In most cases, the DRI i965 driver
+	  should be used as it is better maintined by Intel.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
+	bool "Gallium nouveau driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  Supports all Nvidia GPUs.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300
+	bool "Gallium r300 driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  Supports the R300, R400, and R500 series of ATI/AMD GPUs.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
+	bool "Gallium r600 driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  Supports the R600, R700, and R800 series of ATI/AMD GPUs.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+	bool "Gallium radeonsi driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  Supports the Radeon HD7000/HD8000/HD9000 series of ATI/AMD GPUs.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
+	bool "Gallium vmware svga driver"
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  This is a virtual GPU driver for VMWare virtual machines.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+	bool "Gallium swrast driver"
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	help
+	  This is a software opengl implementation using the Gallium3D
+	  infrastructure.
+
+config BR2_PACKAGE_MESA3D_DRI_DRIVERS_SWRAST
+	bool "DRI swrast driver"
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER
+	help
+	  This is a software opengl implementation using the DRI infrastrucutre.
+
+config BR2_PACKAGE_MESA3D_DRI_DRIVERS_I965
+	bool "DRI i965 driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER
+	help
+	  Supports all Intel GPUs.  This version is most supported by Intel.
+
+config BR2_PACKAGE_MESA3D_DRI_DRIVERS_RADEON
+	bool "DRI radeon driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER
+	help
+	  Legacy Radeon driver for R100 series GPUs.
+
+endmenu
+
+# The following hidden options inform gallium or dri driver selection.
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_MESA3D_DRIVER
+	bool
+
+config BR2_PACKAGE_MESA3D_DRI_DRIVER
+	select BR2_PACKAGE_MESA3D_DRIVER
+	bool
+
+config BR2_PACKAGE_MESA3D_DRIVER
+	bool
+
+menu "API Support"
+depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER || BR2_PACKAGE_MESA3D_DRI_DRIVER
+
+config BR2_PACKAGE_MESA3D_OPENGL
+	bool "OpenGL"
+	select BR2_PACKAGE_HAS_OPENGL
+	help
+	  Use the Khronos OpenGL API.  This is a desktop computer API and is not
+	  normally implemented by embedded systems.
+
+config BR2_PACKAGE_MESA3D_EGL
+	bool "EGL"
+	select BR2_PACKAGE_MESA3D_GBM
+	select BR2_PACKAGE_HAS_OPENGL_EGL
+	help
+	  Use the Khronos EGL APIs. EGL is a window manger for OpenGL applications
+	  similar to GLX, for X, and WGL, for Windows.
+
+ config BR2_PACKAGE_MESA3D_OPENGL_ES
+	bool "OpenGL ES"
+	select BR2_PACKAGE_HAS_OPENGL_ES
+	help
+	  Use the Khronos OpenGL ES APIs.  This is commonly used on embedded
+	  systems and represents a subset of the OpenGL API.
+
+config BR2_PACKAGE_MESA3D_OPENVG
+	bool "OpenVG"
+	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_HAS_OPENVG
+	select BR2_PACKAGE_MESA3D_OPENGL_EGL
+	help
+	  Use the Khronos OpenVG APIs. This is a 2D API commonly used on
+	  embedded systems.
+
+config BR2_PACKAGE_MESA3D_OPENCL
+	bool "OpenCL"
+	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_HAS_OPENCL
+	help
+	  Use the Khronos OpenCL APIs. This is a GPU computation language
+	  commonly used in GPGPU computing applications.
+
+endmenu
+
+endif
diff --git a/package/mesa3d/mesa3d-cross-glsl-compiler.patch b/package/mesa3d/mesa3d-cross-glsl-compiler.patch
new file mode 100644
index 0000000..1028ea1
--- /dev/null
+++ b/package/mesa3d/mesa3d-cross-glsl-compiler.patch
@@ -0,0 +1,41 @@
+This patch fixes a cross compile issue as described here
+https://bugs.freedesktop.org/show_bug.cgi?id=44618
+
+Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
+---
+diff --git a/src/glsl/builtin_compiler/Makefile.am b/src/glsl/builtin_compiler/Makefile.am
+index e11a17f..8ebe0a2 100644
+--- a/src/glsl/builtin_compiler/Makefile.am
++++ b/src/glsl/builtin_compiler/Makefile.am
+@@ -64,6 +64,8 @@ AM_CXXFLAGS = $(AM_CFLAGS)
+ include ../Makefile.sources
+ 
+ noinst_PROGRAMS = builtin_compiler
++
++if !CROSS_COMPILING
+ noinst_LTLIBRARIES = libglslcore.la libglcpp.la
+ 
+ libglcpp_la_SOURCES =					\
+@@ -73,6 +75,7 @@ libglcpp_la_SOURCES =					\
+ libglslcore_la_SOURCES =				\
+ 	$(BUILTIN_COMPILER_GENERATED_CXX_FILES)		\
+ 	$(LIBGLSL_FILES)
++endif
+ 
+ builtin_compiler_SOURCES = \
+ 	$(top_srcdir)/src/mesa/main/hash_table.c	\
+@@ -81,4 +84,14 @@ builtin_compiler_SOURCES = \
+ 	$(top_srcdir)/src/mesa/program/symbol_table.c	\
+ 	$(BUILTIN_COMPILER_CXX_FILES)			\
+ 	$(GLSL_COMPILER_CXX_FILES)
++
++if CROSS_COMPILING
++builtin_compiler_SOURCES += \
++	$(LIBGLCPP_GENERATED_FILES) \
++	$(LIBGLCPP_FILES) \
++	$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
++	$(LIBGLSL_FILES)
++builtin_compiler_CPPFLAGS = $(AM_CPPFLAGS)
++else
+ builtin_compiler_LDADD = libglslcore.la libglcpp.la
++endif
diff --git a/package/mesa3d/mesa3d-gbm-without-dri.patch b/package/mesa3d/mesa3d-gbm-without-dri.patch
new file mode 100644
index 0000000..2c417f4
--- /dev/null
+++ b/package/mesa3d/mesa3d-gbm-without-dri.patch
@@ -0,0 +1,30 @@
+Fix build issue when gbm backend is built without dri support.
+
+Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
+
+---
+Index: mesa3d-9.1.6/src/gbm/main/backend.c
+===================================================================
+--- mesa3d-9.1.6.orig/src/gbm/main/backend.c	2012-11-24 11:57:41.000000000 -0600
++++ mesa3d-9.1.6/src/gbm/main/backend.c	2013-08-16 10:59:58.844753588 -0500
+@@ -36,7 +36,9 @@
+ 
+ #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
+ 
++#ifdef HAVE_DRI
+ extern const struct gbm_backend gbm_dri_backend;
++#endif
+ 
+ struct backend_desc {
+    const char *name;
+@@ -44,7 +46,9 @@
+ };
+ 
+ static const struct backend_desc backends[] = {
+-   { "gbm_dri.so", &gbm_dri_backend },
++#ifdef HAVE_DRI
++	{ "gbm_dri.so", &gbm_dri_backend },
++#endif
+    { "gbm_gallium_drm.so", NULL },
+ };
+ 
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
new file mode 100644
index 0000000..31ebe96
--- /dev/null
+++ b/package/mesa3d/mesa3d.mk
@@ -0,0 +1,149 @@
+################################################################################
+#
+# mesa3d
+#
+################################################################################
+
+MESA3D_VERSION = 9.1.6
+MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
+MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
+MESA3D_LICENSE = MIT, SGI, Khronos
+MESA3D_LICENSE_FILES = docs/license.html
+
+MESA3D_AUTORECONF = YES
+MESA3D_INSTALL_STAGING = YES
+
+MESA3D_DEPENDENCIES = \
+	libdrm \
+	expat \
+	host-xutil_makedepend \
+	host-libxml2 \
+	host-python \
+	host-bison \
+	host-flex
+
+MESA3D_CONF_OPT = \
+	--disable-static
+
+# Used by subst in some options
+null :=
+space := $(null) #
+comma := ,
+
+# Libraries
+
+ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
+MESA3D_DEPENDENCIES += udev
+MESA3D_CONF_OPT += --enable-gbm
+else
+MESA3D_CONF_OPT += --disable-gbm
+endif
+
+ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y)
+MESA3D_DEPENDENCIES += \
+	xproto_xf86driproto xproto_dri2proto xproto_glproto \
+	xlib_libX11 xlib_libXext xlib_libXdamage xlib_libXfixes libxcb
+MESA3D_CONF_OPT += \
+	--enable-dri \
+	--enable-xa \
+	--enable-glx
+else
+MESA3D_CONF_OPT += \
+	--disable-dri \
+	--disable-xa \
+	--disable-glx
+endif
+
+# Drivers
+
+# Gallium Drivers
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915),y)
+MESA3D_GALLIUM_DRIVERS += i915
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU),y)
+MESA3D_GALLIUM_DRIVERS += nouveau
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300),y)
+MESA3D_GALLIUM_DRIVERS += r300
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600),y)
+MESA3D_GALLIUM_DRIVERS += r600
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI),y)
+MESA3D_GALLIUM_DRIVERS += radeonsi
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA),y)
+MESA3D_GALLIUM_DRIVERS += svga
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST),y)
+MESA3D_GALLIUM_DRIVERS += swrast
+endif
+
+# DRI Drivers
+ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST),y)
+MESA3D_DRI_DRIVERS += swrast
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965),y)
+MESA3D_DRI_DRIVERS += i965
+endif
+ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON),y)
+MESA3D_DRI_DRIVERS += radeon
+endif
+
+ifneq ($(MESA3D_GALLIUM_DRIVERS),)
+MESA3D_CONF_OPT += \
+	--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS))
+else
+MESA3D_CONF_OPT += --without-gallium-drivers
+endif
+
+ifneq ($(MESA3D_DRI_DRIVERS),)
+MESA3D_CONF_OPT += \
+	--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS))
+else
+MESA3D_CONF_OPT += --without-dri-drivers
+endif
+
+# APIs
+
+ifeq ($(BR2_PACKAGE_MESA3D_EGL),y)
+MESA3D_EGL_PLATFORMS = drm
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+MESA3D_DEPENDENCIES += wayland
+MESA3D_EGL_PLATFORMS += wayland
+endif
+ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y)
+MESA3D_EGL_PLATFORMS += x11
+endif
+MESA3D_CONF_OPT += \
+	--enable-egl \
+	--with-egl-platforms=$(foreach subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
+else
+MESA3D_CONF_OPT += --disable-egl
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL),y)
+MESA3D_CONF_OPT += --enable-opengl
+else
+MESA3D_CONF_OPT += --disable-opengl
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
+MESA3D_CONF_OPT += --enable-gles1 --enable-gles2
+else
+MESA3D_CONF_OPT += --disable-gles1 --disable-gles2
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_OPENVG),y)
+MESA3D_CONF_OPT += --enable-openvg --enable-gallium-egl
+else
+MESA3D_CONF_OPT += --disable-openvg --disable-gallium-egl
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
+MESA3D_CONF_OPT += --enable-opencl
+else
+MESA3D_CONF_OPT += --disable-opencl
+endif
+
+$(eval $(autotools-package))
diff --git a/package/opengl/Config.in b/package/opengl/Config.in
index 1636807..c705446 100644
--- a/package/opengl/Config.in
+++ b/package/opengl/Config.in
@@ -1,3 +1,6 @@
+config BR2_PACKAGE_HAS_OPENGL
+	bool
+
 config BR2_PACKAGE_HAS_OPENGL_EGL
 	bool
 
diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/libegl.mk
index c194b02..2d52fe3 100644
--- a/package/opengl/libegl/libegl.mk
+++ b/package/opengl/libegl/libegl.mk
@@ -22,6 +22,10 @@ ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y)
 LIBEGL_DEPENDENCIES += gpu-viv-bin-mx6q
 endif
 
+ifeq ($(BR2_PACKAGE_MESA3D_EGL),y)
+LIBEGL_DEPENDENCIES += mesa3d
+endif
+
 ifeq ($(LIBEGL_DEPENDENCIES),)
 define LIBEGL_CONFIGURE_CMDS
 	echo "No libEGL implementation selected. Configuration error."
diff --git a/package/opengl/libgl/libgl.mk b/package/opengl/libgl/libgl.mk
new file mode 100644
index 0000000..4b0d7f2
--- /dev/null
+++ b/package/opengl/libgl/libgl.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# libgl
+#
+################################################################################
+
+LIBGL_SOURCE =
+
+ifeq ($(BR2_PACKAGE_MESA_OPENGL),y)
+LIBGL_DEPENDENCIES += mesa3d
+endif
+
+ifeq ($(LIBGL_DEPENDENCIES),)
+define LIBOPENGL_CONFIGURE_CMDS
+	echo "No libOpenGL implementation selected. Configuration error."
+	exit 1
+endef
+endif
+
+$(eval $(generic-package))
diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk
index ec157ac..8e5cef1 100644
--- a/package/opengl/libgles/libgles.mk
+++ b/package/opengl/libgles/libgles.mk
@@ -22,6 +22,10 @@ ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y)
 LIBGLES_DEPENDENCIES += gpu-viv-bin-mx6q
 endif
 
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
+LIBGLES_DEPENDENCIES += mesa3d
+endif
+
 ifeq ($(LIBGLES_DEPENDENCIES),)
 define LIBGLES_CONFIGURE_CMDS
 	echo "No libGLES implementation selected. Configuration error."
diff --git a/package/opengl/libopenvg/libopenvg.mk b/package/opengl/libopenvg/libopenvg.mk
index 3296f63..e897423 100644
--- a/package/opengl/libopenvg/libopenvg.mk
+++ b/package/opengl/libopenvg/libopenvg.mk
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
 LIBOPENVG_DEPENDENCIES += rpi-userland
 endif
 
+ifeq ($(BR2_PACKAGE_MESA3D_OPENVG),y)
+LIBOPENVG_DEPENDENCIES += mesa3d
+endif
+
 ifeq ($(LIBOPENVG_DEPENDENCIES),)
 define LIBOPENVG_CONFIGURE_CMDS
 	echo "No libOpenVG implementation selected. Configuration error."
diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
index 205079c..d5d6e60 100644
--- a/package/x11r7/Config.in
+++ b/package/x11r7/Config.in
@@ -13,7 +13,6 @@ if BR2_PACKAGE_XORG7
 	endmenu
 	menu "X11R7 Libraries"
 		source package/x11r7/libxcb/Config.in
-		source package/x11r7/mesa3d/Config.in
 		source package/x11r7/xcb-util/Config.in
 		source package/x11r7/xcb-util-image/Config.in
 		source package/x11r7/xcb-util-keysyms/Config.in
diff --git a/package/x11r7/mesa3d/Config.in b/package/x11r7/mesa3d/Config.in
deleted file mode 100644
index 080f56a..0000000
--- a/package/x11r7/mesa3d/Config.in
+++ /dev/null
@@ -1,15 +0,0 @@
-config BR2_PACKAGE_MESA3D
-	bool "Mesa 3D Graphics Library"
-	select BR2_PACKAGE_XPROTO_GLPROTO
-	select BR2_PACKAGE_XLIB_LIBXXF86VM
-	select BR2_PACKAGE_XLIB_LIBXDAMAGE
-	select BR2_PACKAGE_XLIB_LIBXFIXES
-	select BR2_PACKAGE_XPROTO_DRI2PROTO
-	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_EXPAT
-	select BR2_PACKAGE_HOST_LIBXML2_PYTHON
-	depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR
-	depends on BR2_INSTALL_LIBSTDCPP
-	help
-	  Mesa 3D, an open-source implementation of the OpenGL specification.
-
diff --git a/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch b/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
deleted file mode 100644
index 99afe8d..0000000
--- a/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] Fix compilation on uClibc without locale support
-
-Based on similar patch from OE:
-
-http://git.openembedded.org/openembedded-core/commit/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch?id=e4039eb74b20e96d4b8837cd58cf2d13d091e1ad
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- configure.ac            |    3 +++
- src/glsl/strtod.c       |    2 +-
- src/mesa/main/imports.c |    2 +-
- 3 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fbaa376..454dad2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -450,6 +450,9 @@ AC_SUBST([DLOPEN_LIBS])
- dnl See if posix_memalign is available
- AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
- 
-+dnl See if newlocale is available
-+AC_CHECK_FUNCS_ONCE(newlocale)
-+
- dnl SELinux awareness.
- AC_ARG_ENABLE([selinux],
-     [AS_HELP_STRING([--enable-selinux],
-diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
-index a876e13..9fce7e9 100644
---- a/src/glsl/strtod.c
-+++ b/src/glsl/strtod.c
-@@ -44,7 +44,7 @@ double
- double
- glsl_strtod(const char *s, char **end)
- {
--#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
-+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE)
-    static locale_t loc = NULL;
-    if (!loc) {
-       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
-index d3727ef..363bf32 100644
---- a/src/mesa/main/imports.c
-+++ b/src/mesa/main/imports.c
-@@ -757,7 +757,7 @@ float
- float
- _mesa_strtof( const char *s, char **end )
- {
--#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
-+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE)
-    static locale_t loc = NULL;
-    if (!loc) {
-       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
--- 
-1.7.10.4
-
diff --git a/package/x11r7/mesa3d/mesa3d.mk b/package/x11r7/mesa3d/mesa3d.mk
deleted file mode 100644
index f9d35a9..0000000
--- a/package/x11r7/mesa3d/mesa3d.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-################################################################################
-#
-# mesa3d
-#
-################################################################################
-
-MESA3D_VERSION = 7.10.3
-MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
-MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
-MESA3D_LICENSE = MIT, SGI, Khronos
-MESA3D_LICENSE_FILES = docs/license.html
-
-MESA3D_AUTORECONF = YES
-MESA3D_INSTALL_STAGING = YES
-
-MESA3D_CONF_OPT = \
-	--disable-egl \
-	--disable-glu \
-	--disable-glw \
-	--disable-glut \
-	--disable-gallium \
-	--with-driver=dri \
-	--with-dri-drivers=swrast \
-	--disable-static
-
-MESA3D_DEPENDENCIES = \
-	xproto_glproto \
-	xlib_libXxf86vm \
-	xlib_libXdamage \
-	xlib_libXfixes \
-	xproto_dri2proto \
-	libdrm \
-	expat \
-	host-xutil_makedepend \
-	host-libxml2 \
-	host-python \
-	host-bison \
-	host-flex
-
-$(eval $(autotools-package))
diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 4089aab..f5a4db6 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -99,7 +99,7 @@ else # modular
 XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive --disable-xfbdev
 endif
 
-ifeq ($(BR2_PACKAGE_MESA3D),y)
+ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += mesa3d xproto_xf86driproto
 else
 XSERVER_XORG_SERVER_CONF_OPT += --disable-dri
@@ -172,7 +172,7 @@ ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y)
 XSERVER_XORG_SERVER_CONF_OPT += --disable-dmx
 endif
 
-ifeq ($(BR2_PACKAGE_MESA3D),y)
+ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y)
 XSERVER_XORG_SERVER_CONF_OPT += --enable-glx
 else
 XSERVER_XORG_SERVER_CONF_OPT += --disable-glx
-- 
1.8.1.2

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

* [Buildroot] [PATCH 5/6] libpng12: new package
  2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
                   ` (3 preceding siblings ...)
  2013-08-24 19:41 ` [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6 Spenser Gilliland
@ 2013-08-24 19:42 ` Spenser Gilliland
  2013-08-26 17:21   ` Arnout Vandecappelle
  2013-08-24 19:42 ` [Buildroot] [PATCH 6/6] glmark2: " Spenser Gilliland
  5 siblings, 1 reply; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:42 UTC (permalink / raw)
  To: buildroot

libpng1X all have different incompatible apis therefore it is neccessary to
have a seperate package for each branch.

Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/Config.in            |  1 +
 package/libpng12/Config.in   |  8 ++++++++
 package/libpng12/libpng12.mk | 18 ++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/libpng12/Config.in
 create mode 100644 package/libpng12/libpng12.mk

diff --git a/package/Config.in b/package/Config.in
index 0278885..2b8bef0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -472,6 +472,7 @@ source "package/libglade/Config.in"
 source "package/gdk-pixbuf/Config.in"
 source "package/libgtk2/Config.in"
 source "package/libpng/Config.in"
+source "package/libpng12/Config.in"
 source "package/libqrencode/Config.in"
 source "package/libraw/Config.in"
 source "package/librsvg/Config.in"
diff --git a/package/libpng12/Config.in b/package/libpng12/Config.in
new file mode 100644
index 0000000..ff9e9b1
--- /dev/null
+++ b/package/libpng12/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBPNG12
+	bool "libpng"
+	select BR2_PACKAGE_ZLIB
+	help
+	  Library for handling PNG (Portable Network Graphics)
+	  images.
+
+	  http://www.libpng.org/
diff --git a/package/libpng12/libpng12.mk b/package/libpng12/libpng12.mk
new file mode 100644
index 0000000..de4a45c
--- /dev/null
+++ b/package/libpng12/libpng12.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# libpng12
+#
+################################################################################
+
+LIBPNG12_VERSION = 1.2.50
+LIBPNG12_SERIES = 12
+LIBPNG12_SOURCE = libpng-$(LIBPNG12_VERSION).tar.bz2
+LIBPNG12_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG12_SERIES}/$(LIBPNG12_VERSION)
+LIBPNG12_LICENSE = libpng license
+LIBPNG12_LICENSE_FILES = LICENSE
+LIBPNG12_INSTALL_STAGING = YES
+LIBPNG12_DEPENDENCIES = host-pkgconf zlib
+LIBPNG12_CONFIG_SCRIPTS = libpng$(LIBPNG12_SERIES)-config libpng-config
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
1.8.1.2

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
                   ` (4 preceding siblings ...)
  2013-08-24 19:42 ` [Buildroot] [PATCH 5/6] libpng12: new package Spenser Gilliland
@ 2013-08-24 19:42 ` Spenser Gilliland
  2013-08-26 17:43   ` Arnout Vandecappelle
  2013-08-27 20:48   ` Thomas Petazzoni
  5 siblings, 2 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-24 19:42 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/Config.in                                  |   1 +
 package/glmark2/Config.in                          |  49 ++++++++++
 package/glmark2/glmark2-add-mali-support.patch     | 102 +++++++++++++++++++++
 package/glmark2/glmark2-fix-add-GLchar.patch       |  17 ++++
 .../glmark2-gl-to-glesv2-on-drm-flavor.patch       |  25 +++++
 package/glmark2/glmark2.mk                         |  70 ++++++++++++++
 6 files changed, 264 insertions(+)
 create mode 100644 package/glmark2/Config.in
 create mode 100644 package/glmark2/glmark2-add-mali-support.patch
 create mode 100644 package/glmark2/glmark2-fix-add-GLchar.patch
 create mode 100644 package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
 create mode 100644 package/glmark2/glmark2.mk

diff --git a/package/Config.in b/package/Config.in
index 2b8bef0..ebe8cb4 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -24,6 +24,7 @@ source "package/dstat/Config.in"
 source "package/dmalloc/Config.in"
 source "package/dropwatch/Config.in"
 source "package/gdb/Config.in"
+source "package/glmark2/Config.in"
 source "package/iozone/Config.in"
 source "package/kexec/Config.in"
 source "package/latencytop/Config.in"
diff --git a/package/glmark2/Config.in b/package/glmark2/Config.in
new file mode 100644
index 0000000..47ed221
--- /dev/null
+++ b/package/glmark2/Config.in
@@ -0,0 +1,49 @@
+config BR2_PACKAGE_GLMARK2
+	bool "glmark2"
+	depends on BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_MESA3D_GBM
+	depends on BR2_LARGEFILE
+	depends on BR2_PACKAGE_HAS_OPENGL || \
+		(BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES)
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBPNG12
+	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64 # libdrm
+	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS # libdrm
+	help
+	  glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the subset of the
+	  OpenGL 2.0 API that is compatible with OpenGL ES 2.0.
+
+if BR2_PACKAGE_GLMARK2
+
+config BR2_PACKAGE_GLMARK2_X11
+	bool "X11"
+	depends on BR2_PACKAGE_XSERVER_XORG_SERVER
+	help
+	 Use X11 window for display.
+
+config BR2_PACKAGE_GLMARK2_EGL
+	bool "EGL"
+	default y
+	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	help
+	  Use EGL window for display.
+
+config BR2_PACKAGE_GLMARK2_OPENGL
+	bool "Install Desktop OpenGL 2.0 Version"
+	default y
+	depends on BR2_PACKAGE_HAS_OPENGL
+	help
+	  Enable desktop OpenGL version.
+
+config BR2_PACKAGE_GLMARK2_OPENGL_ES
+	bool "Install OpenGL ES 2.0 Version"
+	default y
+	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	help
+	  Enable OpenGL ES 2.0 Version.
+
+endif
+
+comment "glmark2 requires an OpenGL implementation and many X libraries"
+	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES \
+		|| !BR2_PACKAGE_XORG7
diff --git a/package/glmark2/glmark2-add-mali-support.patch b/package/glmark2/glmark2-add-mali-support.patch
new file mode 100644
index 0000000..c37c88c
--- /dev/null
+++ b/package/glmark2/glmark2-add-mali-support.patch
@@ -0,0 +1,102 @@
+Mali uses a slightly different windowing structure than most
+implementations add support through this patch.
+
+Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
+---
+Index: glmark2-279/src/gl-state-egl.cpp
+===================================================================
+--- glmark2-279.orig/src/gl-state-egl.cpp	2013-08-21 14:49:38.953803965 -0500
++++ glmark2-279/src/gl-state-egl.cpp	2013-08-21 14:59:42.389814979 -0500
+@@ -414,9 +414,12 @@
+ {
+     if (egl_display_)
+         return true;
+-
++#ifdef HAS_MALI
++    egl_display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
++#else
+     egl_display_ = eglGetDisplay(native_display_);
+-    if (!egl_display_) {
++#endif
++    if (egl_display_ == EGL_NO_DISPLAY) {
+         Log::error("eglGetDisplay() failed with error: 0x%x\n", eglGetError());
+         return false;
+     }
+Index: glmark2-279/src/native-state-fbdev.cpp
+===================================================================
+--- glmark2-279.orig/src/native-state-fbdev.cpp	2013-08-19 17:36:32.000000000 -0500
++++ glmark2-279/src/native-state-fbdev.cpp	2013-08-21 14:59:58.629815276 -0500
+@@ -31,7 +31,9 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <linux/fb.h>
+-
++#if HAS_MALI
++#include <EGL/egl.h>
++#endif
+ #ifdef ANDROID
+ #define FBDEV_DEV "/dev/graphics/fb"
+ #else
+@@ -79,7 +81,13 @@
+ NativeStateFBDEV::window(WindowProperties& properties)
+ {
+     properties = winprops;
++#ifdef HAS_MALI
++    native_window.height = winprops.height;
++    native_window.width = winprops.width;
++    return reinterpret_cast<void*>(&native_window);
++#else
+     return NULL;
++#endif
+ }
+ 
+ void
+Index: glmark2-279/src/native-state-fbdev.h
+===================================================================
+--- glmark2-279.orig/src/native-state-fbdev.h	2013-08-19 17:36:32.000000000 -0500
++++ glmark2-279/src/native-state-fbdev.h	2013-08-21 15:00:14.345815563 -0500
+@@ -30,6 +30,10 @@
+ #include <csignal>
+ #include <cstring>
+ 
++#ifdef HAS_MALI
++#include <EGL/egl.h>
++#endif
++
+ class NativeStateFBDEV : public NativeState
+ {
+ public:
+@@ -50,7 +54,9 @@
+     static volatile std::sig_atomic_t should_quit_;
+     int fd;
+     WindowProperties winprops;
+-
++#ifdef HAS_MALI
++    struct mali_native_window native_window;
++#endif
+     bool init();
+     void cleanup();
+ };
+Index: glmark2-279/wscript
+===================================================================
+--- glmark2-279.orig/wscript	2013-08-19 17:36:32.000000000 -0500
++++ glmark2-279/wscript	2013-08-21 15:00:24.245815743 -0500
+@@ -46,7 +46,8 @@
+                    dest = 'flavors',
+                    help = "a list of flavors to build (%s, all)" % FLAVORS_STR)
+     opt.parser.set_default('flavors', [])
+-
++    opt.add_option('--for-mali', action='store_true', dest = 'mali',
++                   default = False, help='enable ARM Mali GPU support')
+     opt.add_option('--no-debug', action='store_false', dest = 'debug',
+                    default = True, help='disable compiler debug information')
+     opt.add_option('--no-opt', action='store_false', dest = 'opt',
+@@ -132,6 +133,8 @@
+         ctx.env.prepend_value('CXXFLAGS', '-O2')
+     if Options.options.debug:
+         ctx.env.prepend_value('CXXFLAGS', '-g')
++    if Options.options.mali:
++        ctx.env.append_unique('DEFINES','HAS_MALI=1')
+ 
+     ctx.env.HAVE_EXTRAS = False
+     if Options.options.extras_path is not None:
diff --git a/package/glmark2/glmark2-fix-add-GLchar.patch b/package/glmark2/glmark2-fix-add-GLchar.patch
new file mode 100644
index 0000000..15653de
--- /dev/null
+++ b/package/glmark2/glmark2-fix-add-GLchar.patch
@@ -0,0 +1,17 @@
+Bug fix in program.cc.  There is no such type as GLchar.
+
+Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
+---
+Index: glmark2-2012.12/src/libmatrix/program.cc
+===================================================================
+--- glmark2-2012.12.orig/src/libmatrix/program.cc	2012-12-18 13:45:45.000000000 -0600
++++ glmark2-2012.12/src/libmatrix/program.cc	2013-08-13 20:08:27.005724911 -0500
+@@ -17,6 +17,8 @@
+ #include "gl-if.h"
+ #include "program.h"
+ 
++typedef char GLchar;
++
+ using std::string;
+ using LibMatrix::mat4;
+ using LibMatrix::mat3;
diff --git a/package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch b/package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
new file mode 100644
index 0000000..5f838cc
--- /dev/null
+++ b/package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
@@ -0,0 +1,25 @@
+Bug in build script requires full opengl when only opengl es is actually
+required.
+
+Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
+---
+Index: glmark2-279/src/wscript_build
+===================================================================
+--- glmark2-279.orig/src/wscript_build	2013-08-19 17:36:32.000000000 -0500
++++ glmark2-279/src/wscript_build	2013-08-20 10:31:39.364629078 -0500
+@@ -23,11 +23,12 @@
+   'x11-gl' : ['x11', 'gl', 'matrix-gl'],
+   'x11-glesv2' : ['x11', 'egl', 'glesv2', 'matrix-glesv2'],
+   'drm-gl' : ['drm', 'gbm', 'egl', 'gl', 'matrix-gl'],
+-  'drm-glesv2' : ['drm', 'gbm', 'egl', 'glesv2', 'matrix-gl'],
++  'drm-glesv2' : ['drm', 'gbm', 'egl', 'glesv2', 'matrix-glesv2'],
+   'mir-gl' : ['mirclient', 'egl', 'gl', 'matrix-gl'],
+-  'mir-glesv2' : ['mirclient', 'egl', 'glesv2', 'matrix-gl'],
++  'mir-glesv2' : ['mirclient', 'egl', 'glesv2', 'matrix-glesv2'],
+   'wayland-gl' : ['wayland-client', 'wayland-egl', 'egl', 'gl', 'matrix-gl'],
+-  'wayland-glesv2' : ['wayland-client', 'wayland-egl', 'egl', 'glesv2', 'matrix-gl'],
++  'wayland-glesv2' : ['wayland-client', 'wayland-egl', 'egl', 'glesv2',
++  'matrix-glesv2'],
+   'fbdev-glesv2' : ['egl', 'glesv2', 'matrix-glesv2']
+ }
+ flavor_defines = {
diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
new file mode 100644
index 0000000..47b464b
--- /dev/null
+++ b/package/glmark2/glmark2.mk
@@ -0,0 +1,70 @@
+################################################################################
+#
+# glmark2
+#
+################################################################################
+
+GLMARK2_VERSION = 279
+GLMARK2_SITE = http://bazaar.launchpad.net/~laanwj/glmark2/fbdev
+GLMARK2_SITE_METHOD = bzr
+GLMARK2_SOURCE = glmark2-$(GLMARK2_VERSION).tar.gz
+GLMARK2_LICENSE = GPLv3+ SGIv1
+GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
+
+GLMARK2_DEPENDENCIES = jpeg libpng12 mesa3d host-python host-pkgconf
+
+GLMARK2_CONF_OPTS = --prefix=/usr/
+
+ifeq ($(BR2_PACKAGE_GLMARK2_X11)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
+GLMARK2_DEPENDENCIES += libegl libgles
+GLMARK2_FLAVORS += x11-glesv2
+endif
+
+ifeq ($(BR2_PACKAGE_GLMARK2_X11)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
+GLMARK2_DEPENDENCIES += libgl
+GLMARK2_FLAVORS += x11-gl
+endif
+
+ifeq ($(BR2_PACKAGE_GLMARK2_EGL)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
+GLMARK2_DEPENDENCIES += libdrm libegl libgles
+GLMARK2_FLAVORS += drm-glesv2 fbdev-glesv2
+endif
+
+ifeq ($(BR2_PACKAGE_GLMARK2_EGL)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
+GLMARK2_DEPENDENCIES += libdrm libgl
+GLMARK2_FLAVORS += drm-gl
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
+GLMARK2_DEPENDENCIES += wayland libegl libgles
+GLMARK2_FLAVORS += wayland-glesv2
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
+GLMARK2_DEPENDENCIES += wayland libgl
+GLMARK2_FLAVORS += wayland-gl
+endif
+
+ifeq ($(BR2_PACKAGE_SUNXI_MALI),y)
+GLMARK2_CONF_OPTS += --for-mali
+endif
+
+null :=
+space := $(null) #
+comma := ,
+
+GLMARK2_CONF_OPTS += --with-flavors=$(subst $(space),$(comma),$(GLMARK2_FLAVORS))
+
+define GLMARK2_CONFIGURE_CMDS
+cd $(@D) && $(TARGET_MAKE_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.8.1.2

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

* [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6
  2013-08-24 19:41 ` [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6 Spenser Gilliland
@ 2013-08-25  6:45   ` Thomas De Schampheleire
  2013-08-26 17:27   ` Arnout Vandecappelle
  1 sibling, 0 replies; 24+ messages in thread
From: Thomas De Schampheleire @ 2013-08-25  6:45 UTC (permalink / raw)
  To: buildroot

Op 24-aug.-2013 21:48 schreef "Spenser Gilliland" <spenser@gillilanding.com>
het volgende:
>
> move mesa3d out of xorg as it is not really an Xorg component.
>
>
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>  package/Config.in                                  |   1 +
>  package/mesa3d/Config.in                           | 172
+++++++++++++++++++++
>  package/mesa3d/mesa3d-cross-glsl-compiler.patch    |  41 +++++
>  package/mesa3d/mesa3d-gbm-without-dri.patch        |  30 ++++
>  package/mesa3d/mesa3d.mk                           | 149
++++++++++++++++++
>  package/opengl/Config.in                           |   3 +
>  package/opengl/libegl/libegl.mk                    |   4 +
>  package/opengl/libgl/libgl.mk                      |  20 +++
>  package/opengl/libgles/libgles.mk                  |   4 +
>  package/opengl/libopenvg/libopenvg.mk              |   4 +
>  package/x11r7/Config.in                            |   1 -
>  package/x11r7/mesa3d/Config.in                     |  15 --
>  package/x11r7/mesa3d/mesa3d-uclibc-locale.patch    |  56 -------
>  package/x11r7/mesa3d/mesa3d.mk                     |  40 -----
>  .../xserver_xorg-server/xserver_xorg-server.mk     |   4 +-
>  15 files changed, 430 insertions(+), 114 deletions(-)
>  create mode 100644 package/mesa3d/Config.in
>  create mode 100644 package/mesa3d/mesa3d-cross-glsl-compiler.patch
>  create mode 100644 package/mesa3d/mesa3d-gbm-without-dri.patch
>  create mode 100644 package/mesa3d/mesa3d.mk
>  create mode 100644 package/opengl/libgl/libgl.mk
>  delete mode 100644 package/x11r7/mesa3d/Config.in
>  delete mode 100644 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
>  delete mode 100644 package/x11r7/mesa3d/mesa3d.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 7069d77..0278885 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -273,6 +273,7 @@ source "package/lvm2/Config.in"
>  source "package/mdadm/Config.in"
>  source "package/media-ctl/Config.in"
>  source "package/memtester/Config.in"
> +source "package/mesa3d/Config.in"
>  source "package/minicom/Config.in"
>  source "package/nanocom/Config.in"
>  source "package/neard/Config.in"
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> new file mode 100644
> index 0000000..65d269a
> --- /dev/null
> +++ b/package/mesa3d/Config.in
> @@ -0,0 +1,172 @@
> +config BR2_PACKAGE_MESA3D
> +       bool "Mesa 3D Graphics Library"
> +       select BR2_PACKAGE_LIBDRM
> +       select BR2_PACKAGE_EXPAT
> +       select BR2_PACKAGE_HOST_LIBXML2_PYTHON
> +       select BR2_PACKAGE_XPROTO_DRI2_PROTO if
BR2_PACKAGE_XSERVER_XORG_SERVER
> +       select BR2_PACKAGE_XPROTO_XF86DRIPROTO if
BR2_PACKAGE_XSERVER_XORG_SERVER
> +       select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XSERVER_XORG_SERVER
> +       select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XSERVER_XORG_SERVER
> +       select BR2_PACKAGE_XLIB_LIBXDAMAGE if
BR2_PACKAGE_XSERVER_XORG_SERVER
> +       select BR2_PACKAGE_XLIB_LIBXFIXES if
BR2_PACKAGE_XSERVER_XORG_SERVER
> +       select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XSERVER_XORG_SERVER
> +       depends on BR2_INSTALL_LIBSTDCPP
> +       depends on BR2_LARGEFILE
> +       depends on BR2_PACKAGE_XORG7 # libdrm
> +       help
> +         Mesa 3D, an open-source implementation of the OpenGL
specification.
> +
> +         http://mesa3d.org
> +
> +if BR2_PACKAGE_MESA3D
> +
> +menu "libraries"
> +
> +config BR2_PACKAGE_MESA3D_GBM
> +       depends on BR2_PACKAGE_UDEV
> +       bool "gbm support"
> +       help
> +         Add support for Graphics Buffer Manager.
> +
> +config BR2_PACKAGE_MESA3D_XVMC
> +       bool "xvmc support"
> +       help
> +         Add support for X Video Motion Compensation.
> +
> +config BR2_PACKAGE_MESA3D_VDPAU
> +       bool "vdpau support"
> +       help
> +         Add support for Video Decode and Presentation API for Unix.
> +
> +endmenu
> +
> +menu "Drivers"
> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
> +       bool "Gallium i915 driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         Supports intel chips with Gallium. In most cases, the DRI i965
driver
> +         should be used as it is better maintined by Intel.

Maintained

> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
> +       bool "Gallium nouveau driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         Supports all Nvidia GPUs.
> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300
> +       bool "Gallium r300 driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         Supports the R300, R400, and R500 series of ATI/AMD GPUs.
> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
> +       bool "Gallium r600 driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         Supports the R600, R700, and R800 series of ATI/AMD GPUs.
> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
> +       bool "Gallium radeonsi driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         Supports the Radeon HD7000/HD8000/HD9000 series of ATI/AMD GPUs.
> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
> +       bool "Gallium vmware svga driver"
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         This is a virtual GPU driver for VMWare virtual machines.
> +
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
> +       bool "Gallium swrast driver"
> +       select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       help
> +         This is a software opengl implementation using the Gallium3D
> +         infrastructure.
> +
> +config BR2_PACKAGE_MESA3D_DRI_DRIVERS_SWRAST
> +       bool "DRI swrast driver"
> +       select BR2_PACKAGE_MESA3D_DRI_DRIVER
> +       help
> +         This is a software opengl implementation using the DRI
infrastrucutre.

Infrastructure

> +
> +config BR2_PACKAGE_MESA3D_DRI_DRIVERS_I965
> +       bool "DRI i965 driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_DRI_DRIVER
> +       help
> +         Supports all Intel GPUs.  This version is most supported by
Intel.
> +
> +config BR2_PACKAGE_MESA3D_DRI_DRIVERS_RADEON
> +       bool "DRI radeon driver"
> +       depends on BR2_i386 || BR2_x86_64
> +       select BR2_PACKAGE_MESA3D_DRI_DRIVER
> +       help
> +         Legacy Radeon driver for R100 series GPUs.
> +
> +endmenu
> +
> +# The following hidden options inform gallium or dri driver selection.
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       select BR2_PACKAGE_MESA3D_DRIVER
> +       bool
> +
> +config BR2_PACKAGE_MESA3D_DRI_DRIVER
> +       select BR2_PACKAGE_MESA3D_DRIVER
> +       bool
> +
> +config BR2_PACKAGE_MESA3D_DRIVER
> +       bool
> +
> +menu "API Support"
> +depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER ||
BR2_PACKAGE_MESA3D_DRI_DRIVER
> +
> +config BR2_PACKAGE_MESA3D_OPENGL
> +       bool "OpenGL"
> +       select BR2_PACKAGE_HAS_OPENGL
> +       help
> +         Use the Khronos OpenGL API.  This is a desktop computer API and
is not
> +         normally implemented by embedded systems.
> +
> +config BR2_PACKAGE_MESA3D_EGL
> +       bool "EGL"
> +       select BR2_PACKAGE_MESA3D_GBM
> +       select BR2_PACKAGE_HAS_OPENGL_EGL
> +       help
> +         Use the Khronos EGL APIs. EGL is a window manger for OpenGL
applications
> +         similar to GLX, for X, and WGL, for Windows.

Manager

> +
> + config BR2_PACKAGE_MESA3D_OPENGL_ES
> +       bool "OpenGL ES"
> +       select BR2_PACKAGE_HAS_OPENGL_ES
> +       help
> +         Use the Khronos OpenGL ES APIs.  This is commonly used on
embedded
> +         systems and represents a subset of the OpenGL API.
> +
> +config BR2_PACKAGE_MESA3D_OPENVG
> +       bool "OpenVG"
> +       depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       select BR2_PACKAGE_HAS_OPENVG
> +       select BR2_PACKAGE_MESA3D_OPENGL_EGL
> +       help
> +         Use the Khronos OpenVG APIs. This is a 2D API commonly used on
> +         embedded systems.
> +
> +config BR2_PACKAGE_MESA3D_OPENCL
> +       bool "OpenCL"
> +       depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +       select BR2_PACKAGE_HAS_OPENCL
> +       help
> +         Use the Khronos OpenCL APIs. This is a GPU computation language
> +         commonly used in GPGPU computing applications.
> +
> +endmenu
> +
> +endif
> diff --git a/package/mesa3d/mesa3d-cross-glsl-compiler.patch
b/package/mesa3d/mesa3d-cross-glsl-compiler.patch
> new file mode 100644
> index 0000000..1028ea1
> --- /dev/null
> +++ b/package/mesa3d/mesa3d-cross-glsl-compiler.patch
> @@ -0,0 +1,41 @@
> +This patch fixes a cross compile issue as described here
> +https://bugs.freedesktop.org/show_bug.cgi?id=44618
> +
> +Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> +---
> +diff --git a/src/glsl/builtin_compiler/Makefile.am
b/src/glsl/builtin_compiler/Makefile.am
> +index e11a17f..8ebe0a2 100644
> +--- a/src/glsl/builtin_compiler/Makefile.am
> ++++ b/src/glsl/builtin_compiler/Makefile.am
> +@@ -64,6 +64,8 @@ AM_CXXFLAGS = $(AM_CFLAGS)
> + include ../Makefile.sources
> +
> + noinst_PROGRAMS = builtin_compiler
> ++
> ++if !CROSS_COMPILING
> + noinst_LTLIBRARIES = libglslcore.la libglcpp.la
> +
> + libglcpp_la_SOURCES =                                 \
> +@@ -73,6 +75,7 @@ libglcpp_la_SOURCES =
       \
> + libglslcore_la_SOURCES =                              \
> +       $(BUILTIN_COMPILER_GENERATED_CXX_FILES)         \
> +       $(LIBGLSL_FILES)
> ++endif
> +
> + builtin_compiler_SOURCES = \
> +       $(top_srcdir)/src/mesa/main/hash_table.c        \
> +@@ -81,4 +84,14 @@ builtin_compiler_SOURCES = \
> +       $(top_srcdir)/src/mesa/program/symbol_table.c   \
> +       $(BUILTIN_COMPILER_CXX_FILES)                   \
> +       $(GLSL_COMPILER_CXX_FILES)
> ++
> ++if CROSS_COMPILING
> ++builtin_compiler_SOURCES += \
> ++      $(LIBGLCPP_GENERATED_FILES) \
> ++      $(LIBGLCPP_FILES) \
> ++      $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
> ++      $(LIBGLSL_FILES)
> ++builtin_compiler_CPPFLAGS = $(AM_CPPFLAGS)
> ++else
> + builtin_compiler_LDADD = libglslcore.la libglcpp.la
> ++endif
> diff --git a/package/mesa3d/mesa3d-gbm-without-dri.patch
b/package/mesa3d/mesa3d-gbm-without-dri.patch
> new file mode 100644
> index 0000000..2c417f4
> --- /dev/null
> +++ b/package/mesa3d/mesa3d-gbm-without-dri.patch
> @@ -0,0 +1,30 @@
> +Fix build issue when gbm backend is built without dri support.
> +
> +Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> +
> +---
> +Index: mesa3d-9.1.6/src/gbm/main/backend.c
> +===================================================================
> +--- mesa3d-9.1.6.orig/src/gbm/main/backend.c   2012-11-24
11:57:41.000000000 -0600
> ++++ mesa3d-9.1.6/src/gbm/main/backend.c        2013-08-16
10:59:58.844753588 -0500
> +@@ -36,7 +36,9 @@
> +
> + #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
> +
> ++#ifdef HAVE_DRI
> + extern const struct gbm_backend gbm_dri_backend;
> ++#endif
> +
> + struct backend_desc {
> +    const char *name;
> +@@ -44,7 +46,9 @@
> + };
> +
> + static const struct backend_desc backends[] = {
> +-   { "gbm_dri.so", &gbm_dri_backend },
> ++#ifdef HAVE_DRI
> ++      { "gbm_dri.so", &gbm_dri_backend },
> ++#endif
> +    { "gbm_gallium_drm.so", NULL },
> + };
> +
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> new file mode 100644
> index 0000000..31ebe96
> --- /dev/null
> +++ b/package/mesa3d/mesa3d.mk
> @@ -0,0 +1,149 @@
>
+################################################################################
> +#
> +# mesa3d
> +#
>
+################################################################################
> +
> +MESA3D_VERSION = 9.1.6
> +MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
> +MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
> +MESA3D_LICENSE = MIT, SGI, Khronos
> +MESA3D_LICENSE_FILES = docs/license.html
> +
> +MESA3D_AUTORECONF = YES
> +MESA3D_INSTALL_STAGING = YES
> +
> +MESA3D_DEPENDENCIES = \
> +       libdrm \
> +       expat \
> +       host-xutil_makedepend \
> +       host-libxml2 \
> +       host-python \
> +       host-bison \
> +       host-flex
> +
> +MESA3D_CONF_OPT = \
> +       --disable-static
> +
> +# Used by subst in some options
> +null :=
> +space := $(null) #
> +comma := ,
> +
> +# Libraries
> +
> +ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
> +MESA3D_DEPENDENCIES += udev
> +MESA3D_CONF_OPT += --enable-gbm
> +else
> +MESA3D_CONF_OPT += --disable-gbm
> +endif
> +
> +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y)
> +MESA3D_DEPENDENCIES += \
> +       xproto_xf86driproto xproto_dri2proto xproto_glproto \
> +       xlib_libX11 xlib_libXext xlib_libXdamage xlib_libXfixes libxcb
> +MESA3D_CONF_OPT += \
> +       --enable-dri \
> +       --enable-xa \
> +       --enable-glx
> +else
> +MESA3D_CONF_OPT += \
> +       --disable-dri \
> +       --disable-xa \
> +       --disable-glx
> +endif
> +
> +# Drivers
> +
> +# Gallium Drivers
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915),y)
> +MESA3D_GALLIUM_DRIVERS += i915
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU),y)
> +MESA3D_GALLIUM_DRIVERS += nouveau
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300),y)
> +MESA3D_GALLIUM_DRIVERS += r300
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600),y)
> +MESA3D_GALLIUM_DRIVERS += r600
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI),y)
> +MESA3D_GALLIUM_DRIVERS += radeonsi
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA),y)
> +MESA3D_GALLIUM_DRIVERS += svga
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST),y)
> +MESA3D_GALLIUM_DRIVERS += swrast
> +endif
> +
> +# DRI Drivers
> +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST),y)
> +MESA3D_DRI_DRIVERS += swrast
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965),y)
> +MESA3D_DRI_DRIVERS += i965
> +endif
> +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON),y)
> +MESA3D_DRI_DRIVERS += radeon
> +endif

The above two sections could be made more elegant by using the kbuild way:

FOO-$(BR2_X) += x
FOO-$(BR2_Y) += y

The references to foo below should then be changed to FOO-y.

> +
> +ifneq ($(MESA3D_GALLIUM_DRIVERS),)
> +MESA3D_CONF_OPT += \
> +       --with-gallium-drivers=$(subst
$(space),$(comma),$(MESA3D_GALLIUM_DRIVERS))
> +else
> +MESA3D_CONF_OPT += --without-gallium-drivers
> +endif
> +
> +ifneq ($(MESA3D_DRI_DRIVERS),)
> +MESA3D_CONF_OPT += \
> +       --with-dri-drivers=$(subst
$(space),$(comma),$(MESA3D_DRI_DRIVERS))
> +else
> +MESA3D_CONF_OPT += --without-dri-drivers
> +endif
> +
> +# APIs
> +
> +ifeq ($(BR2_PACKAGE_MESA3D_EGL),y)
> +MESA3D_EGL_PLATFORMS = drm
> +ifeq ($(BR2_PACKAGE_WAYLAND),y)
> +MESA3D_DEPENDENCIES += wayland
> +MESA3D_EGL_PLATFORMS += wayland
> +endif
> +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y)
> +MESA3D_EGL_PLATFORMS += x11
> +endif
> +MESA3D_CONF_OPT += \
> +       --enable-egl \
> +       --with-egl-platforms=$(foreach subst
$(space),$(comma),$(MESA3D_EGL_PLATFORMS))
> +else
> +MESA3D_CONF_OPT += --disable-egl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL),y)
> +MESA3D_CONF_OPT += --enable-opengl
> +else
> +MESA3D_CONF_OPT += --disable-opengl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
> +MESA3D_CONF_OPT += --enable-gles1 --enable-gles2
> +else
> +MESA3D_CONF_OPT += --disable-gles1 --disable-gles2
> +endif
> +
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENVG),y)
> +MESA3D_CONF_OPT += --enable-openvg --enable-gallium-egl
> +else
> +MESA3D_CONF_OPT += --disable-openvg --disable-gallium-egl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
> +MESA3D_CONF_OPT += --enable-opencl
> +else
> +MESA3D_CONF_OPT += --disable-opencl
> +endif
> +
> +$(eval $(autotools-package))
> diff --git a/package/opengl/Config.in b/package/opengl/Config.in
> index 1636807..c705446 100644
> --- a/package/opengl/Config.in
> +++ b/package/opengl/Config.in
> @@ -1,3 +1,6 @@
> +config BR2_PACKAGE_HAS_OPENGL
> +       bool
> +
>  config BR2_PACKAGE_HAS_OPENGL_EGL
>         bool
>
> diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/
libegl.mk
> index c194b02..2d52fe3 100644
> --- a/package/opengl/libegl/libegl.mk
> +++ b/package/opengl/libegl/libegl.mk
> @@ -22,6 +22,10 @@ ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y)
>  LIBEGL_DEPENDENCIES += gpu-viv-bin-mx6q
>  endif
>
> +ifeq ($(BR2_PACKAGE_MESA3D_EGL),y)
> +LIBEGL_DEPENDENCIES += mesa3d
> +endif
> +
>  ifeq ($(LIBEGL_DEPENDENCIES),)
>  define LIBEGL_CONFIGURE_CMDS
>         echo "No libEGL implementation selected. Configuration error."
> diff --git a/package/opengl/libgl/libgl.mk b/package/opengl/libgl/libgl.mk
> new file mode 100644
> index 0000000..4b0d7f2
> --- /dev/null
> +++ b/package/opengl/libgl/libgl.mk
> @@ -0,0 +1,20 @@
>
+################################################################################
> +#
> +# libgl
> +#
>
+################################################################################
> +
> +LIBGL_SOURCE =
> +
> +ifeq ($(BR2_PACKAGE_MESA_OPENGL),y)
> +LIBGL_DEPENDENCIES += mesa3d
> +endif
> +
> +ifeq ($(LIBGL_DEPENDENCIES),)
> +define LIBOPENGL_CONFIGURE_CMDS
> +       echo "No libOpenGL implementation selected. Configuration error."
> +       exit 1
> +endef
> +endif
> +
> +$(eval $(generic-package))
> diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/
libgles.mk
> index ec157ac..8e5cef1 100644
> --- a/package/opengl/libgles/libgles.mk
> +++ b/package/opengl/libgles/libgles.mk
> @@ -22,6 +22,10 @@ ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y)
>  LIBGLES_DEPENDENCIES += gpu-viv-bin-mx6q
>  endif
>
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
> +LIBGLES_DEPENDENCIES += mesa3d
> +endif
> +
>  ifeq ($(LIBGLES_DEPENDENCIES),)
>  define LIBGLES_CONFIGURE_CMDS
>         echo "No libGLES implementation selected. Configuration error."
> diff --git a/package/opengl/libopenvg/libopenvg.mkb/package/opengl/libopenvg/
libopenvg.mk
> index 3296f63..e897423 100644
> --- a/package/opengl/libopenvg/libopenvg.mk
> +++ b/package/opengl/libopenvg/libopenvg.mk
> @@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
>  LIBOPENVG_DEPENDENCIES += rpi-userland
>  endif
>
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENVG),y)
> +LIBOPENVG_DEPENDENCIES += mesa3d
> +endif
> +
>  ifeq ($(LIBOPENVG_DEPENDENCIES),)
>  define LIBOPENVG_CONFIGURE_CMDS
>         echo "No libOpenVG implementation selected. Configuration error."
> diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
> index 205079c..d5d6e60 100644
> --- a/package/x11r7/Config.in
> +++ b/package/x11r7/Config.in
> @@ -13,7 +13,6 @@ if BR2_PACKAGE_XORG7
>         endmenu
>         menu "X11R7 Libraries"
>                 source package/x11r7/libxcb/Config.in
> -               source package/x11r7/mesa3d/Config.in
>                 source package/x11r7/xcb-util/Config.in
>                 source package/x11r7/xcb-util-image/Config.in
>                 source package/x11r7/xcb-util-keysyms/Config.in
> diff --git a/package/x11r7/mesa3d/Config.in
b/package/x11r7/mesa3d/Config.in
> deleted file mode 100644
> index 080f56a..0000000
> --- a/package/x11r7/mesa3d/Config.in
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -config BR2_PACKAGE_MESA3D
> -       bool "Mesa 3D Graphics Library"
> -       select BR2_PACKAGE_XPROTO_GLPROTO
> -       select BR2_PACKAGE_XLIB_LIBXXF86VM
> -       select BR2_PACKAGE_XLIB_LIBXDAMAGE
> -       select BR2_PACKAGE_XLIB_LIBXFIXES
> -       select BR2_PACKAGE_XPROTO_DRI2PROTO
> -       select BR2_PACKAGE_LIBDRM
> -       select BR2_PACKAGE_EXPAT
> -       select BR2_PACKAGE_HOST_LIBXML2_PYTHON
> -       depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR
> -       depends on BR2_INSTALL_LIBSTDCPP
> -       help
> -         Mesa 3D, an open-source implementation of the OpenGL
specification.
> -
> diff --git a/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
b/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
> deleted file mode 100644
> index 99afe8d..0000000
> --- a/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -[PATCH] Fix compilation on uClibc without locale support
> -
> -Based on similar patch from OE:
> -
> -
http://git.openembedded.org/openembedded-core/commit/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch?id=e4039eb74b20e96d4b8837cd58cf2d13d091e1ad
> -
> -Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
> ----
> - configure.ac            |    3 +++
> - src/glsl/strtod.c       |    2 +-
> - src/mesa/main/imports.c |    2 +-
> - 3 files changed, 5 insertions(+), 2 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index fbaa376..454dad2 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -450,6 +450,9 @@ AC_SUBST([DLOPEN_LIBS])
> - dnl See if posix_memalign is available
> - AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES
-DHAVE_POSIX_MEMALIGN"])
> -
> -+dnl See if newlocale is available
> -+AC_CHECK_FUNCS_ONCE(newlocale)
> -+
> - dnl SELinux awareness.
> - AC_ARG_ENABLE([selinux],
> -     [AS_HELP_STRING([--enable-selinux],
> -diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
> -index a876e13..9fce7e9 100644
> ---- a/src/glsl/strtod.c
> -+++ b/src/glsl/strtod.c
> -@@ -44,7 +44,7 @@ double
> - double
> - glsl_strtod(const char *s, char **end)
> - {
> --#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) &&
!defined(__FreeBSD__)
> -+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) &&
!defined(__FreeBSD__) && defined(HAVE_NEWLOCALE)
> -    static locale_t loc = NULL;
> -    if (!loc) {
> -       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
> -diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
> -index d3727ef..363bf32 100644
> ---- a/src/mesa/main/imports.c
> -+++ b/src/mesa/main/imports.c
> -@@ -757,7 +757,7 @@ float
> - float
> - _mesa_strtof( const char *s, char **end )
> - {
> --#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) &&
!defined(__FreeBSD__)
> -+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) &&
!defined(__FreeBSD__) && defined(HAVE_NEWLOCALE)
> -    static locale_t loc = NULL;
> -    if (!loc) {
> -       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
> ---
> -1.7.10.4
> -
> diff --git a/package/x11r7/mesa3d/mesa3d.mk b/package/x11r7/mesa3d/
mesa3d.mk
> deleted file mode 100644
> index f9d35a9..0000000
> --- a/package/x11r7/mesa3d/mesa3d.mk
> +++ /dev/null
> @@ -1,40 +0,0 @@
>
-################################################################################
> -#
> -# mesa3d
> -#
>
-################################################################################
> -
> -MESA3D_VERSION = 7.10.3
> -MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
> -MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
> -MESA3D_LICENSE = MIT, SGI, Khronos
> -MESA3D_LICENSE_FILES = docs/license.html
> -
> -MESA3D_AUTORECONF = YES
> -MESA3D_INSTALL_STAGING = YES
> -
> -MESA3D_CONF_OPT = \
> -       --disable-egl \
> -       --disable-glu \
> -       --disable-glw \
> -       --disable-glut \
> -       --disable-gallium \
> -       --with-driver=dri \
> -       --with-dri-drivers=swrast \
> -       --disable-static
> -
> -MESA3D_DEPENDENCIES = \
> -       xproto_glproto \
> -       xlib_libXxf86vm \
> -       xlib_libXdamage \
> -       xlib_libXfixes \
> -       xproto_dri2proto \
> -       libdrm \
> -       expat \
> -       host-xutil_makedepend \
> -       host-libxml2 \
> -       host-python \
> -       host-bison \
> -       host-flex
> -
> -$(eval $(autotools-package))
> diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mkb/package/x11r7/xserver_xorg-server/
xserver_xorg-server.mk
> index 4089aab..f5a4db6 100644
> --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> @@ -99,7 +99,7 @@ else # modular
>  XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive --disable-xfbdev
>  endif
>
> -ifeq ($(BR2_PACKAGE_MESA3D),y)
> +ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y)
>  XSERVER_XORG_SERVER_DEPENDENCIES += mesa3d xproto_xf86driproto
>  else
>  XSERVER_XORG_SERVER_CONF_OPT += --disable-dri
> @@ -172,7 +172,7 @@ ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y)
>  XSERVER_XORG_SERVER_CONF_OPT += --disable-dmx
>  endif
>
> -ifeq ($(BR2_PACKAGE_MESA3D),y)
> +ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y)
>  XSERVER_XORG_SERVER_CONF_OPT += --enable-glx
>  else
>  XSERVER_XORG_SERVER_CONF_OPT += --disable-glx
> --
> 1.8.1.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130825/afc53ad6/attachment-0001.html>

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

* [Buildroot] [PATCH 5/6] libpng12: new package
  2013-08-24 19:42 ` [Buildroot] [PATCH 5/6] libpng12: new package Spenser Gilliland
@ 2013-08-26 17:21   ` Arnout Vandecappelle
  2013-08-27 18:58     ` Spenser Gilliland
  0 siblings, 1 reply; 24+ messages in thread
From: Arnout Vandecappelle @ 2013-08-26 17:21 UTC (permalink / raw)
  To: buildroot

On 08/24/13 21:42, Spenser Gilliland wrote:
> libpng1X all have different incompatible apis therefore it is neccessary to
> have a seperate package for each branch.

  This explanation should be in either the Config.in or in the .mk file 
as well.

>
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>   package/Config.in            |  1 +
>   package/libpng12/Config.in   |  8 ++++++++
>   package/libpng12/libpng12.mk | 18 ++++++++++++++++++
>   3 files changed, 27 insertions(+)
>   create mode 100644 package/libpng12/Config.in
>   create mode 100644 package/libpng12/libpng12.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 0278885..2b8bef0 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -472,6 +472,7 @@ source "package/libglade/Config.in"
>   source "package/gdk-pixbuf/Config.in"
>   source "package/libgtk2/Config.in"
>   source "package/libpng/Config.in"
> +source "package/libpng12/Config.in"
>   source "package/libqrencode/Config.in"
>   source "package/libraw/Config.in"
>   source "package/librsvg/Config.in"
> diff --git a/package/libpng12/Config.in b/package/libpng12/Config.in
> new file mode 100644
> index 0000000..ff9e9b1
> --- /dev/null
> +++ b/package/libpng12/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_LIBPNG12
> +	bool "libpng"
> +	select BR2_PACKAGE_ZLIB
> +	help
> +	  Library for handling PNG (Portable Network Graphics)
> +	  images.
> +
> +	  http://www.libpng.org/
> diff --git a/package/libpng12/libpng12.mk b/package/libpng12/libpng12.mk
> new file mode 100644
> index 0000000..de4a45c
> --- /dev/null
> +++ b/package/libpng12/libpng12.mk
> @@ -0,0 +1,18 @@
> +################################################################################
> +#
> +# libpng12
> +#
> +################################################################################
> +
> +LIBPNG12_VERSION = 1.2.50
> +LIBPNG12_SERIES = 12
> +LIBPNG12_SOURCE = libpng-$(LIBPNG12_VERSION).tar.bz2
> +LIBPNG12_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG12_SERIES}/$(LIBPNG12_VERSION)

  Use $(), not ${}


  Regards,
  Arnout

> +LIBPNG12_LICENSE = libpng license
> +LIBPNG12_LICENSE_FILES = LICENSE
> +LIBPNG12_INSTALL_STAGING = YES
> +LIBPNG12_DEPENDENCIES = host-pkgconf zlib
> +LIBPNG12_CONFIG_SCRIPTS = libpng$(LIBPNG12_SERIES)-config libpng-config
> +
> +$(eval $(autotools-package))
> +$(eval $(host-autotools-package))
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6
  2013-08-24 19:41 ` [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6 Spenser Gilliland
  2013-08-25  6:45   ` Thomas De Schampheleire
@ 2013-08-26 17:27   ` Arnout Vandecappelle
  2013-08-27 18:56     ` Spenser Gilliland
  1 sibling, 1 reply; 24+ messages in thread
From: Arnout Vandecappelle @ 2013-08-26 17:27 UTC (permalink / raw)
  To: buildroot

On 08/24/13 21:41, Spenser Gilliland wrote:
> move mesa3d out of xorg as it is not really an Xorg component.
>
>
> Signed-off-by: Spenser Gilliland<spenser@gillilanding.com>
> ---
>   package/Config.in                                  |   1 +
>   package/mesa3d/Config.in                           | 172 +++++++++++++++++++++
>   package/mesa3d/mesa3d-cross-glsl-compiler.patch    |  41 +++++
>   package/mesa3d/mesa3d-gbm-without-dri.patch        |  30 ++++
>   package/mesa3d/mesa3d.mk                           | 149 ++++++++++++++++++
>   package/opengl/Config.in                           |   3 +
>   package/opengl/libegl/libegl.mk                    |   4 +
>   package/opengl/libgl/libgl.mk                      |  20 +++
>   package/opengl/libgles/libgles.mk                  |   4 +
>   package/opengl/libopenvg/libopenvg.mk              |   4 +
>   package/x11r7/Config.in                            |   1 -
>   package/x11r7/mesa3d/Config.in                     |  15 --
>   package/x11r7/mesa3d/mesa3d-uclibc-locale.patch    |  56 -------
>   package/x11r7/mesa3d/mesa3d.mk                     |  40 -----
>   .../xserver_xorg-server/xserver_xorg-server.mk     |   4 +-
>   15 files changed, 430 insertions(+), 114 deletions(-)
>   create mode 100644 package/mesa3d/Config.in
>   create mode 100644 package/mesa3d/mesa3d-cross-glsl-compiler.patch
>   create mode 100644 package/mesa3d/mesa3d-gbm-without-dri.patch
>   create mode 100644 package/mesa3d/mesa3d.mk
>   create mode 100644 package/opengl/libgl/libgl.mk
>   delete mode 100644 package/x11r7/mesa3d/Config.in
>   delete mode 100644 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
>   delete mode 100644 package/x11r7/mesa3d/mesa3d.mk

  Hi Spenser,

  I think this patch should be split up into two or three patches:

- Move out of X tree

- Modularize

- Bump

(not necessarily in that order).


  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support
  2013-08-24 19:41 ` [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support Spenser Gilliland
@ 2013-08-26 17:33   ` Arnout Vandecappelle
  2013-08-27  7:38   ` Thomas Petazzoni
  1 sibling, 0 replies; 24+ messages in thread
From: Arnout Vandecappelle @ 2013-08-26 17:33 UTC (permalink / raw)
  To: buildroot

On 08/24/13 21:41, Spenser Gilliland wrote:
> The newer versions of libdrm have substantially fewer dependencies as drm is
> moving to be a subsystem for both wayland and Xorg.

  I guess the remaining XLIB dependencies should then also move out of 
the Xorg condition, so that libdrm can move out of it as well...

  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-24 19:42 ` [Buildroot] [PATCH 6/6] glmark2: " Spenser Gilliland
@ 2013-08-26 17:43   ` Arnout Vandecappelle
  2013-08-27 19:01     ` Spenser Gilliland
  2013-08-27 20:48   ` Thomas Petazzoni
  1 sibling, 1 reply; 24+ messages in thread
From: Arnout Vandecappelle @ 2013-08-26 17:43 UTC (permalink / raw)
  To: buildroot

On 08/24/13 21:42, Spenser Gilliland wrote:
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>   package/Config.in                                  |   1 +
>   package/glmark2/Config.in                          |  49 ++++++++++
>   package/glmark2/glmark2-add-mali-support.patch     | 102 +++++++++++++++++++++
>   package/glmark2/glmark2-fix-add-GLchar.patch       |  17 ++++
>   .../glmark2-gl-to-glesv2-on-drm-flavor.patch       |  25 +++++
>   package/glmark2/glmark2.mk                         |  70 ++++++++++++++
>   6 files changed, 264 insertions(+)
>   create mode 100644 package/glmark2/Config.in
>   create mode 100644 package/glmark2/glmark2-add-mali-support.patch
>   create mode 100644 package/glmark2/glmark2-fix-add-GLchar.patch
>   create mode 100644 package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch

  Have these patches been sent upstream?

>   create mode 100644 package/glmark2/glmark2.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 2b8bef0..ebe8cb4 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -24,6 +24,7 @@ source "package/dstat/Config.in"
>   source "package/dmalloc/Config.in"
>   source "package/dropwatch/Config.in"
>   source "package/gdb/Config.in"
> +source "package/glmark2/Config.in"
>   source "package/iozone/Config.in"
>   source "package/kexec/Config.in"
>   source "package/latencytop/Config.in"
> diff --git a/package/glmark2/Config.in b/package/glmark2/Config.in
> new file mode 100644
> index 0000000..47ed221
> --- /dev/null
> +++ b/package/glmark2/Config.in
> @@ -0,0 +1,49 @@
> +config BR2_PACKAGE_GLMARK2
> +	bool "glmark2"
> +	depends on BR2_PACKAGE_MESA3D
> +	depends on BR2_PACKAGE_MESA3D_GBM

  I would think that a select is more appropriate here.

> +	depends on BR2_LARGEFILE
> +	depends on BR2_PACKAGE_HAS_OPENGL || \
> +		(BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES)
> +	select BR2_PACKAGE_JPEG
> +	select BR2_PACKAGE_LIBPNG12
> +	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64 # libdrm
> +	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS # libdrm

  These selects are redundant, they're done by libdrm...

> +	help
> +	  glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the subset of the
> +	  OpenGL 2.0 API that is compatible with OpenGL ES 2.0.
> +
> +if BR2_PACKAGE_GLMARK2
> +
> +config BR2_PACKAGE_GLMARK2_X11
> +	bool "X11"
> +	depends on BR2_PACKAGE_XSERVER_XORG_SERVER
> +	help
> +	 Use X11 window for display.

  Since this is a benchmark tool, I don't really think it is necessary to 
make the backends configurable. Just include any backend that is available.

  You would probably want a "depends on" in the top symbol to make sure 
at least one backend is available.

> +
> +config BR2_PACKAGE_GLMARK2_EGL
> +	bool "EGL"
> +	default y
> +	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> +	help
> +	  Use EGL window for display.
> +
> +config BR2_PACKAGE_GLMARK2_OPENGL
> +	bool "Install Desktop OpenGL 2.0 Version"
> +	default y
> +	depends on BR2_PACKAGE_HAS_OPENGL
> +	help
> +	  Enable desktop OpenGL version.
> +
> +config BR2_PACKAGE_GLMARK2_OPENGL_ES
> +	bool "Install OpenGL ES 2.0 Version"
> +	default y
> +	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	help
> +	  Enable OpenGL ES 2.0 Version.
> +
> +endif
> +
> +comment "glmark2 requires an OpenGL implementation and many X libraries"

  Actually just mesa3d AFAICS, so "many X libraries" is an exaggeration.

> +	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES \
> +		|| !BR2_PACKAGE_XORG7
[snip]
> diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
> new file mode 100644
> index 0000000..47b464b
> --- /dev/null
> +++ b/package/glmark2/glmark2.mk
> @@ -0,0 +1,70 @@
> +################################################################################
> +#
> +# glmark2
> +#
> +################################################################################
> +
> +GLMARK2_VERSION = 279
> +GLMARK2_SITE = http://bazaar.launchpad.net/~laanwj/glmark2/fbdev
> +GLMARK2_SITE_METHOD = bzr
> +GLMARK2_SOURCE = glmark2-$(GLMARK2_VERSION).tar.gz
> +GLMARK2_LICENSE = GPLv3+ SGIv1
> +GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
> +
> +GLMARK2_DEPENDENCIES = jpeg libpng12 mesa3d host-python host-pkgconf
> +
> +GLMARK2_CONF_OPTS = --prefix=/usr/
> +
> +ifeq ($(BR2_PACKAGE_GLMARK2_X11)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
> +GLMARK2_DEPENDENCIES += libegl libgles
> +GLMARK2_FLAVORS += x11-glesv2
> +endif
> +
> +ifeq ($(BR2_PACKAGE_GLMARK2_X11)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
> +GLMARK2_DEPENDENCIES += libgl
> +GLMARK2_FLAVORS += x11-gl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_GLMARK2_EGL)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
> +GLMARK2_DEPENDENCIES += libdrm libegl libgles
> +GLMARK2_FLAVORS += drm-glesv2 fbdev-glesv2
> +endif
> +
> +ifeq ($(BR2_PACKAGE_GLMARK2_EGL)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
> +GLMARK2_DEPENDENCIES += libdrm libgl
> +GLMARK2_FLAVORS += drm-gl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
> +GLMARK2_DEPENDENCIES += wayland libegl libgles
> +GLMARK2_FLAVORS += wayland-glesv2
> +endif
> +
> +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
> +GLMARK2_DEPENDENCIES += wayland libgl
> +GLMARK2_FLAVORS += wayland-gl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_SUNXI_MALI),y)
> +GLMARK2_CONF_OPTS += --for-mali
> +endif
> +
> +null :=
> +space := $(null) #
> +comma := ,

  space and comma are already defined in the top-level Makefile, and used 
in a few other packages as well.

> +
> +GLMARK2_CONF_OPTS += --with-flavors=$(subst $(space),$(comma),$(GLMARK2_FLAVORS))
> +
> +define GLMARK2_CONFIGURE_CMDS
> +cd $(@D) && $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) ./waf configure $(GLMARK2_CONF_OPTS)

  Indent with a tab (same for other _CMDS).


  Regards,
  Arnout

> +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))
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support
  2013-08-24 19:41 ` [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support Spenser Gilliland
  2013-08-26 17:33   ` Arnout Vandecappelle
@ 2013-08-27  7:38   ` Thomas Petazzoni
  2013-08-27 19:24     ` Spenser Gilliland
  1 sibling, 1 reply; 24+ messages in thread
From: Thomas Petazzoni @ 2013-08-27  7:38 UTC (permalink / raw)
  To: buildroot

Dear Spenser Gilliland,

On Sat, 24 Aug 2013 14:41:56 -0500, Spenser Gilliland wrote:
> The newer versions of libdrm have substantially fewer dependencies as drm is
> moving to be a subsystem for both wayland and Xorg.
> 
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>  package/libdrm/Config.in | 14 +++-----------
>  package/libdrm/libdrm.mk | 24 +++++++++---------------
>  2 files changed, 12 insertions(+), 26 deletions(-)
> 
> diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
> index 8bf676b..f976ef1 100644
> --- a/package/libdrm/Config.in
> +++ b/package/libdrm/Config.in
> @@ -1,18 +1,10 @@
>  config BR2_PACKAGE_LIBDRM
>  	bool "libdrm"
> +	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
> +	select BR2_PACKAGE_LIBATOMIC_OPS

libatomic_ops is not available on all architectures. In the prevous
libdrm code, it was only selected on i386 and x86-64, so it was ok, but
if libatomic_ops is now needed in all cases for libdrm, then you need
to propagate the libatomic_ops dependencies into libdrm, i.e:

	depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64

> +	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
>  	depends on BR2_PACKAGE_XORG7

If libdrm is needed by Wayland, then it sounds strange to require
enabling BR2_PACKAGE_XORG7. When I did the Wayland packaging, there are
a few X.org packages that I moved out of the BR2_PACKAGE_XORG7
condition, maybe we should do the same for libpciaccess and
libpthread-stubs. But ok, this is probably something we can tackle at a
later point, I don't want to require you to solve all problems right
now :)

>  	depends on BR2_LARGEFILE
> -	select BR2_PACKAGE_XPROTO_GLPROTO
> -	select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
> -	select BR2_PACKAGE_XLIB_LIBXXF86VM
> -	select BR2_PACKAGE_XLIB_LIBXMU
> -	select BR2_PACKAGE_XLIB_LIBPCIACCESS
> -	select BR2_PACKAGE_XPROTO_DRI2PROTO
> -	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
> -	# libatomic_ops is only available on a subset of the supported
> -	# architectures, and we make the assumption that the intel
> -	# driver can only be used on x86 and x86_64 machines.
> -	select BR2_PACKAGE_LIBATOMIC_OPS if (BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL && (BR2_i386 || BR2_x86_64))
>  	help
>  	  Direct Rendering Manager
>  
> diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
> index d3d2b2d..8388e68 100644
> --- a/package/libdrm/libdrm.mk
> +++ b/package/libdrm/libdrm.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -LIBDRM_VERSION = 2.4.38
> +LIBDRM_VERSION = 2.4.46
>  LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
>  LIBDRM_SITE = http://dri.freedesktop.org/libdrm/
>  LIBDRM_LICENSE = MIT
> @@ -12,24 +12,18 @@ LIBDRM_LICENSE = MIT
>  LIBDRM_INSTALL_STAGING = YES
>  
>  LIBDRM_DEPENDENCIES = \
> -	xproto_glproto \
> -	xproto_xf86vidmodeproto \
> -	xlib_libXxf86vm \
> -	xlib_libXmu \
> -	xlib_libpciaccess \
> -	xproto_dri2proto \
>  	xlib_libpthread-stubs \
>  	host-pkgconf
>  
> -ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y)
> -LIBDRM_CONF_OPT += --enable-intel
> -LIBDRM_DEPENDENCIES += libatomic_ops
> -else
> -LIBDRM_CONF_OPT += --disable-intel
> -endif
> +LIBDRM_CONF_OPT = \
> +	--disable-cairo-tests \
> +	--disable-manpages
>  
> -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
> -LIBDRM_CONF_OPT += --disable-radeon

So those --enable-intel / --disable-radeon things are no longer needed?

> +ifeq ($(BR2_arm),y)
> +LIBDRM_CONF_OPT += \
> +	--enable-omap-experimental-api \
> +	--enable-exynos-experimental-api \
> +	--enable-freedreno-experimental-api
>  endif

It seems strange to me to enable those options as soon as we're on ARM.
I think we probably need Config.in sub-options for these.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script
  2013-08-24 19:41 ` [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script Spenser Gilliland
@ 2013-08-27  7:39   ` Thomas Petazzoni
  2013-08-28 11:44   ` Peter Korsgaard
  1 sibling, 0 replies; 24+ messages in thread
From: Thomas Petazzoni @ 2013-08-27  7:39 UTC (permalink / raw)
  To: buildroot

Dear Spenser Gilliland,

On Sat, 24 Aug 2013 14:41:57 -0500, Spenser Gilliland wrote:
> fix bad escape sequences in init script and add correct lib for pc file.
> 
> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
> ---
>  package/sunxi-mali/S80mali   | 2 +-
>  package/sunxi-mali/glesv2.pc | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/sunxi-mali/S80mali b/package/sunxi-mali/S80mali
> index 6f51cc4..ecfbab9 100644
> --- a/package/sunxi-mali/S80mali
> +++ b/package/sunxi-mali/S80mali
> @@ -5,7 +5,7 @@ install_driver() {
>  	OPTS=$2
>  
>  	modprobe $DRIVER $OPTS
> -	maj=$(awk "$$2==\"${DRIVER}\" { print $$1; }" /proc/devices)
> +	maj=$(awk "\$2==\"${DRIVER}\" { print \$1; }" /proc/devices)
>  
>  	rm -f /dev/${DRIVER}
>  
> diff --git a/package/sunxi-mali/glesv2.pc b/package/sunxi-mali/glesv2.pc
> index 4e112ee..9273678 100644
> --- a/package/sunxi-mali/glesv2.pc
> +++ b/package/sunxi-mali/glesv2.pc
> @@ -7,6 +7,6 @@ Name: glesv2
>  Description: ARM Mali implementation of OpenGL ESv2
>  Version: 2.0
>  Requires:
> -Libs: -L${libdir} -lGLESv2 -lGLES_CM -lUMP
> +Libs: -L${libdir} -lGLESv2 -lGLESv1_CM -lUMP
>  Cflags: -I${includedir}/GLES2
>  

I haven't tested this, but it looks ok.

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Peter: I believe we can apply this one for 2013.08.

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6
  2013-08-26 17:27   ` Arnout Vandecappelle
@ 2013-08-27 18:56     ` Spenser Gilliland
  0 siblings, 0 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-27 18:56 UTC (permalink / raw)
  To: buildroot

Spelling mistakes are fixed.
>
>  Hi Spenser,
>
>  I think this patch should be split up into two or three patches:
>
> - Move out of X tree
>
> - Modularize
>
> - Bump

No problem.  I will change this to three patches and resubmit.

Thanks,
Spenser


-- 
Spenser Gilliland
Computer Engineer
Doctoral Candidate

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

* [Buildroot] [PATCH 5/6] libpng12: new package
  2013-08-26 17:21   ` Arnout Vandecappelle
@ 2013-08-27 18:58     ` Spenser Gilliland
  0 siblings, 0 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-27 18:58 UTC (permalink / raw)
  To: buildroot

Arnout,

>>
>> libpng1X all have different incompatible apis therefore it is neccessary
>> to
>> have a seperate package for each branch.
>
>
>  This explanation should be in either the Config.in or in the .mk file as
> well.

Will fix.

>  Use $(), not ${}

Will fix.

Thanks,
Spenser

-- 
Spenser Gilliland
Computer Engineer
Doctoral Candidate

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-26 17:43   ` Arnout Vandecappelle
@ 2013-08-27 19:01     ` Spenser Gilliland
  2013-08-29  5:35       ` Arnout Vandecappelle
  0 siblings, 1 reply; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-27 19:01 UTC (permalink / raw)
  To: buildroot

Arnout,

Thanks for the review.  I appreciate your suggestions.

On Mon, Aug 26, 2013 at 12:43 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 08/24/13 21:42, Spenser Gilliland wrote:
>>
>> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
>> ---
>>   package/Config.in                                  |   1 +
>>   package/glmark2/Config.in                          |  49 ++++++++++
>>   package/glmark2/glmark2-add-mali-support.patch     | 102
>> +++++++++++++++++++++
>>   package/glmark2/glmark2-fix-add-GLchar.patch       |  17 ++++
>>   .../glmark2-gl-to-glesv2-on-drm-flavor.patch       |  25 +++++
>>   package/glmark2/glmark2.mk                         |  70 ++++++++++++++
>>   6 files changed, 264 insertions(+)
>>   create mode 100644 package/glmark2/Config.in
>>   create mode 100644 package/glmark2/glmark2-add-mali-support.patch
>>   create mode 100644 package/glmark2/glmark2-fix-add-GLchar.patch
>>   create mode 100644
>> package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
>
>
>  Have these patches been sent upstream?

Not yet.  I was planning to wait until these patches were committed
before submitting them upstream.

>
>>   create mode 100644 package/glmark2/glmark2.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index 2b8bef0..ebe8cb4 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -24,6 +24,7 @@ source "package/dstat/Config.in"
>>   source "package/dmalloc/Config.in"
>>   source "package/dropwatch/Config.in"
>>   source "package/gdb/Config.in"
>> +source "package/glmark2/Config.in"
>>   source "package/iozone/Config.in"
>>   source "package/kexec/Config.in"
>>   source "package/latencytop/Config.in"
>> diff --git a/package/glmark2/Config.in b/package/glmark2/Config.in
>> new file mode 100644
>> index 0000000..47ed221
>> --- /dev/null
>> +++ b/package/glmark2/Config.in
>> @@ -0,0 +1,49 @@
>> +config BR2_PACKAGE_GLMARK2
>> +       bool "glmark2"
>> +       depends on BR2_PACKAGE_MESA3D
>> +       depends on BR2_PACKAGE_MESA3D_GBM
>
>
>  I would think that a select is more appropriate here.

Will fix.

>
>
>> +       depends on BR2_LARGEFILE
>> +       depends on BR2_PACKAGE_HAS_OPENGL || \
>> +               (BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES)
>> +       select BR2_PACKAGE_JPEG
>> +       select BR2_PACKAGE_LIBPNG12
>> +       select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64 #
>> libdrm
>> +       select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS # libdrm
>
>
>  These selects are redundant, they're done by libdrm...

Will fix.

>
>> +       help
>> +         glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the
>> subset of the
>> +         OpenGL 2.0 API that is compatible with OpenGL ES 2.0.
>> +
>> +if BR2_PACKAGE_GLMARK2
>> +
>> +config BR2_PACKAGE_GLMARK2_X11
>> +       bool "X11"
>> +       depends on BR2_PACKAGE_XSERVER_XORG_SERVER
>> +       help
>> +        Use X11 window for display.
>
>
>  Since this is a benchmark tool, I don't really think it is necessary to
> make the backends configurable. Just include any backend that is available.
>
>  You would probably want a "depends on" in the top symbol to make sure at
> least one backend is available.

Will fix.

>
>> +
>> +config BR2_PACKAGE_GLMARK2_EGL
>> +       bool "EGL"
>> +       default y
>> +       depends on BR2_PACKAGE_HAS_OPENGL_EGL
>> +       help
>> +         Use EGL window for display.
>> +
>> +config BR2_PACKAGE_GLMARK2_OPENGL
>> +       bool "Install Desktop OpenGL 2.0 Version"
>> +       default y
>> +       depends on BR2_PACKAGE_HAS_OPENGL
>> +       help
>> +         Enable desktop OpenGL version.
>> +
>> +config BR2_PACKAGE_GLMARK2_OPENGL_ES
>> +       bool "Install OpenGL ES 2.0 Version"
>> +       default y
>> +       depends on BR2_PACKAGE_HAS_OPENGL_ES
>> +       help
>> +         Enable OpenGL ES 2.0 Version.
>> +
>> +endif
>> +
>> +comment "glmark2 requires an OpenGL implementation and many X libraries"
>
>
>  Actually just mesa3d AFAICS, so "many X libraries" is an exaggeration.

This was left in from before my fixes in libdrm/mesa3d.  Will fix.

>
>> +       depends on !BR2_PACKAGE_HAS_OPENGL_EGL ||
>> !BR2_PACKAGE_HAS_OPENGL_ES \
>> +               || !BR2_PACKAGE_XORG7
>
> [snip]
>
>> diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
>> new file mode 100644
>> index 0000000..47b464b
>> --- /dev/null
>> +++ b/package/glmark2/glmark2.mk
>> @@ -0,0 +1,70 @@
>>
>> +################################################################################
>> +#
>> +# glmark2
>> +#
>>
>> +################################################################################
>> +
>> +GLMARK2_VERSION = 279
>> +GLMARK2_SITE = http://bazaar.launchpad.net/~laanwj/glmark2/fbdev
>> +GLMARK2_SITE_METHOD = bzr
>> +GLMARK2_SOURCE = glmark2-$(GLMARK2_VERSION).tar.gz
>> +GLMARK2_LICENSE = GPLv3+ SGIv1
>> +GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
>> +
>> +GLMARK2_DEPENDENCIES = jpeg libpng12 mesa3d host-python host-pkgconf
>> +
>> +GLMARK2_CONF_OPTS = --prefix=/usr/
>> +
>> +ifeq ($(BR2_PACKAGE_GLMARK2_X11)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
>> +GLMARK2_DEPENDENCIES += libegl libgles
>> +GLMARK2_FLAVORS += x11-glesv2
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_GLMARK2_X11)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
>> +GLMARK2_DEPENDENCIES += libgl
>> +GLMARK2_FLAVORS += x11-gl
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_GLMARK2_EGL)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
>> +GLMARK2_DEPENDENCIES += libdrm libegl libgles
>> +GLMARK2_FLAVORS += drm-glesv2 fbdev-glesv2
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_GLMARK2_EGL)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
>> +GLMARK2_DEPENDENCIES += libdrm libgl
>> +GLMARK2_FLAVORS += drm-gl
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_GLMARK2_OPENGL_ES),yy)
>> +GLMARK2_DEPENDENCIES += wayland libegl libgles
>> +GLMARK2_FLAVORS += wayland-glesv2
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_GLMARK2_OPENGL),yy)
>> +GLMARK2_DEPENDENCIES += wayland libgl
>> +GLMARK2_FLAVORS += wayland-gl
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_SUNXI_MALI),y)
>> +GLMARK2_CONF_OPTS += --for-mali
>> +endif
>> +
>> +null :=
>> +space := $(null) #
>> +comma := ,
>
>
>  space and comma are already defined in the top-level Makefile, and used in
> a few other packages as well.

Will fix.

>
>> +
>> +GLMARK2_CONF_OPTS += --with-flavors=$(subst
>> $(space),$(comma),$(GLMARK2_FLAVORS))
>> +
>> +define GLMARK2_CONFIGURE_CMDS
>> +cd $(@D) && $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) ./waf configure
>> $(GLMARK2_CONF_OPTS)
>
>
>  Indent with a tab (same for other _CMDS).

Will fix.

Thanks,
Spenser


-- 
Spenser Gilliland
Computer Engineer
Doctoral Candidate

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

* [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support
  2013-08-27  7:38   ` Thomas Petazzoni
@ 2013-08-27 19:24     ` Spenser Gilliland
  2013-08-27 20:42       ` Thomas Petazzoni
  0 siblings, 1 reply; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-27 19:24 UTC (permalink / raw)
  To: buildroot

Thomas,

On Tue, Aug 27, 2013 at 2:38 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Spenser Gilliland,
>
> On Sat, 24 Aug 2013 14:41:56 -0500, Spenser Gilliland wrote:
>> The newer versions of libdrm have substantially fewer dependencies as drm is
>> moving to be a subsystem for both wayland and Xorg.
>>
>> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
>> ---
>>  package/libdrm/Config.in | 14 +++-----------
>>  package/libdrm/libdrm.mk | 24 +++++++++---------------
>>  2 files changed, 12 insertions(+), 26 deletions(-)
>>
>> diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in
>> index 8bf676b..f976ef1 100644
>> --- a/package/libdrm/Config.in
>> +++ b/package/libdrm/Config.in
>> @@ -1,18 +1,10 @@
>>  config BR2_PACKAGE_LIBDRM
>>       bool "libdrm"
>> +     select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
>> +     select BR2_PACKAGE_LIBATOMIC_OPS
>
> libatomic_ops is not available on all architectures. In the prevous
> libdrm code, it was only selected on i386 and x86-64, so it was ok, but
> if libatomic_ops is now needed in all cases for libdrm, then you need
> to propagate the libatomic_ops dependencies into libdrm, i.e:
>
>         depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64

It is only needed for x86/x86_64, so we can select the option only
when BR2_i386 or BR2_x86_64.

>> +     select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
>>       depends on BR2_PACKAGE_XORG7
>
> If libdrm is needed by Wayland, then it sounds strange to require
> enabling BR2_PACKAGE_XORG7. When I did the Wayland packaging, there are
> a few X.org packages that I moved out of the BR2_PACKAGE_XORG7
> condition, maybe we should do the same for libpciaccess and
> libpthread-stubs. But ok, this is probably something we can tackle at a
> later point, I don't want to require you to solve all problems right
> now :)

I agree these packages should probably be moved out of xorg, but the
BR2_PACKAGE_XORG7 doesn't really do much other than allow access to
the libraries.

>
>>       depends on BR2_LARGEFILE
>> -     select BR2_PACKAGE_XPROTO_GLPROTO
>> -     select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
>> -     select BR2_PACKAGE_XLIB_LIBXXF86VM
>> -     select BR2_PACKAGE_XLIB_LIBXMU
>> -     select BR2_PACKAGE_XLIB_LIBPCIACCESS
>> -     select BR2_PACKAGE_XPROTO_DRI2PROTO
>> -     select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS
>> -     # libatomic_ops is only available on a subset of the supported
>> -     # architectures, and we make the assumption that the intel
>> -     # driver can only be used on x86 and x86_64 machines.
>> -     select BR2_PACKAGE_LIBATOMIC_OPS if (BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL && (BR2_i386 || BR2_x86_64))
>>       help
>>         Direct Rendering Manager
>>
>> diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
>> index d3d2b2d..8388e68 100644
>> --- a/package/libdrm/libdrm.mk
>> +++ b/package/libdrm/libdrm.mk
>> @@ -4,7 +4,7 @@
>>  #
>>  ################################################################################
>>
>> -LIBDRM_VERSION = 2.4.38
>> +LIBDRM_VERSION = 2.4.46
>>  LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
>>  LIBDRM_SITE = http://dri.freedesktop.org/libdrm/
>>  LIBDRM_LICENSE = MIT
>> @@ -12,24 +12,18 @@ LIBDRM_LICENSE = MIT
>>  LIBDRM_INSTALL_STAGING = YES
>>
>>  LIBDRM_DEPENDENCIES = \
>> -     xproto_glproto \
>> -     xproto_xf86vidmodeproto \
>> -     xlib_libXxf86vm \
>> -     xlib_libXmu \
>> -     xlib_libpciaccess \
>> -     xproto_dri2proto \
>>       xlib_libpthread-stubs \
>>       host-pkgconf
>>
>> -ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y)
>> -LIBDRM_CONF_OPT += --enable-intel
>> -LIBDRM_DEPENDENCIES += libatomic_ops
>> -else
>> -LIBDRM_CONF_OPT += --disable-intel
>> -endif
>> +LIBDRM_CONF_OPT = \
>> +     --disable-cairo-tests \
>> +     --disable-manpages
>>
>> -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
>> -LIBDRM_CONF_OPT += --disable-radeon
>
> So those --enable-intel / --disable-radeon things are no longer needed?

I'll do some more testing to make sure but I don't believe so.

>> +ifeq ($(BR2_arm),y)
>> +LIBDRM_CONF_OPT += \
>> +     --enable-omap-experimental-api \
>> +     --enable-exynos-experimental-api \
>> +     --enable-freedreno-experimental-api
>>  endif
>
> It seems strange to me to enable those options as soon as we're on ARM.
> I think we probably need Config.in sub-options for these.

I'll add config options for each driver.  I initially tried to avoid
this, but more and more I think it's a better solution.

> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Thanks,
Spenser

-- 
Spenser Gilliland
Computer Engineer
Doctoral Candidate

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

* [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support
  2013-08-27 19:24     ` Spenser Gilliland
@ 2013-08-27 20:42       ` Thomas Petazzoni
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Petazzoni @ 2013-08-27 20:42 UTC (permalink / raw)
  To: buildroot

Dear Spenser Gilliland,

On Tue, 27 Aug 2013 14:24:08 -0500, Spenser Gilliland wrote:

> > libatomic_ops is not available on all architectures. In the prevous
> > libdrm code, it was only selected on i386 and x86-64, so it was ok, but
> > if libatomic_ops is now needed in all cases for libdrm, then you need
> > to propagate the libatomic_ops dependencies into libdrm, i.e:
> >
> >         depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64
> 
> It is only needed for x86/x86_64, so we can select the option only
> when BR2_i386 or BR2_x86_64.

Fine.

> >> +     select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64
> >>       depends on BR2_PACKAGE_XORG7
> >
> > If libdrm is needed by Wayland, then it sounds strange to require
> > enabling BR2_PACKAGE_XORG7. When I did the Wayland packaging, there are
> > a few X.org packages that I moved out of the BR2_PACKAGE_XORG7
> > condition, maybe we should do the same for libpciaccess and
> > libpthread-stubs. But ok, this is probably something we can tackle at a
> > later point, I don't want to require you to solve all problems right
> > now :)
> 
> I agree these packages should probably be moved out of xorg, but the
> BR2_PACKAGE_XORG7 doesn't really do much other than allow access to
> the libraries.

That's true, but it means that the user needs to know that the global
BR2_PACKAGE_XORG7 option has to be enabled if he wants to build
something completely unrelated (say Wayland).

But ok, as I said, let's do this later on.

> >> -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y)
> >> -LIBDRM_CONF_OPT += --disable-radeon
> >
> > So those --enable-intel / --disable-radeon things are no longer needed?
> 
> I'll do some more testing to make sure but I don't believe so.

Ok.

> >> +ifeq ($(BR2_arm),y)
> >> +LIBDRM_CONF_OPT += \
> >> +     --enable-omap-experimental-api \
> >> +     --enable-exynos-experimental-api \
> >> +     --enable-freedreno-experimental-api
> >>  endif
> >
> > It seems strange to me to enable those options as soon as we're on ARM.
> > I think we probably need Config.in sub-options for these.
> 
> I'll add config options for each driver.  I initially tried to avoid
> this, but more and more I think it's a better solution.

Excellent, thanks.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-24 19:42 ` [Buildroot] [PATCH 6/6] glmark2: " Spenser Gilliland
  2013-08-26 17:43   ` Arnout Vandecappelle
@ 2013-08-27 20:48   ` Thomas Petazzoni
  2013-09-06 16:35     ` Spenser Gilliland
  1 sibling, 1 reply; 24+ messages in thread
From: Thomas Petazzoni @ 2013-08-27 20:48 UTC (permalink / raw)
  To: buildroot

Dear Spenser Gilliland,

On Sat, 24 Aug 2013 14:42:01 -0500, Spenser Gilliland wrote:

> diff --git a/package/glmark2/Config.in b/package/glmark2/Config.in
> new file mode 100644
> index 0000000..47ed221
> --- /dev/null
> +++ b/package/glmark2/Config.in
> @@ -0,0 +1,49 @@
> +config BR2_PACKAGE_GLMARK2
> +	bool "glmark2"
> +	depends on BR2_PACKAGE_MESA3D
> +	depends on BR2_PACKAGE_MESA3D_GBM
> +	depends on BR2_LARGEFILE
> +	depends on BR2_PACKAGE_HAS_OPENGL || \
> +		(BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES)

It's probably me not having enough OpenGL/Mesa knowledge, but my
understanding was that Mesa was the OpenGL/EGL/OpenVG implementations
for "desktop" graphics cards, and that therefore Mesa was equivalent to
the OpenGL implementations provided by ARM SoC vendors, so that OpenGL
applications such as glmark2 would only have to depends on HAS_OPENGL
|| (HAS_OPENGL_EGL && HAS_OPENGL_ES), and not depend on Mesa in
addition to this.

With the dependencies you've listed, on a TI OMAP3 platform, we would
need both Mesa *and* the ti-gfx package. Is this expected? I suppose
that this means Mesa provides more stuff that just GL/GLES/EGL/VG. If
that's the case, do you have a few more details?

> +	select BR2_PACKAGE_JPEG
> +	select BR2_PACKAGE_LIBPNG12
> +	select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64 # libdrm
> +	select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS # libdrm

glmark2 is directly using libpciaccess and libpthread-stubs?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script
  2013-08-24 19:41 ` [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script Spenser Gilliland
  2013-08-27  7:39   ` Thomas Petazzoni
@ 2013-08-28 11:44   ` Peter Korsgaard
  1 sibling, 0 replies; 24+ messages in thread
From: Peter Korsgaard @ 2013-08-28 11:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Spenser" == Spenser Gilliland <spenser@gillilanding.com> writes:

 Spenser> fix bad escape sequences in init script and add correct lib
 Spenser> for pc file.

 Spenser> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-27 19:01     ` Spenser Gilliland
@ 2013-08-29  5:35       ` Arnout Vandecappelle
  2013-08-29 18:24         ` Spenser Gilliland
  0 siblings, 1 reply; 24+ messages in thread
From: Arnout Vandecappelle @ 2013-08-29  5:35 UTC (permalink / raw)
  To: buildroot

On 08/27/13 21:01, Spenser Gilliland wrote:
> Arnout,
>
> Thanks for the review.  I appreciate your suggestions.
>
> On Mon, Aug 26, 2013 at 12:43 PM, Arnout Vandecappelle<arnout@mind.be>  wrote:
>> >On 08/24/13 21:42, Spenser Gilliland wrote:
>>> >>
>>> >>Signed-off-by: Spenser Gilliland<spenser@gillilanding.com>
>>> >>---
>>> >>   package/Config.in                                  |   1 +
>>> >>   package/glmark2/Config.in                          |  49 ++++++++++
>>> >>   package/glmark2/glmark2-add-mali-support.patch     | 102
>>> >>+++++++++++++++++++++
>>> >>   package/glmark2/glmark2-fix-add-GLchar.patch       |  17 ++++
>>> >>   .../glmark2-gl-to-glesv2-on-drm-flavor.patch       |  25 +++++
>>> >>   package/glmark2/glmark2.mk                         |  70 ++++++++++++++
>>> >>   6 files changed, 264 insertions(+)
>>> >>   create mode 100644 package/glmark2/Config.in
>>> >>   create mode 100644 package/glmark2/glmark2-add-mali-support.patch
>>> >>   create mode 100644 package/glmark2/glmark2-fix-add-GLchar.patch
>>> >>   create mode 100644
>>> >>package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
>> >
>> >
>> >  Have these patches been sent upstream?
> Not yet.  I was planning to wait until these patches were committed
> before submitting them upstream.

  It's a better idea to send them right away. The buildroot people are 
not ideally placed to review those patches, so you may get more useful 
feedback from upstream. Also, if upstream is fast enough to review the 
patches, you can still make modifications to the patch included in buildroot.

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-29  5:35       ` Arnout Vandecappelle
@ 2013-08-29 18:24         ` Spenser Gilliland
  0 siblings, 0 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-08-29 18:24 UTC (permalink / raw)
  To: buildroot

On Thu, Aug 29, 2013 at 12:35 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 08/27/13 21:01, Spenser Gilliland wrote:
>>
>> Arnout,
>>
>> Thanks for the review.  I appreciate your suggestions.
>>
>> On Mon, Aug 26, 2013 at 12:43 PM, Arnout Vandecappelle<arnout@mind.be>
>> wrote:
>>>
>>> >On 08/24/13 21:42, Spenser Gilliland wrote:
>>>>
>>>> >>
>>>> >>Signed-off-by: Spenser Gilliland<spenser@gillilanding.com>
>>>> >>---
>>>> >>   package/Config.in                                  |   1 +
>>>> >>   package/glmark2/Config.in                          |  49 ++++++++++
>>>> >>   package/glmark2/glmark2-add-mali-support.patch     | 102
>>>> >>+++++++++++++++++++++
>>>> >>   package/glmark2/glmark2-fix-add-GLchar.patch       |  17 ++++
>>>> >>   .../glmark2-gl-to-glesv2-on-drm-flavor.patch       |  25 +++++
>>>> >>   package/glmark2/glmark2.mk                         |  70
>>>> >> ++++++++++++++
>>>> >>   6 files changed, 264 insertions(+)
>>>> >>   create mode 100644 package/glmark2/Config.in
>>>> >>   create mode 100644 package/glmark2/glmark2-add-mali-support.patch
>>>> >>   create mode 100644 package/glmark2/glmark2-fix-add-GLchar.patch
>>>> >>   create mode 100644
>>>> >>package/glmark2/glmark2-gl-to-glesv2-on-drm-flavor.patch
>>>
>>> >
>>> >
>>> >  Have these patches been sent upstream?
>>
>> Not yet.  I was planning to wait until these patches were committed
>> before submitting them upstream.
>
>
>  It's a better idea to send them right away. The buildroot people are not
> ideally placed to review those patches, so you may get more useful feedback
> from upstream. Also, if upstream is fast enough to review the patches, you
> can still make modifications to the patch included in buildroot.

They have been sent.  Awaiting review using launchpad see
https://code.launchpad.net/~spenser-gilliland/glmark2/mali-fbdev .

>  Regards,
>  Arnout
>
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

Regards,
Spenser


-- 
Spenser Gilliland
Computer Engineer
Doctoral Candidate

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

* [Buildroot] [PATCH 6/6] glmark2: new package
  2013-08-27 20:48   ` Thomas Petazzoni
@ 2013-09-06 16:35     ` Spenser Gilliland
  0 siblings, 0 replies; 24+ messages in thread
From: Spenser Gilliland @ 2013-09-06 16:35 UTC (permalink / raw)
  To: buildroot

Thomas,

> It's probably me not having enough OpenGL/Mesa knowledge, but my
> understanding was that Mesa was the OpenGL/EGL/OpenVG implementations
> for "desktop" graphics cards, and that therefore Mesa was equivalent to
> the OpenGL implementations provided by ARM SoC vendors, so that OpenGL
> applications such as glmark2 would only have to depends on HAS_OPENGL
> || (HAS_OPENGL_EGL && HAS_OPENGL_ES), and not depend on Mesa in
> addition to this.

GLMark2 depends on Mesa because Mesa provides libgbm which is a
required dependency of glmark2.

>
> With the dependencies you've listed, on a TI OMAP3 platform, we would
> need both Mesa *and* the ti-gfx package. Is this expected? I suppose
> that this means Mesa provides more stuff that just GL/GLES/EGL/VG. If
> that's the case, do you have a few more details?

Everything you have mentioned is completely correct.

>> +     select BR2_PACKAGE_JPEG
>> +     select BR2_PACKAGE_LIBPNG12
>> +     select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_i386 || BR2_x86_64 # libdrm
>> +     select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS # libdrm
>
> glmark2 is directly using libpciaccess and libpthread-stubs?

Fixed in recent version.

> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com



-- 
Spenser Gilliland
Computer Engineer
Doctoral Candidate

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

end of thread, other threads:[~2013-09-06 16:35 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-24 19:41 [Buildroot] [PATCH 0/6] Sunxi fixes, improve Mesa3d Support, and add glmark2 benchmark application Spenser Gilliland
2013-08-24 19:41 ` [Buildroot] [PATCH 1/6] libdrm: bump and add experimental ARM framebuffer support Spenser Gilliland
2013-08-26 17:33   ` Arnout Vandecappelle
2013-08-27  7:38   ` Thomas Petazzoni
2013-08-27 19:24     ` Spenser Gilliland
2013-08-27 20:42       ` Thomas Petazzoni
2013-08-24 19:41 ` [Buildroot] [PATCH 2/6] sunxi-mali: bug fixes for pc and init script Spenser Gilliland
2013-08-27  7:39   ` Thomas Petazzoni
2013-08-28 11:44   ` Peter Korsgaard
2013-08-24 19:41 ` [Buildroot] [PATCH 3/6] sunxi-cedarx: bump to newer version, use armel2 binaries, add demo Spenser Gilliland
2013-08-24 19:41 ` [Buildroot] [PATCH 4/6] mesa3d: reorganize, modularize, and bump to version 9.1.6 Spenser Gilliland
2013-08-25  6:45   ` Thomas De Schampheleire
2013-08-26 17:27   ` Arnout Vandecappelle
2013-08-27 18:56     ` Spenser Gilliland
2013-08-24 19:42 ` [Buildroot] [PATCH 5/6] libpng12: new package Spenser Gilliland
2013-08-26 17:21   ` Arnout Vandecappelle
2013-08-27 18:58     ` Spenser Gilliland
2013-08-24 19:42 ` [Buildroot] [PATCH 6/6] glmark2: " Spenser Gilliland
2013-08-26 17:43   ` Arnout Vandecappelle
2013-08-27 19:01     ` Spenser Gilliland
2013-08-29  5:35       ` Arnout Vandecappelle
2013-08-29 18:24         ` Spenser Gilliland
2013-08-27 20:48   ` Thomas Petazzoni
2013-09-06 16:35     ` Spenser Gilliland

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.