Skip to contentSkip to conversation

mesa3d: modularize and bump to version 10.0.3

PATCH Superseded Bernd Kuhls 2 participants 5 messages Mar 9, 2014 – Mar 10, 2014 1 message not in the archive

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v4 2/5 mesa3d: modularize and bump to version 10.0.3

- add options to select mesa3d drivers
- uClibc support was fixed in mesa3d v9.2
https://bugs.freedesktop.org/show_bug.cgi?id=51782
therefore mesa3d-uclibc-locale.patch was removed
- removed MESA3D_AUTORECONF=yes as it was needed only for mesa3d-uclibc-locale.patch

---
v4: - removed even more options after intensive build tests
- renamed BR2_PACKAGE_UDEV -> BR2_PACKAGE_HAS_UDEV (Thomas)
- improved driver detection in mesa3d.mk (Thomas)
- small fixes (Thomas)
v3: - removed OpenCL and several Radeon drivers due to missing dependencies
v2: - bump to version 10.0.3
v1: - rebased on Spenser Gilliland?s patch
http://patchwork.ozlabs.org/patch/278303/
- bump to version 10.0.2
- fixed bug in variable naming BR2_PACKAGE_MESA3D_DRI_DRIVERS_* -> BR2_PACKAGE_MESA3D_DRI_DRIVER_* preventing DRI drivers from being built

 package/mesa3d/Config.in                           |  116 +++++++++++++++++++-
 package/mesa3d/mesa3d-uclibc-locale.patch          |   56 ----------
 package/mesa3d/mesa3d.mk                           |  116 ++++++++++++++++----
 .../xserver_xorg-server/xserver_xorg-server.mk     |    4 +-
 4 files changed, 209 insertions(+), 83 deletions(-)
 delete mode 100644 package/mesa3d/mesa3d-uclibc-locale.patch
package/mesa3d/Config.in +110 -6
index 0ce168e..ebbb0e1 100644
@@ -1,14 +1,118 @@
 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
+	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
 	help
 	  Mesa 3D, an open-source implementation of the OpenGL specification.
+
+	  http://mesa3d.org
+
+if BR2_PACKAGE_MESA3D
+
+# inform the .mk file of 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
+	depends on !BR2_PREFER_STATIC_LIB
+	bool
+
+comment "DRI drivers need shared libdrm"
+	depends on BR2_PREFER_STATIC_LIB
+
+config BR2_PACKAGE_MESA3D_DRIVER
+	bool
+
+menu "Drivers"
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
+	bool "Gallium nouveau driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_LIBDRM_NOUVEAU
+	help
+	  Supports all Nvidia GPUs.
+
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
+	bool "Gallium vmware svga driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_LIBDRM_VMWGFX
+	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_DRIVER_SWRAST
+	bool "DRI swrast driver"
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER
+	help
+	  This is a software opengl implementation using the DRI
+	  infrastructure.
+
+config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
+	bool "DRI i965 driver"
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER
+	select BR2_PACKAGE_LIBDRM_INTEL
+	help
+	  Supports all Intel GPUs.  This version is most supported by Intel.
+
+config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
+	bool "DRI radeon driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER
+	select BR2_PACKAGE_LIBDRM_RADEON
+	help
+	  Legacy Radeon driver for R100 series GPUs.
+
+endmenu
+
+menu "Additional API Support"
+depends on BR2_PACKAGE_MESA3D_DRIVER
+
+config BR2_PACKAGE_MESA3D_OPENGL_EGL
+	bool "EGL"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_HAS_OPENGL_EGL
+	help
+	  Use the Khronos EGL APIs. EGL is a window manager 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.
+
+endmenu
+
+config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+	default "mesa3d"
+
+config BR2_PACKAGE_PROVIDES_OPENGL_ES
+	default "mesa3d"
+
+endif
+
+comment "mesa3d needs a toolchain w/ C++, largefile"
+	depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP
package/mesa3d/mesa3d-uclibc-locale.patch deleted +0 -56

56 lines not on this page · raw message

