Yocto Qt sdk installation

Yocto Qt SDK Installation

Environment

Linux OS (Ubuntu 14.04)
QT 5.x (Qt creator 3.4.x or later)

Target OS version: yocto 1.6.2

Download:

  1. SDK file: poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.62.sh
  2. QT creator 3.4.2: qt-creator-opensource-linux-x86_64-3.4.2.run
    (You could find other version from Qt website)

Set-up step:

Install yocto sdk in your PC

1
2
3
$ sh ./poky-eglibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.62.sh
destination path: “/opt/poky/1.6.2
1
2
$ chmod _x qt-creaotr-opensource-linux-x86_64-3.4.2.run
$ ./qt-creaotr-opensource-linux-x86_64-3.4.2.run

Setup building environment for yocto in QT Creator

(e.g.) Assume the QT creator is locate in: ~/qtcreator-3.4.2/bin

$ ~/qtcreator-3.4.2/bin/qtcreator.sh
1
2
3
4
5
6
7
#### Setup yocto sdk environment
Select menu bar "Tools -> Option"
##### Build & Run -> Compilers -> Add Add → GCC (e.g.)Name: yocto-1.6.2 Path: Path :/opt/poky/1.6.2/sysroots/x86-64-pokysdk-linux/usr/bin/arm-pocky-linux-quneabi-g++ ##### Build & Run -> Debugger -> Add (e.g.) Name: debugger-yocto1.6.2 Source Path: Miruki/opt/poky/1.6.2/sysroots/x86-64-pockysdk-linux/usr/bin/arm-pocky-linux-gnuaebi/arm-pocky-linux-gnuaebi-gdb ##### Build & Run -> Qt version -> Add… Add → GCC
(e.g.)Name: Qt-yocto-2.0.5.5.1(qt5) Path: /opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake ##### Build & Run -> Kits -> Add Add → GCC
(e.g.)Name: yocto-1.6.2-kit Device type: Generic Linux Device Sysroots: /opt/poky/1.6.2/sysroots/cortexta9hf-vfp-neon-poky- linux-gnueabi Compiler : GCC-yocto1.6.2 Debugger : debugger-yocto1.6.2 Qt version :Qt 5.2.1 (qt5) #### Init yocto environment Close Qt Creator which is opened in the last step
$ cd /opt/poky/1.6.2 /* change to yocto sdk directory */ $ source /opt/poky/1.6.2/environment-setup-cortexta9hf-vfp-neon-poky- linux-gnueabi /* run yocto sdk environment script by this command: */ $ ~/qtcreator-3.4.2/bin/qtcreator.sh /* run Qt creator again */

After these actions, you can build Qt application in our yocto system.

Reference

  1. Install Qt 5 on Ubuntu
  2. How to install Qt Creator