building QT5 with EGLFS backend without X11

Post Reply
michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

building QT5 with EGLFS backend without X11

Unread post by michalrgb » Tue Jun 11, 2019 7:37 pm

I would like to use qt app with eglfs without x11 but with opengl es. Im using updated minimal image with 4.9.180-30 kernel. Then i tried install and run example

Code: Select all

sudo apt-get install qtbase5-examples

Code: Select all

/usr/lib/aarch64-linux-gnu/qt5/examples/opengl/cube/cube --platform eglfs
and i got
Could not find DRM device!
Aborted


with -linuxfb i got grey screen and cursor appear but

Code: Select all

/usr/lib/aarch64-linux-gnu/qt5/examples/opengl/cube/cube --platform linuxfb
i got
QOpenGLWidget is not supported on this platform.
This plugin does not support createPlatformOpenGLContext!
This plugin does not support createPlatformOpenGLContext!
QOpenGLWidget: Failed to create context
This plugin does not support createPlatformOpenGLContext!
QOpenGLWidget: Failed to create context
This plugin does not support createPlatformOpenGLContext!
QOpenGLWidget: Failed to create context


but other examples without opengl works well with linuxfb. For example

Code: Select all

/usr/lib/aarch64-linux-gnu/qt5/examples/gui/rasterwindow/rasterwindow --platform linuxfb
How to make work opengl examples via eglfs?

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Wed Jun 12, 2019 3:05 am

Qt5 is by default compiled against OpenGL on arm64 and needs to be recompiled for OpenGL ES, and while you at it, you can simply build it against eglfs and skip the X11 part all together.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Wed Jun 12, 2019 6:42 pm

im trying to build qt-everywhere-src-5.12.3 with

Code: Select all

./configure -prefix "/home/odroid/qt/build" -release -confirm-license -opensource -eglfs -platform linux-odroid-n2-g++ -opengl es2 -no-pch
but im getting
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
my qmake.conf is

Code: Select all

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib


QMAKE_INCDIR += \
    /usr/include

QMAKE_LIBDIR += \
    /usr/lib \
    /lib/aarch64-linux-gnu \
    /usr/lib/aarch64-linux-gnu

QMAKE_LIBS_EGL         += -lEGL -lMali
QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL -lmali
QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL

QMAKE_LFLAGS += \
    /usr/lib \
    /usr/lib/aarch64-linux-gnu \
    /lib/aarch64-linux-gnu

QMAKE_LIBS             += -lrt -lpthread -ldl

DISTRO_OPTS                  += aarch64
COMPILER_FLAGS               += -mtune=cortex-a53 -march=armv8-a -DWIN_INTERFACE_CUSTOM

QMAKE_INCDIR_EGL += /usr/include
QMAKE_LIBDIR_EGL += /usr/lib/aarch64-linux-gnu/
libraries are in

Code: Select all

root@odroid:~/qt-everywhere-src-5.12.3# ls -l /usr/lib/aarch64-linux-gnu/libG*
lrwxrwxrwx 1 root root      14 May 10 12:17 /usr/lib/aarch64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root  972968 May 10 12:17 /usr/lib/aarch64-linux-gnu/libGL.so.1.0.0
lrwxrwxrwx 1 root root      17 Mar 28 12:31 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so -> libGLESv1_CM.so.1
lrwxrwxrwx 1 root root      19 Mar 28 12:31 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1
lrwxrwxrwx 1 root root      10 Mar 28 12:31 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so.1.1 -> libMali.so
lrwxrwxrwx 1 root root      14 Mar 28 12:31 /usr/lib/aarch64-linux-gnu/libGLESv2.so -> libGLESv2.so.2
lrwxrwxrwx 1 root root      16 Mar 28 12:31 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.0
lrwxrwxrwx 1 root root      10 Mar 28 12:31 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2.0 -> libMali.so
lrwxrwxrwx 1 root root      15 May 10 12:17 /usr/lib/aarch64-linux-gnu/libGLX.so.0 -> libGLX.so.0.0.0
-rw-r--r-- 1 root root   63880 May 10 12:17 /usr/lib/aarch64-linux-gnu/libGLX.so.0.0.0
lrwxrwxrwx 1 root root      16 Feb  8 22:02 /usr/lib/aarch64-linux-gnu/libGLX_indirect.so.0 -> libGLX_mesa.so.0
lrwxrwxrwx 1 root root      20 Feb  8 22:02 /usr/lib/aarch64-linux-gnu/libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
-rw-r--r-- 1 root root  422408 Feb  8 22:02 /usr/lib/aarch64-linux-gnu/libGLX_mesa.so.0.0.0
lrwxrwxrwx 1 root root      22 May 10 12:17 /usr/lib/aarch64-linux-gnu/libGLdispatch.so.0 -> libGLdispatch.so.0.0.0
-rw-r--r-- 1 root root 1030368 May 10 12:17 /usr/lib/aarch64-linux-gnu/libGLdispatch.so.0.0.0
do i miss something?

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Wed Jun 12, 2019 8:29 pm

