Skip to main content

Qt for Device Creation - Boot2Qt

Introduction​

This guide provides you with step-by-step instructions for how to get started with Boot2Qt for Embedded Artists iMX6, iMX7, and iMX8 based COM boards. Boot2Qt is part of Qt for Device Creation and is a light-weight, Qt-optimized, full software stack for embedded Linux systems.

The Boot2Qt demo is currently available for:

note

It is possible to test and evaluate Boot2Qt by following these instructions, but if you would like to develop your own application and sell a product you must have a commercial license from Qt.

https://www.qt.io/licensing/

Additional documentation​

Build Boot2Qt Linux image​

Requirements​

If you plan to build a Boot2Qt image you need a Linux host machine that is setup in the same way as when working with Yocto. The instructions in this guide have been tested on a machine running Ubuntu 18.04.

Install required packages:

sudo apt-get install gawk curl git-core git-lfs diffstat unzip p7zip-full texinfo gcc-multilib build-essential chrpath libsdl1.2-dev xterm gperf bison g++-multilib git-lfs install

If you get build errors that could be related to missing packages, please look at the required packages listed in the documentation from Qt and also Yocto.

Git​

Git is being used to checkout repositories. If you haven’t already configured Git you might at least have to specify name and e-mail address as shown below. Change "Your name" to your actual name and "Your e-mail" to your e-mail address.

git config --global user.name "Your name"
git config --global user.email "Your e-mail"

Meta-boot2qt repository​

Embedded Artists has made a fork of the official meta-boot2qt repository from Qt where support has been added for the Embedded Artists COM boards.

Create a working directory (replace myworkdir with your own directory name).

mkdir ~/myworkdir
cd ~/myworkdir

Clone the meta-boot2qt repository into the sources directory:

git clone https://github.com/embeddedartists/meta-boot2qt.git sources/meta-boot2qt

Checkout the branch you want to work with. The table below lists the branches that are available.

Branch nameVersions
ea-thudQt: 5.13.2
U-Boot: 2018.03
Linux: 4.14.78
cd sources/meta-boot2qt
git checkout <branch>

Build image​

Initialize the build for the board / device you are using. The supported devices are listed in the table below.

Device nameDescription
imx6qea-comiMX6 Quad COM board / kit
imx7dea-comiMX7 Dual COM board / kit
imx7dea-ucomiMX7 Dual uCOM board / kit
imx8mmea-ucomiMX8M Mini uCOM board / kit
imx8mqea-comiMX8M Quad COM board / kit

First make sure you are in your working directory. If you just checked out a branch as described in the previous section, you must first move up two directories.

cd ~/myworkdir
./sources/meta-boot2qt/b2qt-init-build-env init --device <device>

Setup the environment. Use the same device name as listed in the table above.

export MACHINE=<device>
source ./setup-environment.sh

Build the image.

note

Depending on the capabilities of your computer this can take several hours.

bitbake b2qt-embedded-qt5-image

Final result​

When the build has completed the result will be located in the following directory.

~/myworkdir/<build dir>/tmp/deploy/images/<device>/

There are several files in this directory. The one that contains the complete file system and the one used in the deployment scripts is the wic-file. It will typically be named b2qt-embedded-qt5-image-<device>.wic.

Other images​

It is also possible to build an SDK.

bitbake meta-toolchain-b2qt-embedded-qt5-sdk

The result will be located in.

~/myworkdir/<build dir>/tmp/deploy/sdk/

If you want to build the toolchain for Windows.

$SDKMACHINE=i686-mingw32 bitbake meta-toolchain-b2qt-embedded-qt5-sdk

Deploy the image​

Follow the instructions in the Yocto guide for how to deploy the built images.

Run the demo​

To be able to run Boot2Qt all you need to do is make sure jumper J2 is in open state and then reset (or power cycle) the board. However, for the demo to be useful you need to have a display connected to the board. The sections below describe how to use the default display interface for a specific board. If you want to use a different display please visit the Display solutions page: https://www.embeddedartists.com/display-solutions-for-com-boards/.

You need to be able to interact with the demo in some way. If your display has a touch panel you can use this. If not, you can connect a computer mouse with USB interface to the board.

iMX6 Quad COM​