package/mesa3d/mesa3d.mk +97 -19

132 lines not on this page · raw message

package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +2 -2
index 576579b..034b591 100644
@@ -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
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v4 2/5 mesa3d: modularize and bump to version 10.0.3

Hi bernd,

package/mesa3d/Config.in line 72

Quoted 3 lines · Bernd Kuhls
package/mesa3d/Config.in +3 -0
+config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
+	bool "DRI i965 driver"
+	depends on BR2_PACKAGE_XORG7

I don't think the dependance on XORG7 is required, see below.

Quoted 11 lines
package/mesa3d/mesa3d.mk +11 -0
+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 += \

package/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 44

Quoted 10 lines
package/mesa3d/mesa3d.mk +10 -0
+	--enable-dri \
+	--enable-shared-glapi \
+	--enable-xa
+else
+MESA3D_CONF_OPT += \
+	--disable-dri \
+	--disable-shared-glapi \
+	--disable-xa
+endif
+

I don't think you have to --disable-dri here, DRI is not only used by the xorg server packages, if you want to do hardware GL rendering without X on an intel graphic card, you still need to use the intel dri driver (i dont know about the others).

package/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 72

Quoted 12 lines
package/mesa3d/mesa3d.mk +12 -0
+# at least one API is required, for buildroot enable OpenGL API by default
+# other APIs (EGL, EGL_ES) are optional
+ifeq ($(MESA3D_GALLIUM_DRIVERS-y)$(MESA3D_DRI_DRIVERS-y),)
+MESA3D_CONF_OPT += \
+	--disable-opengl \
+	--disable-glx
+else
+MESA3D_CONF_OPT += \
+	--enable-opengl \
+	--enable-glx
+endif
+

Enabling GLX is only required if you use the Xorg server. Perhaps it should be set in "ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y)".

package/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 88

Quoted 8 lines
package/mesa3d/mesa3d.mk +8 -0
+ifeq ($(MESA3D_DRI_DRIVERS-y),)
+MESA3D_CONF_OPT += \
+	--without-dri-drivers
+else
+MESA3D_CONF_OPT += \
+	--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
+endif
+

There is a problem here, you can have the option --with-dri-drivers and --disable-dri at the same time.
Perhaps the option "--enable-dri" should be set here.

For example i can used the tool https://github.com/robclark/kmscube
without any X dependancies, by using mesa with the minimal configure options set like this :
./configure --disable-static --enable-dri --with-dri-drivers="i915" --without-gallium-drivers --disable-glx --enable-gles1 --enable-gles2 --with-egl-platforms=drm --enable-gbm

Regards,
Sebastien.

#3 lore raw

PATCH v4 3/5 xorg: Bump xserver_xorg-server version to 1.15.0

In reply to a message not in the archive

- remove patches applied upstream
- parallel make works
- add new dependency xproto_presentproto

---
v4: enabled parallel make
v3: rebased v2
v2: rebased v1

 package/x11r7/xserver_xorg-server/Config.in        |    1 +
 .../xserver_xorg-server-02-cve-2013-1940.patch     |   34 -----------
 ...ut-allocate-enough-space-for-null-charact.patch |   59 --------------------
 .../xserver_xorg-server/xserver_xorg-server.mk     |    4 +-
 4 files changed, 3 insertions(+), 95 deletions(-)
 delete mode 100644 package/x11r7/xserver_xorg-server/xserver_xorg-server-02-cve-2013-1940.patch
 delete mode 100644 package/x11r7/xserver_xorg-server/xserver_xorg-server-03-Revert-kinput-allocate-enough-space-for-null-charact.patch
package/x11r7/xserver_xorg-server/Config.in +1 -0
index 5f0c2d8..dfa7d10 100644
@@ -36,6 +36,7 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER
 	select BR2_PACKAGE_XPROTO_GLPROTO
 	select BR2_PACKAGE_XPROTO_INPUTPROTO
 	select BR2_PACKAGE_XPROTO_KBPROTO
+	select BR2_PACKAGE_XPROTO_PRESENTPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_RENDERPROTO
 	select BR2_PACKAGE_XPROTO_RESOURCEPROTO
