I have built Qt before for other devices, but I am missing some specifics for iMX8M.
Qt source comes with a configuration tool. I have most of the configuration details correct, but some configuration dealing with using SIMD instructions/neon, are not correct.
I imagine when I build Qt with Yocto, it is under the hood doing this configuration, and if I can figure out the parameters it is using I can build it, too. I built using:
DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b build-wayland
and this works great. Any ideas of where to look for the configuration being used (like maybe some log or other build artifact?)
Thanks in advance,
You can read the i.MX_Yocto_Project_User's_Guide and i.MX_Linux_User's_Guide about the information of QT in the BSP.
you can find the QT related receipts in the meta-fsl-bsp-release/imx/meta-sdk
Thanks for the info of how to build Qt INSIDE of Yocto. In my message I mentioned, I already know how to do that. This was how I bitbaked it from my message:
So this was not the question I asked. I've read the documentation several times and committed it to memory.
What I need to do to run static analysis is to build OUTSIDE of Yocto (no bitbaking...) This process consists of running Qt's configure script with certain parameters and point it to an arcane device file that mentions how to use the GPU for graphics, and other board specifics. Then do make and make install.
I need to know the correct parameters for iMX8 for this device file. Qt already includes device files for iMX6 and iMX7. This device file should come from NXP together with the iMX8M EVK board. TI would provide it as would others.
Looks like I will have to write the device file myself...
I known you already know how to use bitbake command to build the QT. I wanted to tell you was that the location of the receipts for QT. You may found the parameters that you needed from the receipts.
You mentioned the device files for i.MX6 and i.MX7. Could you show me an example? so I can try to find it for i.MX8.
The device files for iMX6 and iMX7 are in the Qt 5.10.1 source under /path_to/5.10.1/Src/qtbase/mkspecs/devices/ In this folder there are folders for linux-imx6-g++, linux-imx7-g++, linux-imx53qsb-g++. These each contain a qmake.conf and a qplatformdefs.h file. The interesting file is the qmake.conf. Here are the contents of the one for iMX6:
# qmake configuration for the Freescale iMX6 boards (single, dual and quad)
# The configuration below is set up for running with EGL on the framebuffer via
# the eglfs platform plugin and its eglfs_viv backend.
# Wayland is also fully functional out of the box. However, when writing Wayland
# *compositors* with Qt, the eglfs backend will have to be switched to
# eglfs_viv_wl by setting the QT_QPA_EGLFS_INTEGRATION environment variable.
# Below is an example configure line that assumes the SDK is in
# $HOME/imx6/toolchain. On device Qt is expected to be placed under
# /usr/local/qt5 whereas on the host 'make install' will copy the host tools and
# the target libraries to $HOME/imx6/qt5.
# ./configure -prefix /usr/local/qt5 -extprefix $HOME/imx6/qt5 -device linux-imx6-g++ \
# -device-option CROSS_COMPILE=$HOME/imx6/toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- \
# -sysroot $HOME/imx6/toolchain/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi \
# -nomake examples -nomake tests -v
QMAKE_LIBS_EGL += -lEGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS += $$IMX6_CFLAGS
QMAKE_CXXFLAGS += $$IMX6_CFLAGS
DISTRO_OPTS += hard-float
# Preferred eglfs backend
EGLFS_DEVICE_INTEGRATION = eglfs_viv
I made a tentative one for iMX8; Qt builds with the SDK associated with this distro:
Not sure if it will fully work on the iMX8M EVK board by NXP (haven't figured out the correct combination of EGL/OPENGL - This is the heart of the detail I need to understand - BTW, I needed to define EGL_API_FB=1 to prevent Qt trying to pull in X11 which is not in fsl-imx-wayland, but I don't know if it is appropriate for this EVK board):
QMAKE_AR = aarch64-poky-linux-ar cqs
#QMAKE_LIBS_EGL += -lEGL
#QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
#QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
#IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
#IMX8_CFLAGS = -march=armv8-a -mtune=cortex-a53 -DLINUX=1
## Below needs -DEGL_API_FB=1, otherwise Qt will pull in X11!!!
IMX8_CFLAGS = -march=armv8-a -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS += $$IMX8_CFLAGS
QMAKE_CXXFLAGS += $$IMX8_CFLAGS
#DISTRO_OPTS += hard-float
# Preferred eglfs backend
#EGLFS_DEVICE_INTEGRATION = eglfs_viv
# for wayland
EGLFS_DEVICE_INTEGRATION = eglfs_viv_wl
Thanks for your help,