now i install this driver malig52-fbdev-opencl-odroid_20190327-r12p0-1_arm64.deb and with default mkspec linux-aarch64-gnu-g++ im able to pass configure with this setting

Code: Select all

./configure -prefix "/home/odroid/qt/build" -release -confirm-license -opensource -platform linux-aarch64-gnu-g++ -opengl es2 -no-pch -no-xcb -skip wayland -skip webengine
now i have to wait for build to finish

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Thu Jun 13, 2019 2:02 am

build was successful except qssl but i was able to install it and i have same issue with eglfs. Im getting

Code: Select all

root@odroid:/home/odroid/qt/build# examples/gui/openglwindow/openglwindow --platform eglfs
Could not open egl display
Aborted
strace output show it is missing libgbm.so.1

Code: Select all

mmap(NULL, 115840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f9a29c000
mprotect(0x7f9a2a7000, 61440, PROT_NONE) = 0
mmap(0x7f9a2b6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa000) = 0x7f9a2b6000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/tls/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/aarch64-linux-gnu/tls/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/tls/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/aarch64-linux-gnu/tls", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/aarch64-linux-gnu/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/aarch64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/tls/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/tls/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/tls/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/tls", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=36864, ...}, 0) = 0
openat(AT_FDCWD, "/lib/tls/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/tls/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/tls/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/tls", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/tls/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/tls/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/tls/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/tls", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/aarch64", 0x7fc344ae10, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/libgbm.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
munmap(0x7f9a6ee000, 55753)             = 0
munmap(0x7f9a376000, 278072)            = 0
munmap(0x7f9a362000, 77896)             = 0
munmap(0x7f9a350000, 69664)             = 0
munmap(0x7f9a320000, 193112)            = 0
munmap(0x7f9a30c000, 77912)             = 0
munmap(0x7f9a2f5000, 90184)             = 0
munmap(0x7f9a2e2000, 73800)             = 0
munmap(0x7f9a2cc000, 86112)             = 0
munmap(0x7f9a2b9000, 73840)             = 0
munmap(0x7f9a29c000, 115840)            = 0
futex(0x7f9a6ed3e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "Could not open egl display\n", 27Could not open egl display
) = 27
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid()                                = 2340
gettid()                                = 2340
tgkill(2340, 2340, SIGABRT)             = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=2340, si_uid=0} ---
+++ killed by SIGABRT +++
Aborted
after installing libgbm-dev i realized, that libgbm.so have broken link to libgbm.so.1.0.0, so i linked it against /usr/lib/aarch64-linux-gnu/libMali.so, not sure if it was good idea. Program still "Could not open egl display"

Code: Select all

