xdriver_xf86-video-odroidc2: new package
PATCH v2 1/3 xdriver_xf86-video-odroidc2: new package
---
v1 -> v2: (Arnout Vandecappelle)
- mail subject renamed.
- upstream updated
- removed depemdency on mesa
- added more explicit info to the patch.
- license updated
- xorg.conf is installed to /usr/share/X11 instead of /etc/X11
- added dependecy on BR2_PACKAGE_ODROID_MALI_X11
...001-c2_mali_ddx-support-cross-compilation.patch | 42 ++++++++++++++++++++++
.../x11r7/xdriver_xf86-video-odroidc2/Config.in | 18 ++++++++++ .../xdriver_xf86-video-odroidc2.hash | 2 ++ .../xdriver_xf86-video-odroidc2.mk | 23 ++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 package/x11r7/xdriver_xf86-video-odroidc2/0001-c2_mali_ddx-support-cross-compilation.patch create mode 100644 package/x11r7/xdriver_xf86-video-odroidc2/Config.in create mode 100644 package/x11r7/xdriver_xf86-video-odroidc2/xdriver_xf86-video-odroidc2.hash create mode 100644 package/x11r7/xdriver_xf86-video-odroidc2/xdriver_xf86-video-odroidc2.mk
package/x11r7/xdriver_xf86-video-odroidc2/0001-c2_mali_ddx-support-cross-compilation.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 622c02622665c0cbb35433c8f9969d41b25e028a Mon Sep 17 00:00:00 2001 +From: Dagg Stompler <[email protected]> +Date: Sat, 6 Aug 2016 09:19:08 +0300 +Subject: [PATCH] c2_mali_ddx: support cross compilation + +patch both Makefile.am and Makefile.in to support cross compilation. + +Signed-off-by: Dagg Stompler <[email protected]> +--- + src/Makefile.am | 2 +- + src/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 7fec079..6b49a16 100755 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -27,7 +27,7 @@ mali_drv_la_LDFLAGS = -module -avoid-version -L$(MALI_DDK)/lib -lMali -lUMP -lpt + mali_drv_ladir = @moduledir@/drivers + + AM_CFLAGS = @XORG_CFLAGS@ \ +- -I/usr/include/libdrm \ ++ -I$(SYSROOT)/usr/include/libdrm \ + -I$(MALI_DDK)/include \ + -I$(MALI_DDK)/internal/include/khronos \ + -I$(MALI_DDK)/src/ump/include \ +diff --git a/src/Makefile.in b/src/Makefile.in +index b30194b..2952cdc 100755 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -350,7 +350,7 @@ mali_drv_la_LTLIBRARIES = mali_drv.la + mali_drv_la_LDFLAGS = -module -avoid-version -L$(MALI_DDK)/lib -lMali -lUMP -lpthread + mali_drv_ladir = @moduledir@/drivers + AM_CFLAGS = @XORG_CFLAGS@ \ +- -I/usr/include/libdrm \ ++ -I/$(SYSROOT)/usr/include/libdrm \ + -I$(MALI_DDK)/include \ + -I$(MALI_DDK)/internal/include/khronos \ + -I$(MALI_DDK)/src/ump/include \ +-- +2.9.2 +
package/x11r7/xdriver_xf86-video-odroidc2/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ODROIDC2 + bool "xf86-video-odroidc2" + depends on BR2_aarch64 # odroid-mali X11 + depends on !BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_ODROID_MALI + select BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XPROTO_DRI2PROTO + help + odroid c2 mali 450 GPU ddx video driver + c2 upstream: https://github.com/mdrjr/c2_mali + arm upstream: http://malideveloper.arm.com/downloads/drivers/DX910/r7p0-00rel0/DX910-SW-99003-r7p0-00rel0.tgz + this driver needs a xorg.conf file which can be found + at /usr/share/X11 of the resulting image. + in addition to run a proper desktop DE, mesa swrast must be selected too. + +comment "xf86-video-odroidc2 needs X11 egl support from odroid-mali" + depends on !BR2_PACKAGE_ODROID_MALI_X11
package/x11r7/xdriver_xf86-video-odroidc2/xdriver_xf86-video-odroidc2.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Computed Locally +sha256 c442a06c1a528a64b444721ec91b903b84da36120a1b78b965196cc854c7acef xdriver_xf86-video-odroidc2-2d8e1595da7231f152b78ef8a9b9583fb585883a.tar.gz
package/x11r7/xdriver_xf86-video-odroidc2/xdriver_xf86-video-odroidc2.mk new file +23 -0
@@ -0,0 +1,23 @@ +################################################################################ +# +# xdriver_xf86-video-odroidc2 +# +################################################################################ + +XDRIVER_XF86_VIDEO_ODROIDC2_VERSION = 2d8e1595da7231f152b78ef8a9b9583fb585883a +XDRIVER_XF86_VIDEO_ODROIDC2_SITE = $(call github,mdrjr,c2_mali_ddx,$(XDRIVER_XF86_VIDEO_ODROIDC2_VERSION)) +XDRIVER_XF86_VIDEO_ODROIDC2_LICENSE = MIT +XDRIVER_XF86_VIDEO_ODROIDC2_LICENSE_FILES = README.txt +XDRIVER_XF86_VIDEO_ODROIDC2_DEPENDENCIES = \ + libdrm \ + odroid-mali \ + xserver_xorg-server \ + xproto_dri2proto + +define XDRIVER_XF86_VIDEO_ODROIDC2_INSTALL_CONF_FILE + $(INSTALL) -m 0644 -D $(@D)/src/xorg.conf $(TARGET_DIR)/usr/share/X11/xorg.conf.odroidc2 +endef + +XDRIVER_XF86_VIDEO_ODROIDC2_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_VIDEO_ODROIDC2_INSTALL_CONF_FILE + +$(eval $(autotools-package))
Signature · 1 line
2.10.1
PATCH v2 2/3 xdriver_xf86-video-odroidc2: new package
--- package/x11r7/Config.in | 1 + 1 file changed, 1 insertion(+)
package/x11r7/Config.in +1 -0
@@ -174,6 +174,7 @@ if BR2_PACKAGE_XORG7 source package/x11r7/xdriver_xf86-video-neomagic/Config.in source package/x11r7/xdriver_xf86-video-nouveau/Config.in source package/x11r7/xdriver_xf86-video-nv/Config.in + source package/x11r7/xdriver_xf86-video-odroidc2/Config.in source package/x11r7/xdriver_xf86-video-openchrome/Config.in source package/x11r7/xdriver_xf86-video-qxl/Config.in source package/x11r7/xdriver_xf86-video-r128/Config.in
Signature · 1 line
2.10.1
PATCH v2 2/3 xdriver_xf86-video-odroidc2: new package
Hello,
Quoted 10 lines · Dagg Stompler
Signed-off-by Dagg Stompler <[email protected]>--- package/x11r7/Config.in | 1 + 1 file changed, 1 insertion(+)package/x11r7/Config.in +0
-0
package/x11r7/Config.in if BR2_PACKAGE_XORG7 · line 180
Quoted 7 lines
package/x11r7/Config.in +1
-0@@ -174,6 +174,7 @@ if BR2_PACKAGE_XORG7 source package/x11r7/xdriver_xf86-video-neomagic/Config.in source package/x11r7/xdriver_xf86-video-nouveau/Config.in source package/x11r7/xdriver_xf86-video-nv/Config.in + source package/x11r7/xdriver_xf86-video-odroidc2/Config.in source package/x11r7/xdriver_xf86-video-openchrome/Config.in source package/x11r7/xdriver_xf86-video-qxl/Config.in source package/x11r7/xdriver_xf86-video-r128/Config.in
This change should be part of the patch introducing the package, there is no reason to have a separate patch for this.
Also, please add to your patch series a separate patch that adds you in the DEVELOPERS file for this package.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 3/3 odroid-mali: add support for x11 egl implementation
In reply to Dagg Stomplerallow installation of the x11 egl support required for the X11 ddx driver.
---
v1 -> v2 (Arnout Vandecappelle):
- fix install folder naming
- fix dependecies.
- introduce BR2_PACKAGE_ODROID_MALI_X11 which allows better flow control
package/odroid-mali/Config.in | 10 ++++++++++ package/odroid-mali/odroid-mali.mk | 20 +++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-)
package/odroid-mali/Config.in +10 -0
@@ -5,6 +5,11 @@ config BR2_PACKAGE_ODROID_MALI select BR2_PACKAGE_ODROID_SCRIPTS # runtime depends on BR2_TOOLCHAIN_USES_GLIBC depends on BR2_aarch64 || BR2_ARM_EABIHF + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_ODROID_MALI_X11 help Install the ARM Mali drivers for odroidc2 based systems.
@@ -20,6 +25,11 @@ config BR2_PACKAGE_PROVIDES_LIBGLES endif + +config BR2_PACKAGE_ODROID_MALI_X11 + bool + depends on BR2_aarch64 # No 32 bit version available + comment "odroid-mali needs a glibc toolchain" depends on BR2_aarch64 || BR2_ARM_EABIHF depends on !BR2_TOOLCHAIN_USES_GLIBC
package/odroid-mali/odroid-mali.mk +15 -5
@@ -11,22 +11,32 @@ ODROID_MALI_LICENSE_FILES = README.md ODROID_MALI_INSTALL_STAGING = YES ODROID_MALI_PROVIDES = libegl libgles +ODROID_MALI_SRC_ARCH = mali_libs -ifeq ($(BR2_aarch64),y) -ODROID_MALI_INSTALL_ARCH = mali_libs +ifeq ($(BR2_PACKAGE_ODROID_MALI_X11),y) +ODROID_MALI_SRC_FOLDER = x11 +# The X11 version of the headers include X11/Xlib.h and X11/Xutil.h +ODROID_MALI_DEPENDENCIES += libdrm +ODROID_MALI_DEPENDENCIES += xlib_libX11 +ODROID_MALI_DEPENDENCIES += xlib_libXdamage +ODROID_MALI_DEPENDENCIES += xlib_libXext +ODROID_MALI_DEPENDENCIES += xlib_libXfixes else -ODROID_MALI_INSTALL_ARCH = 32bit_libs +ODROID_MALI_SRC_FOLDER = fbdev +ifneq ($(BR2_aarch64),y) +ODROID_MALI_SRC_ARCH = 32bit_libs +endif endif define ODROID_MALI_INSTALL_LIBS - cp -dpfr $(@D)/fbdev/$(ODROID_MALI_INSTALL_ARCH)/lib* $(1)/usr/lib/ + cp -dpfr $(@D)/$(ODROID_MALI_SRC_FOLDER)/$(ODROID_MALI_SRC_ARCH)/lib* $(1)/usr/lib/ endef define ODROID_MALI_INSTALL_STAGING_CMDS $(call ODROID_MALI_INSTALL_LIBS,$(STAGING_DIR)) mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig cp -dpfr $(@D)/pkgconfig/*.pc $(STAGING_DIR)/usr/lib/pkgconfig/ - cp -dpfr $(@D)/fbdev/mali_headers/* $(STAGING_DIR)/usr/include + cp -dpfr $(@D)/$(ODROID_MALI_SRC_FOLDER)/mali_headers/* $(STAGING_DIR)/usr/include endef define ODROID_MALI_INSTALL_TARGET_CMDS
Signature · 1 line
2.10.1
PATCH v2 3/3 odroid-mali: add support for x11 egl implementation
Hello,
Quoted 4 lines · Dagg Stompler
allow installation of the x11 egl support required for the X11 ddx driver.
Signed-off-by Dagg Stompler <[email protected]>
I've applied, but after doing a number of changes, see below.
package/odroid-mali/Config.in config BR2_PACKAGE_ODROID_MALI · line 12
Quoted 13 lines
package/odroid-mali/Config.in +5
-0@@ -5,6 +5,11 @@ config BR2_PACKAGE_ODROID_MALI select BR2_PACKAGE_ODROID_SCRIPTS # runtime depends on BR2_TOOLCHAIN_USES_GLIBC depends on BR2_aarch64 || BR2_ARM_EABIHF + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_ODROID_MALI_X11 + select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_ODROID_MALI_X11
All those select can be simplified, i.e the "if BR2_PACKAGE_ODROID_MALI_X11" can be removed, if they are placed under the BR2_PACKAGE_ODROID_MALI_X11 option, so I've done that.
package/odroid-mali/odroid-mali.mk ODROID_MALI_LICENSE_FILES = README.md · line 14
Quoted 9 lines
package/odroid-mali/odroid-mali.mk +1
-0@@ -11,22 +11,32 @@ ODROID_MALI_LICENSE_FILES = README.md ODROID_MALI_INSTALL_STAGING = YES ODROID_MALI_PROVIDES = libegl libgles +ODROID_MALI_SRC_ARCH = mali_libs
This whole SRC_ARCH / SRC_FOLDER thing was a bit confusing, so I've replaced it with ODROID_MALI_LIBS_SUBDIR and ODROID_MALI_HEADERS_SUBDIR, which is much clearer.
package/odroid-mali/odroid-mali.mk ODROID_MALI_LICENSE_FILES = README.md · line 18
Quoted 5 lines
package/odroid-mali/odroid-mali.mk +3
-2-ifeq ($(BR2_aarch64),y) -ODROID_MALI_INSTALL_ARCH = mali_libs +ifeq ($(BR2_PACKAGE_ODROID_MALI_X11),y) +ODROID_MALI_SRC_FOLDER = x11 +# The X11 version of the headers include X11/Xlib.h and X11/Xutil.h
It's not only the headers, but also the fact that the Mali pre-built libraries are linked against X11 libraries and libdrm.
package/odroid-mali/odroid-mali.mk ODROID_MALI_LICENSE_FILES = README.md · line 23
Quoted 5 lines
package/odroid-mali/odroid-mali.mk +5
-0+ODROID_MALI_DEPENDENCIES += libdrm +ODROID_MALI_DEPENDENCIES += xlib_libX11 +ODROID_MALI_DEPENDENCIES += xlib_libXdamage +ODROID_MALI_DEPENDENCIES += xlib_libXext +ODROID_MALI_DEPENDENCIES += xlib_libXfixes
Only one assignment to ODROID_MALI_DEPENDENCIES is needed.
See
https://git.buildroot.org/buildroot/commit/?id=e1bf130ca8a52ea4d1ee39fa06abba6fa970b889
for the final commit. If you could double check that it continues to work for you, it would be nice, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 1/3 xdriver_xf86-video-odroidc2: new package
In reply to Dagg StomplerHello,
package/x11r7/xdriver_xf86-video-odroidc2/Config.in line 6
Quoted 12 lines · Dagg Stompler
package/x11r7/xdriver_xf86-video-odroidc2/Config.in new file +6
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ODROIDC2 + bool "xf86-video-odroidc2" + depends on BR2_aarch64 # odroid-mali X11 + depends on !BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_ODROID_MALI
The odroid-mali is now marked as broken. In addition, I made some comments on PATCH 2/2, which should be squashed into this PATCH 1/2. You also need to add an entry in the DEVELOPERS file.
Could you fix odroid-mali, and then send an updated version of a patch adding the xdriver_xf86-video-odroidc2 package?
package/x11r7/xdriver_xf86-video-odroidc2/Config.in
Quoted 13 lines
package/x11r7/xdriver_xf86-video-odroidc2/Config.in new file +13
-0+XDRIVER_XF86_VIDEO_ODROIDC2_VERSION = 2d8e1595da7231f152b78ef8a9b9583fb585883a +XDRIVER_XF86_VIDEO_ODROIDC2_SITE = $(call github,mdrjr,c2_mali_ddx,$(XDRIVER_XF86_VIDEO_ODROIDC2_VERSION)) +XDRIVER_XF86_VIDEO_ODROIDC2_LICENSE = MIT +XDRIVER_XF86_VIDEO_ODROIDC2_LICENSE_FILES = README.txt +XDRIVER_XF86_VIDEO_ODROIDC2_DEPENDENCIES = \ + libdrm \ + odroid-mali \ + xserver_xorg-server \ + xproto_dri2proto + +define XDRIVER_XF86_VIDEO_ODROIDC2_INSTALL_CONF_FILE + $(INSTALL) -m 0644 -D $(@D)/src/xorg.conf $(TARGET_DIR)/usr/share/X11/xorg.conf.odroidc2 +endef
Instead of this, what about installing a fragment of xorg.conf file, like package/amd-catalyst/20-fglrx.conf ? See amd-catalyst.mk for details.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com