package/x11r7/xserver_xorg-server/xserver_xorg-server-02-cve-2013-1940.patch deleted +0 -34
deleted file mode 100644
index d85494f..0000000
@@ -1,34 +0,0 @@
-From 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Mon Sep 17 00:00:00 2001
-From: Dave Airlie <[email protected]>
-Date: Wed, 10 Apr 2013 06:09:01 +0000
-Subject: xf86: fix flush input to work with Linux evdev devices.
-
-So when we VT switch back and attempt to flush the input devices,
-we don't succeed because evdev won't return part of an event,
-since we were only asking for 4 bytes, we'd only get -EINVAL back.
-
-This could later cause events to be flushed that we shouldn't have
-gotten.
-
-This is a fix for CVE-2013-1940.
-
-Signed-off-by: Dave Airlie <[email protected]>
-Reviewed-by: Peter Hutterer <[email protected]>
-Signed-off-by: Peter Hutterer <[email protected]>
----
-diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
-index ab3757a..4d08c1e 100644
---- a/hw/xfree86/os-support/shared/posix_tty.c
-+++ b/hw/xfree86/os-support/shared/posix_tty.c
-@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
- {
-     fd_set fds;
-     struct timeval timeout;
--    char c[4];
-+    /* this needs to be big enough to flush an evdev event. */
-+    char c[256];
- 
-     DebugF("FlushingSerial\n");
-     if (tcflush(fd, TCIFLUSH) == 0)
---
-cgit v0.9.0.2-2-gbebe
package/x11r7/xserver_xorg-server/xserver_xorg-server-03-Revert-kinput-allocate-enough-space-for-null-charact.patch deleted +0 -59

59 lines not on this page · raw message

package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +2 -2
index 034b591..7bbb6b1 100644
@@ -4,12 +4,11 @@
 #
 ################################################################################
 
-XSERVER_XORG_SERVER_VERSION = 1.12.4
+XSERVER_XORG_SERVER_VERSION = 1.15.0
 XSERVER_XORG_SERVER_SOURCE = xorg-server-$(XSERVER_XORG_SERVER_VERSION).tar.bz2
 XSERVER_XORG_SERVER_SITE = http://xorg.freedesktop.org/releases/individual/xserver
 XSERVER_XORG_SERVER_LICENSE = MIT
 XSERVER_XORG_SERVER_LICENSE_FILES = COPYING
-XSERVER_XORG_SERVER_MAKE = $(MAKE1) # make install fails with parallel make
 XSERVER_XORG_SERVER_INSTALL_STAGING = YES
 XSERVER_XORG_SERVER_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install install-data
 XSERVER_XORG_SERVER_DEPENDENCIES = 	\
@@ -40,6 +39,7 @@ XSERVER_XORG_SERVER_DEPENDENCIES = 	\
 	xproto_glproto 			\
 	xproto_inputproto 		\
 	xproto_kbproto 			\
+	xproto_presentproto 		\
 	xproto_randrproto 		\
 	xproto_renderproto 		\
 	xproto_resourceproto 		\
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v4 4/5 pkgconf: rewrite variable sdkdir, needed by xdriver_xf86-video-intel

In reply to a message not in the archive
---
 package/pkgconf/pkgconf-fix-variable.patch |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/pkgconf/pkgconf-fix-variable.patch +3 -1
index e19f76c..4c213d6 100644
@@ -7,17 +7,19 @@ This is sometimes used to find header files (E.G. in gst-plugins configure),
 so ensure the sysroot'ed files are used.
 
 Signed-off-by: Gustavo Zacarias <[email protected]>
+Signed-off-by: Bernd Kuhls <[email protected]>
 
 diff -Nura pkgconf-0.8.9.orig/main.c pkgconf-0.8.9/main.c
 --- pkgconf-0.8.9.orig/main.c	2012-10-24 14:32:08.236508699 -0300
 +++ pkgconf-0.8.9/main.c	2012-10-24 14:54:36.771070217 -0300
-@@ -298,7 +298,12 @@
+@@ -298,7 +298,13 @@
  	if (eflag != PKG_ERRF_OK)
  		return false;
  
 -	printf("%s\n", req.buf);
 +	if ( !strcmp(req.variable, "includedir") ||
 +	  !strcmp(req.variable, "mapdir") ||
++	  !strcmp(req.variable, "sdkdir") ||
 +	  !strcmp(req.variable, "libdir"))
 +		printf("%s%s\n", sysroot_dir, req.buf);
 +	else
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v4 5/5 xdriver_xf86-video-intel: Bump version to 2.99.910

In reply to a message not in the archive

- add necessary dependencies
- add -D_GNU_SOURCE to avoid getline compilation error

---
v4: added dependencies, fixed getline compilation error
v3: bump version to 2.99.910
v2: bump version to 2.99.909
v1: bump version to 2.99.908

 package/x11r7/xdriver_xf86-video-intel/Config.in     |   13 ++++++++-----
 .../xdriver_xf86-video-intel.mk                      |   18 +++++++++++++++---
 2 files changed, 23 insertions(+), 8 deletions(-)
package/x11r7/xdriver_xf86-video-intel/Config.in +8 -5
index 83b714a..026520c 100644
@@ -1,13 +1,16 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL
 	bool "xf86-video-intel"
-	select BR2_PACKAGE_XPROTO_FONTSPROTO
-	select BR2_PACKAGE_XPROTO_RANDRPROTO
-	select BR2_PACKAGE_XPROTO_RENDERPROTO
-	select BR2_PACKAGE_XPROTO_XPROTO
-	select BR2_PACKAGE_XLIB_LIBPCIACCESS
 	select BR2_PACKAGE_LIBDRM
 	select BR2_PACKAGE_LIBDRM_INTEL
 	select BR2_PACKAGE_MESA3D
+	select BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
+	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE
+	select BR2_PACKAGE_XLIB_LIBPCIACCESS
+	select BR2_PACKAGE_XLIB_LIBXRANDR
+	select BR2_PACKAGE_XLIB_LIBXTST
+	select BR2_PACKAGE_XPROTO_FONTSPROTO
+	select BR2_PACKAGE_XPROTO_XF86DRIPROTO
+	select BR2_PACKAGE_XPROTO_XPROTO
 	depends on (BR2_i386 || BR2_x86_64)
 	help
 	  Intel video driver
package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk +15 -3
index 332de54..e9f0bad 100644
@@ -4,12 +4,15 @@
 #
 ################################################################################
 
-XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.99.907
+XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.99.910
 XDRIVER_XF86_VIDEO_INTEL_SOURCE = xf86-video-intel-$(XDRIVER_XF86_VIDEO_INTEL_VERSION).tar.bz2
 XDRIVER_XF86_VIDEO_INTEL_SITE = http://xorg.freedesktop.org/releases/individual/driver
 XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT
 XDRIVER_XF86_VIDEO_INTEL_LICENSE_FILES = COPYING
-XDRIVER_XF86_VIDEO_INTEL_AUTORECONF = YES
+
+# this fixes a getline-related compilation in src/sna/kgem.c
+XDRIVER_XF86_VIDEO_INTEL_CONF_ENV = \
+	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
 XDRIVER_XF86_VIDEO_INTEL_CONF_OPT = \
 	--enable-dri \
@@ -23,6 +26,15 @@ XDRIVER_XF86_VIDEO_INTEL_CONF_OPT = \
 	--disable-dga \
 	--disable-async-swap
 
-XDRIVER_XF86_VIDEO_INTEL_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto libdrm xlib_libpciaccess
+XDRIVER_XF86_VIDEO_INTEL_DEPENDENCIES = \
+	libdrm \
+	mesa3d \
+	xlib_libXcomposite \
+	xlib_libXrandr \
+	xlib_libXtst \
+	xlib_libpciaccess \
+	xproto_fontsproto \
+	xproto_xproto \
+	xserver_xorg-server
 
 $(eval $(autotools-package))
Signature · 1 line
1.7.10.4