Qt version in Morty is pretty old. I rebuilt Qt for the i.MX8 from most recent sources pretty easily. I thought I’d post a successful command line. You have to first build the SDK from source using the usual instructions for Yocto/OE and then install. The resulting examples all run on the i.MX8 Apalis eval card. Please note some of them provoke the power starvation erratum in the Apalis carrier board datasheet.
These instructions will be superseded later by some official build sequence from Qt, but for early eval this can help get started for a few weeks or so.
I assume below some familiarity with building Qt from source. I can’t guarantee this is the optimum setup but it does create programs that run on the target so it’s close. Others may have improvements.
First, you have to make a device for the i.MX8. I made a directory in qtbase/devices called linux-imx8-g++. It has to have the two usual files. The qplatform defs file is the same as the imx6.
qmake.conf
include(../common/linux_device_pre.conf)
QMAKE_LIBS_EGL += -lEGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
#IMX8_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX8_CFLAGS = -DLINUX=1
QMAKE_CFLAGS += $$IMX8_CFLAGS
QMAKE_CXXFLAGS += $$IMX8_CFLAGS
DISTRO_OPTS += aarch64
# Preferred eglfs backend
EGLFS_DEVICE_INTEGRATION = eglfs_viv
include(../common/linux_arm_device_post.conf)
load(qt_config)
Then, in a shadow build directory parallel to qt-everywhere-src-5.11.1, the commands were:
export QT5PREFIX=/opt/qt5
../qt-everywhere-src-5.11.1/configure \
-v \
-opensource -confirm-license \
-prefix $QT5PREFIX \
-device linux-imx8-g++ \
-sysroot /opt/fsl-imx-x11/4.9.51-mx8-beta/sysroots/aarch64-poky-linux \
-device-option CROSS_COMPILE=/opt/fsl-imx-x11/4.9.51-mx8-beta/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux- \
-sql-mysql \
To install I made a USB jump drive and a link -s for /opt/qt5. Other than needing to export LD_LIBRARY_PATH as /opt/qt5/lib, nothing else was needed to run the examples.