openat(AT_FDCWD, "/usr/lib/libgbm.so.1", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\312'\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=45800368, ...}) = 0
mmap(NULL, 37949952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f96258000
mprotect(0x7f984ed000, 65536, PROT_NONE) = 0
mmap(0x7f984fd000, 1421312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2295000) = 0x7f984fd000
mmap(0x7f98658000, 201216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f98658000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libwayland-server.so.0", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20c\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=68704, ...}) = 0
mmap(NULL, 132536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f96237000
mprotect(0x7f96246000, 61440, PROT_NONE) = 0
mmap(0x7f96255000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xe000) = 0x7f96255000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\200:\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=190536, ...}) = 0
mmap(NULL, 254120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f961f8000
mprotect(0x7f96224000, 65536, PROT_NONE) = 0
mmap(0x7f96234000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2c000) = 0x7f96234000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libdrm.so.2", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20=\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=59672, ...}) = 0
mmap(NULL, 125816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f961d9000
mprotect(0x7f961e7000, 61440, PROT_NONE) = 0
mmap(0x7f961f6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xd000) = 0x7f961f6000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libglapi.so.0", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0 0\1\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=227416, ...}) = 0
mmap(NULL, 297168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f96190000
mprotect(0x7f961c1000, 61440, PROT_NONE) = 0
mmap(0x7f961d0000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x30000) = 0x7f961d0000
mmap(0x7f961d8000, 2256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f961d8000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0`\16\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=10248, ...}) = 0
mmap(NULL, 73976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f9617d000
mprotect(0x7f9617f000, 61440, PROT_NONE) = 0
mmap(0x7f9618e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x7f9618e000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\200\22\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=18368, ...}) = 0
mmap(NULL, 82040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f96168000
mprotect(0x7f9616c000, 61440, PROT_NONE) = 0
mmap(0x7f9617b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x3000) = 0x7f9617b000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libffi.so.6", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300\27\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=30920, ...}) = 0
mmap(NULL, 95648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f96150000
mprotect(0x7f96157000, 61440, PROT_NONE) = 0
mmap(0x7f96166000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x6000) = 0x7f96166000
close(4)                                = 0
faccessat(AT_FDCWD, "/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libbsd.so.0", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0205\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=71824, ...}) = 0
mmap(NULL, 139248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f9612e000
mprotect(0x7f9613e000, 65536, PROT_NONE) = 0
mmap(0x7f9614e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x10000) = 0x7f9614e000
close(4)                                = 0
mprotect(0x7f9614e000, 4096, PROT_READ) = 0
mprotect(0x7f96166000, 4096, PROT_READ) = 0
mprotect(0x7f9617b000, 4096, PROT_READ) = 0
mprotect(0x7f9618e000, 4096, PROT_READ) = 0
mprotect(0x7f961d0000, 28672, PROT_READ) = 0
mprotect(0x7f961f6000, 4096, PROT_READ) = 0
mprotect(0x7f96234000, 8192, PROT_READ) = 0
mprotect(0x7f96255000, 8192, PROT_READ) = 0
mprotect(0x7f986a4000, 8192, PROT_READ) = 0
mprotect(0x7f986b8000, 4096, PROT_READ) = 0
mprotect(0x7f9873c000, 4096, PROT_READ) = 0
mprotect(0x7f986ce000, 4096, PROT_READ) = 0
mprotect(0x7f986e1000, 4096, PROT_READ) = 0
mprotect(0x7f986f8000, 4096, PROT_READ) = 0
mprotect(0x7f9870c000, 4096, PROT_READ) = 0
mprotect(0x7f9874e000, 4096, PROT_READ) = 0
mprotect(0x7f98762000, 4096, PROT_READ) = 0
munmap(0x7f98adc000, 56004)             = 0
munmap(0x7f98764000, 278072)            = 0
munmap(0x7f98750000, 77896)             = 0
munmap(0x7f9873e000, 69664)             = 0
munmap(0x7f986fa000, 77912)             = 0
munmap(0x7f986e3000, 90184)             = 0
munmap(0x7f986d0000, 73800)             = 0
munmap(0x7f986ba000, 86112)             = 0
munmap(0x7f9870e000, 193112)            = 0
munmap(0x7f986a7000, 73840)             = 0
munmap(0x7f96258000, 37949952)          = 0
munmap(0x7f96237000, 132536)            = 0
munmap(0x7f9868a000, 115840)            = 0
munmap(0x7f961f8000, 254120)            = 0
munmap(0x7f961d9000, 125816)            = 0
munmap(0x7f96190000, 297168)            = 0
munmap(0x7f9617d000, 73976)             = 0
munmap(0x7f96168000, 82040)             = 0
munmap(0x7f96150000, 95648)             = 0
munmap(0x7f9612e000, 139248)            = 0
futex(0x7f98adb3e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "Could not open egl display\n", 27Could not open egl display
) = 27
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid()                                = 2565
gettid()                                = 2565
tgkill(2565, 2565, SIGABRT)             = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=2565, si_uid=0} ---
+++ killed by SIGABRT +++
any help?

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Thu Jun 13, 2019 2:32 am

I wonder why it's trying to use libgbm at all as it should not being required for fbdev.
Maybe there's an option to exclude gbm from the build process.

Also you try to run a demo that has "gui" and "windows" in the name, where fbdev does not provide a gui or a window mode.
Maybe the name is misleading, but I would try to run a different demo as well to make sure it's not the demo that's not working here.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Thu Jun 13, 2019 6:14 pm

I just figured it out, i checked which version of libGLESv2 it is using, and it was link against file from repository libGLESv2.so.2.0.0, so i relinked it against libMali.so and i'm able to run opengl example with eglfs with QT_QPA_EGLFS_INTEGRATION=eglfs_mali. Now im trying to build it with gstreamer so im able to try qtmultimedia plugin, but im bit skeptic if it will be HW accelerated.

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Thu Jun 13, 2019 10:43 pm

it won't be hardware accelerated.. in "BEST" case the color conversion is done via GLES, or resizing of the image. But the decoding is done via software decoder.
Qt is just for the "menu".
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Thu Jun 13, 2019 10:50 pm

is there any way how to make hw decoded video via qtmultimedia?

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Fri Jun 14, 2019 1:37 am

unlikely... there's already c2play and kplayer (from amlogic build tree) and Kodi that works.
Not sure why someone would pick up qtmediaplayer for this nor implement code to do this.
This is actually quite hard, since the video plane is a different plane than the OpenGL ES plane of Qt as video decoding is running completely outside of any "normal player" for AmLogic devices.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Fri Jun 14, 2019 2:02 am

i just compiled QtAV https://github.com/wang-bin/QtAV (its using ffmpeg)instead of qtmultimedia and its much faster and working ok, but its using lot of CPU 400%+. I was wondering if i can compile it with c2_aml_libs to get ffmpeg accelerated and there will be any difference. But you saying that amlogic is decoding video not usual way, so maybe there will be difference with mainline kernel? Im bit lost now how it is actually working and im sorry keeping asking for impossible maybe for but i will be glad for any more hints.

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Fri Jun 14, 2019 4:17 pm

c2_aml_libs are not ffmpeg and ffmpeg has no connector for c2_aml_libs. This won't work.
If it was just a matter of checking a checkbox and everything works with AML decoder, no one would bother creating specific player for these boards to get ANYTHING out of it.
Means this is not an "easy task" (might even be impossible).

Question stays why you need these Qt application to watch movies when there are already other (command-line) video player that are working.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Fri Jun 14, 2019 4:41 pm

I need it to be able to make some geometric operation on video like skew, zoom, rotation, perspective correction etc, so basically it is video texture on plane. So i have to fast decode video on VPU and do that operations on GPU i guess? Maybe it will be possible within kodi?

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Fri Jun 14, 2019 4:48 pm

But that's the thing.. AML decoder does not support this.
There is no video texture on a plane... the video plane is SEPARATED from the movie player, the player can not change the video layer.
By default it's always just a full-screen layer that is OVER your display layer.
There is no "window mode" for the video frame. Even on the C2 which has X11 drivers, and has Kodi to play hardware accelerated videos, it can only does so in full screen mode... window mode is not supported, not a manipulation of a "video window".
Only full-screen, nothing else.
You have to change the resolution of your display to change the resolution of the video.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Fri Jun 14, 2019 5:21 pm

Ok, i got it, so the main problem is with the amlogic decoder. I found out that AML-S905X-CC from librecomputer(similar to odroid c2) with kernel 4.19 support H.265 and H.264 via V4L2 M2M. So its not using amlogic decoder but via V4L2 M2M, im right(i didn't try it yet)? So theoretically it can be way to wait if they will do similar decoder for s922x?

User avatar
meveric
Posts: 10177
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by meveric » Fri Jun 14, 2019 7:44 pm

There was a thread about this on the C2 forum which I can't find at the moment.
You need a upstream Kernel which does support the AML decoder (which is already hard, as that is something that is not part of the normal upstream Kernel).

No matter how you turn it, it does not exist at the moment.
There is a upstream Kernel for the N2, but guess what it doesn't have?
If you guess hardware decoder you're right ;)
These users thanked the author meveric for the post:
michalrgb (Sat Jun 15, 2019 9:13 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

michalrgb
Posts: 11
Joined: Tue Jun 11, 2019 6:06 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: building QT5 with EGLFS backend without X11

Unread post by michalrgb » Sat Jun 15, 2019 9:16 pm

Thanks for making it more clear to me. I will try more experiments with s905x now, and i will let odroid n2 sleep for little while.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests