Setting a cross compile QT for IMX boards (Arm64) is a hectic task. Many developers face difficulty in setting environment for QT5 application development for embedded products like imx.
Thanks to freescale imx who offers meta-toolchain-QT5. This toolchain makes cross compile QT for IMX boards easier. In this tutorial, we will guide you how to setup meta-toolchain-QT5 for your imx boards in 5 simple steps.
After completing this tutorial, you will be able to rapidly build and deploy QT5 application for you freescale boards. So, lets get started now!
To install this toolchain, you must have setup Yocto environment for your freescale imx board. Almost every imx project have its yocto build. If your project doesn’t have yocto build, you can make it now following this tutorial.
Steps to Cross Compile QT for IMX Boards:
Configure your yocto project according to your board and distro using the below commands.
Cd /path/to/your/yocto/project machine=your-board-name Distro=fsl-imx-wayland . setup-release.sh
Comment the 2 lines in build/local.conf. You can open this file with your favourite editor like vi, nano or whatever.
Comment these two lines as shown in the screenshot below.
Build the toolchain SDK using the below command
Install the SDK in your host machine.
Cd /path-to-your-yocto-project/build/tmp/deploy/sdk ./fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-cortexa35-imx8qxpc0mek-toolchain-5.10-gatesgarth.sh
The shell script name might be little different depending on your yocto project.
Press Y at every step while installation
You will see the below logs after QT cross compile toolchain installation.
Setting it up…done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g .
Simply paste the last line in step 4 any terminal session to compile QT. After completing this step, you can compile any QT application for imx boards.