Qt Embedded Linux

How to compile Qt SDK for Apalis iMX6Q

Go to your Yocto project directory
$ source export
$ bitbake meta-toolchain-qt5
$ chmod +x angstrom-glibc-x86_64-armv7at2hf-neon-v2017.12-toolchain.sh
$ ./angstrom-glibc-x86_64-armv7at2hf-neon-v2017.12-toolchain.sh
$ source environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi
$ QtCreator

How to configure Qt Creator

  • Press Add and choose Generic Linux Device
  • Specify a name
  • Specify Device’s IP Address and Port(Host,Port)
  • Authentication type
  • Choose the Qt Versions tab
  • Press Add
  • Choose:
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qmake2
  • Fill in a name
  • Press Add
  • Fill in a name: GCC (Qt Embedded)
  • Compiler path:
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-g++
  • ABI should be detected automatically
  • Press Add
  • Name: GDB (Qt Embedded)
  • Fill in the path:
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-gdb
  • Press Add
  • Fill in a name: Toradex
  • Device: IMX6
  • Sysroot:
/usr/local/oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi
  • Compiler: GCC (Qt Embedded)
  • Debugger: GDB (Qt Embedded)
  • Qt mkspec: leave empty
$ scp my_program root@192.168.1.2:/home
$ ssh 192.168.1.2
$~ ./my_program

How to configure EGLFS

# QT_LOGGING_RULES=qt.qpa.*=true
# export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
# export QT_QPA_EGLFS_KMS_CONFIG=example.json
{
"device": "/dev/dri/card1",
"hwcursor": false,
"pbuffers": true,
"outputs": [{"name": "HDMI1","primary": true,"mode": "1280x720"}]
}
# ./my_program --platform eglfs

Reference

  1. Embedded Linux Projects Using Yocto Project Cookbook
  2. https://doc.qt.io/qt-5/embedded-linux.html
  3. https://developer.toradex.com/knowledge-base/how-to-set-up-qt-creator-to-cross-compile-for-embedded-linux

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store