The default display interface is HDMI. Follow the steps below to enable the HDMI interface.

  1. Reset the board and stop U-Boot from autobooting.
  2. Enable HDMI using the eadisp command
    eadisp enable hdmi
  3. For Qt to work properly the display interface must be setup with 32 bits per pixel (bpp)
    setenv cmd_custom fdt set fb_hdmi default_bpp <0x20>
  4. Save the changes
    saveenv
  5. Now you can reboot the board

By default, a resolution of 1280x720 is used when enabling HDMI. You can change this using eadisp conf. To see which interfaces and resolutions that have been preconfigured in U-Boot just enter eadisp.

eadisp
Available display configurations:
0) lvds0 hannstar:18:64998375,1024,768,220,40,21,7,60,10,0,0,0,0
1) lvds0 nhd-10.1-1024600af:24:51208521,1024,600,160,160,23,12,0,0,0,0,1,0
...
11) hdmi 1280x720M@60:m24:74161969,1280,720,220,110,20,5,40,5,0,0,0,0
12) hdmi 1920x1080M@60:m24:148500148,1920,1080,148,88,36,4,44,5,0,0,0,0
13) hdmi 640x480M@60:m24:25200342,640,480,48,16,33,10,96,2,0,0,0,0
14) hdmi 720x480M@60:m24:27027027,720,480,60,16,30,9,62,6,0,0,0,0

To change to another existing resolution, for example 1920x1080 use eadisp conf.

eadisp conf hdmi 12
saveenv

For more information about eadisp and how to use displays with Embedded Artists Developer’s Kits read the document Adding Displays to iMX Developer’s Kits available on Embedded Artists website.

iMX7 Dual uCOM / COM​

The iMX7 Dual uCOM / COM board supports the RGB display interface. In this example we are using a 7 inch display with resolution 800x480 from Innolux.

  1. Reset the board and stop U-Boot from autobooting.
  2. Enable the rgb interface by using the eadisp command.
    eadisp enable rgb
    saveenv
  3. By default, the 7-inch display from Innolux is selected as the display to use. There are more displays preconfigured. To see which are available just enter eadisp.
    eadisp
    Available display configurations:
    0) rgb Innolux-AT070TN:24:33336667,800,480,89,164,75,75,10,10,0,0,1,0
    1) rgb nhd-4.3-480272ef:24:9009009,480,272,2,2,2,2,41,10,0,0,1,0
    2) rgb nhd-5.0-800480tf:24:29232073,800,480,40,40,29,13,48,3,0,0,1,0
    3) rgb nhd-7.0-800480ef:24:29232073,800,480,40,40,29,13,48,3,0,0,1,0
    4) rgb umsh-8864:24:9061007,480,272,20,20,20,20,3,3,0,0,1,0
    5) rgb umsh-8596-30t:24:33264586,800,480,128,120,20,20,8,5,0,0,1,1
    6) rgb umsh-8596-33t:24:32917475,800,480,200,200,45,45,1,1,0,0,1,1
    7) rgb rogin-rx050a:24:32917475,800,480,200,200,45,45,1,1,0,0,1,

To change to another display use eadisp conf.

eadisp conf rgb 3
saveenv

The display from Innolux has a resistive touch panel (AR1021 controller). You can enable it by using the eatouch command.

eatouch
Available Touch Controllers:
1) ar1021
2) ilitek
3) sitronix
4) egalax
5) ft5x06
6) mxt1664

Use eatouch enable to enable the ar1021 touch controller.

eatouch enable rgb 1
saveenv

For more information about eadisp and how to use displays with Embedded Artists Developer’s Kits read the document Adding Displays to iMX Developer’s Kits available on Embedded Artists website.

iMX8M Mini uCOM​

The iMX8M Mini application processor only supports MIPI-DSI as display interface, but a MIPI-DSI to HDMI bridge has been added to the uCOM adapter board so you can use an HDMI display in this case.

Set the resolution to use by following the instructions below.

  1. Reset the board and stop U-Boot from autobooting (that is, boot into U-Boot console).
  2. Set the video argument in the extra_bootargs variable.
    setenv extra_bootargs video=HDMI-A-1:720x480@60
    saveenv
  3. Now you can reboot the board.

iMX8M Quad COM​

The default display interface is HDMI.

Set the resolution to use by following the instructions below.

  1. Reset the board and stop U-Boot from autobooting (that is, boot into U-Boot console).
  2. Set the video argument in the extra_bootargs variable.
    setenv extra_bootargs video=HDMI-A-1:720x480@60
    saveenv
  3. Now you can reboot the board.