qt5: add rPi EGL glue code
PATCH 1/2 qt5: add rPi EGL glue code
When the rpi-userland package is selected, assume we are targetting the Raspberry Pi, and add the right platform glue code when building the Qt5 EGLFS plugin.
--- package/qt5/qt5base/qt5base-mkspecs-files.patch | 5 ++++- package/qt5/qt5base/qt5base.mk | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
package/qt5/qt5base/qt5base-mkspecs-files.patch +4 -1
@@ -14,7 +14,7 @@ Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf =================================================================== --- /dev/null +++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf -@@ -0,0 +1,38 @@ +@@ -0,0 +1,41 @@ +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index +QMAKE_INCREMENTAL_STYLE = sublib
@@ -49,6 +49,9 @@ Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf + +QMAKE_LIBS += -lrt -lpthread -ldl + ++# device specific glue code ++EGLFS_PLATFORM_HOOKS_SOURCES = ++ +# Sanity check +deviceSanityCheckCompiler() +
package/qt5/qt5base/qt5base.mk +6 -0
@@ -75,6 +75,10 @@ endif ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y) QT5BASE_CONFIGURE_OPTS += -opengl es2 -eglfs QT5BASE_DEPENDENCIES += libgles libegl +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES = \ + $(@D)/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +endif else QT5BASE_CONFIGURE_OPTS += -no-opengl -no-eglfs endif
@@ -125,6 +129,8 @@ define QT5BASE_CONFIGURE_CMDS $(call QT5BASE_CONFIG_SET,CROSS_COMPILE,$(TARGET_CROSS)) $(call QT5BASE_CONFIG_SET,COMPILER_CFLAGS,$(TARGET_CFLAGS)) $(call QT5BASE_CONFIG_SET,COMPILER_CXXFLAGS,$(TARGET_CXXFLAGS)) + $(call QT5BASE_CONFIG_SET,EGLFS_PLATFORM_HOOKS_SOURCES, \ + $(QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES)) (cd $(@D); \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
Signature · 1 line
1.7.10.4
PATCH 2/2 rpi-userland: add bcm_host to egl.pc
bcm_host is the Broadcom hardware interface library And is currently a dependency to use the EGL functions
--- package/rpi-userland/rpi-userland-add-pkgconfig-files.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
package/rpi-userland/rpi-userland-add-pkgconfig-files.patch +4 -3
@@ -9,7 +9,7 @@ Index: b/interface/khronos/egl/egl.pc.in =================================================================== --- /dev/null +++ b/interface/khronos/egl/egl.pc.in -@@ -0,0 +1,10 @@ +@@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib
@@ -18,8 +18,9 @@ Index: b/interface/khronos/egl/egl.pc.in +Name: egl +Description: RasberryPi implementation of EGL +Version: 1.0 -+Libs: -L${libdir} -lEGL -lGLESv2 -+Cflags: -I${includedir}/ -I${includedir}/interface/vcos/pthreads/ ++Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host ++Cflags: -I${includedir}/ -I${includedir}/interface/vcos/pthreads/ \ ++ -I${includedir}/interface/vmcs_host/linux/ Index: b/interface/khronos/CMakeLists.txt =================================================================== --- a/interface/khronos/CMakeLists.txt
Signature · 1 line
1.7.10.4
PATCH 1/2 qt5: add rPi EGL glue code
In reply to Floris BosDear Floris Bos,
Quoted 5 lines · Floris Bos
When the rpi-userland package is selected, assume we are targetting the Raspberry Pi, and add the right platform glue code when building the Qt5 EGLFS plugin.
Signed-off-by Floris Bos <[email protected]>
Thanks. I've applied your 3 patches (the two ones related to Rasberry Pi), and the one related to installation of fonts. They will be sent when I send the next version of my Qt5 pull request.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com