7
linux rasp pi4 X11 EGLFS
Mehran Dehghanian edited this page 4 years ago
Install packages on RPI
// RPI4 OpenGL Support
apt-get install libgles2-mesa-dev
sudo apt install libgbm-dev libdrm-dev
apt-get install xorg-dev
// Packages recommended by tal.org
apt install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libraspberrypi-dev
// Packages recommended by wiki.qt.io
sudo apt-get build-dep qt4-x11
sudo apt-get build-dep libqt5gui5
sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0
// Note that we have to use gcc8 for this build otherwise we will face error in configuration step // GCC8 will be attached to the repository for further usage
// Configuration
../configure -release -opengl es2 -make libs -nomake tests -nomake examples -skip wayland -skip qtscript -skip qtwebengine -skip location -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=/media/mehran/extra4/Qt5Pi4/raspi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf- -sysroot /media/mehran/extra4/Qt5Pi4/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /media/mehran/extra4/Qt5Pi4/raspi/qt5pi -hostprefix /media/mehran/extra4/Qt5Pi4/raspi/qt5 -v -no-use-gold-linker
Fix:
Running on a software rasterizer (LLVMpipe), expect limited performance.
sudo gpasswd -a pi render
https://bugreports.qt.io/browse/QTBUG-76889
Fix
Propblem with application running too early and can't access HDMI output.
Add this to [Service] tab in systemd file
Type=idle
Note
In the last attemp, installing all the packages above didn't worked. I Had to do every step like EGLFS2 guide but added
sudo apt install libgbm-dev libdrm-dev
I also built Qt5.12.11 with gcc7.2 using following configuration:
../configure -release -opengl es2 -make libs -nomake tests -nomake examples -skip wayland -skip qtscript -skip qtwebengine -skip location -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=/media/mehran/extra3/Qt5Pi4X11/raspi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf- -sysroot /media/mehran/extra3/Qt5Pi4X11/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /media/mehran/extra3/Qt5Pi4X11/raspi/qt5pi -hostprefix /media/mehran/extra3/Qt5Pi4X11/raspi/qt5 -v -no-use-gold-linker
Configuration output is like this:
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yes
gcc7.4 file name:
gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz