QT cross compilation for S5P4418 (Nanopi M2)
-
Hi every on
I have a NanoPi M2 board with a cortex-9 and MALI 400 GPU. This product is supported a with an image containing Qt 4.8, but I am using Qt 5.8.
I have cross compiled Qt base (version 5.8) successfully for this product with software rendering back-end (i.e. LinuxFB) and every thing is OK. However, when I cross compiled it with Mali back-end, these messages are shown when I use ssh:libEGL warning: DRI2: xcb_connect failed libEGL warning: DRI2: xcb_connect failed Could not initialize egl display
And these messages are displayed when I run my GUI program directely in device (i.e. non-ssh):
LibEGL warning: DRI2 : failed to authenticate EGL Error : Couold not create the egl surface : error = 0x3003
According to gdb back trace the QEglfsWindow::create() function is failed.
Here is my build options:
Build options: Mode ................................... release; optimized tools Building shared libraries .............. yes Using C++ standard ..................... C++11 Using gold linker ...................... yes Using new DTAGS ........................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. no Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... no Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Accessibility .......................... yes Using pkg-config ....................... yes QML debugging .......................... yes udev ................................... no Using system zlib ...................... yes Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... yes iconv .................................. yes ICU .................................... no Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no Using system PCRE ...................... no Qt Network: getaddrinfo() .......................... yes getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no OpenSSL ................................ no Qt directly linked to OpenSSL ........ no SCTP ................................... no Use system proxies ..................... yes Qt Sql: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt Gui: FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. yes Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... yes PNG .................................. yes Using system libpng ................ yes OpenGL: EGL .................................. yes Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ yes OpenGL ES 3.0 ........................ yes OpenGL ES 3.1 ........................ no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... no mtdev .................................. no tslib .................................. no xkbcommon-evdev ........................ no QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS EGLDevice ...................... no EGLFS GBM ............................ no EGLFS Mali ........................... yes EGLFS Raspberry Pi ................... no EGL on X11 ........................... no LinuxFB ................................ yes Mir client ............................. no X11: Using system provided XCB libraries .. no EGL on X11 ........................... no Xinput2 .............................. yes XCB XKB .............................. no XLib ................................. yes Xrender .............................. yes XCB GLX .............................. yes XCB Xlib ............................. yes Using system-provided xkbcommon ...... no Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... yes Note: Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx Note: PKG_CONFIG_LIBDIR automatically set to /mnt/nanopi/usr/lib/pkgconfig:/mnt/nanopi/usr/share/pkgconfig:/mnt/nanopi/usr/lib/arm-linux-gnueabihf/pkgconfig Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/nanopi Note: -optimized-tools is not useful in -release mode. Note: Dropped compiler flags '-pthread' when detecting library 'glib'. Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/mnt/nanopi/usr/local/qt5nanopi'. Prior to reconfiguration, make sure you remove any leftovers from the previous build.
-
Hi ! I have the same problem. The QT included in the last IMG doesn't include a Qmake file. So when I compile like you, it give the same error cause we need to interface with the supplied proprietary libs in /opt I think.
On the Raspberry Pi, we need to interface with the VC libs in opt/ to correctly initialise with hardware acceleration, but VC libs are only for the Broadcom chipset on the Pi. On my NanoPI, it is a S5P4418, with a Nexell backend. Maybe we have to do the same with the Nexell libs included on the IMG ? I have a Fire2A and a S2, not sure you have the same configuration as me.
Qt recognize EGL and OpenGLES 2 but can't seem to open a display without these libs.