This is an old revision of the document!


WORK IN PROGRESS

Embedded module TQMa8Xx - YOCTO Linux BSP documentation



Please keep in mind that the following instructions focus on simplicity, not on security.

For the sake of simplicity password authentification can be used for SSH.

Setup Yocto build environment

The OpenSSH sftp server is not installed into the image by default, add the following to your local.conf to install it.

IMAGE_INSTALL_append = “openssh-sftp-server”

Setup on Target

To setup a password for the default user root, execute the command passwd root and set your password.

Modify SSH configuration

Uncomment the following options in /etc/ssh/sshd_config to allow that the user root can authenticate with a password on the STKa8Xx.

PermitRootLogin yes
PasswordAuthentication yes

Building the toolchain requires a Yocto build environment configured for meta-tq or ci-meta-tq The setup of the build environment is described on the corresponding Yocto quickstart of the module.

The meta-qt5 Yocto layer has to be added to the Yocto build environment when using meta-tq

After the Yocto build environment the SDK can be built by the following command:

bitbake meta-toolchain-qt5


Building meta-toolchain-qt5 may take several hours, depending on your hardware configuration

After building meta-toolchain-qt5 the SDK file is located in the following path of the build directory tmp/deploy/sdk/fsl-imx-wayland-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.14-sumo.sh

Execute the *sh file to install the SDK, the default path is set to /opt/fsl-imx-wayland/4.14-sumo

Download Qt Opensource 5.10.1
After downloading make the Qt installer file executable and run the Qt installer. Follow the installation wizard instructions.

The next step is to add the environment setup of the Yocto SDK to the first line (above the shebang) of the file qtcreator.sh script.
If the install location has not been changed the qtcreator.sh is located in ~/Qt5.10.1/Tools/QtCreator/bin/qtcreator.sh

source /opt/fsl-imx-wayland/4.14-sumo/environment-setup-aarch64-poky-linux

change to the directory where the qtcreator.sh file is located and execute the following command:

sudo sh qtcreator.sh

If qtcreator.sh returns source: not found, before sudo sh qtcreator.sh, enter sudo dpkg-reconfigure dash and choose no.

Setup SSH connection

  1. Go to Tools > Options > Devices
  2. Click Add > Generic Linux Device > Start Wizard
  3. Change the name to “STKa8Xx” and set up the connection.

Click Test to test the network connection of the target device.

Add compiler

  1. Go to Tools > Options > Build & Run> click Compilers
  2. Click Add and select GCC
  3. Change Name to TQMa8Xx
  4. Set Compiler path to /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
  5. Set the following values for ABI from the dropdwon menus:
processor architecture operating system OS flavor binary format system architecture
arm linux generic elf 64bit

Add new Cross Compiled Qt Version

  1. Click Qt Versions on the Build & Run panel
  2. Click Add
  3. Locate the qmake file in /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake

If the qmake file has been auto-detected by Qt Creator qmake has not to be added manually.

Add new Kit

  1. Click on Kits in the Build & Run panel
  2. Click Add and set the following:

Name STKa8Xx
Device Type Generic Linux Device
Device STKaXx (default for Generic Linux)
Sysroot /opt/fsl-wayland/4.14-sumo/sysroots/aarch64-poky-linux
Compiler STKa8Xx
Qt version Qt 5.10.1

  • Open File menu and click New Project
  • Select Qt Console Application
  • Specify the location for the project and name it hello_world
  • Select the Kit STKa8Xx
  • Edit main.cpp
#include <QCoreApplication>
#include <iostream>
#include <stdlib.h>

using namespace std;
int main(int argc, char *argv[])
{
    QCoreApplication a(argc,argv);
    cout<<"Hello World"<<endl;
    return a.exec();
}
  • Last modified: 2022/08/04 15:04