C

Adding New Device Configurations

By default, Boot to Qt for embedded Linux supports several Yocto meta layers. If you are developing software for a hardware that is not supported by default, you can add a new Yocto meta layer to your Boot to Qt for embedded Linux environment.

Requirements

A new Yocto meta layer can be added to the Boot to Qt for embedded Linux environment only if you have the Yocto meta layer available for your hardware. Thus you should be familiar with the Yocto tools and the concept of recipes. For more information, see the Yocto Project documentation.

To get started, you need the following:

  • Install the Boot to Qt source packages. You can find these by running the MaintenanceTool application located in the Qt for Device Creation installation directory and selecting Package Manager. The Yocto meta layer package contains the additional recipes required to make the image compatible with Boot to Qt.
  • Install the Yocto tools dependencies as described in Building Your Own Embedded Linux Image.

Adding a New Yocto Meta Layer

To add a new Yocto meta layer, you need to modify the file /sources/meta-boot2qt/scripts/manifest.xml. You need to edit the elements Remote and Project:

Remote element:

AttributeDescription
fetchA Git repository URL of a new meta layer
nameA project name used in the Git repository. You need to add it without the .git postfix.

Project element:

AttributeDescription
nameA project name used in the Git repository. You need to add it without the .git postfix.
remoteA remote Git repository name
revisionA Yocto meta layer Git revision
pathA Yocto meta layer source path
groupsGroups of the Yocto meta layer. The group value must match the PROJECT_GROUPS in the file /sources/meta-boot2qt/b2qt-init-build-env. See the section Fetching the Meta Layer.

For example:

<remote fetch="git://github.com/newmetalayer" name="mynewhw"/>
<project name="mynewhw"
     remote="meta-mynewhw"
     revision="1234b123e12c12a123f2b123b123a12fc123b1234"
     path="sources/meta-mynewhw"
     groups="notdefault,mynewhw"/>

Fetching the Meta Layer

To fetch the new Yocto meta layer, you need to modify the file /sources/meta-boot2qt/b2qt-init-build-env. The PROJECT_GROUPS value in the file must match the groups attribute value in the file /sources/meta-boot2qt/scripts/manifest.xml.

mynewhw)
  PROJECT_GROUPS="mynewhw"
;;

Creating Meta Layer Configuration File

Each hardware configuration usually has its own bblayers.conf configuration file. The file lists the meta layers that are included in the built image. The configuration files are found from the directory /sources/meta-boot2qt/meta-boot2qt-distro/conf.

Create a new bblayer.conf file (for example bblayers.conf.mynewhw.sample) for your Yocto meta layer and add it to the directory /sources/meta-boot2qt/meta-boot2qt-distro/conf.

Edit the file /sources/meta-boot2qt/scipts/setup-environment.sh so that it contains a reference to the created bblayer.conf file:

mynewhw)
  LAYERSCONF="bblayers.conf.mynewhw.sample"
;;

Hardware Specific Configurations

The new Yocto meta layer may require also some hardware specific configurations. The configurations are defined in the .conf files located in the directory /sources/meta-boot2qt/meta-boot2qt-distro/conf/distro/include. Typically, a hardware specific configuration file defines a boot configuration, EGL provider library, and other configurations that might be required (for example a support for Wayland).

Create a new configuration file for your hardware and add it to the directory /sources/meta-boot2qt-distro/meta-boot2qt/conf/distro/include. In our example we name the configuration file as mynewhw.conf:

DEFAULTTUNE = "cortexa15hf-neon"
MACHINE_EXTRA_INSTALL = “myspecial-gpudriver”
MACHINE_EXTRA_INSTALL_SDK = “libegl-mygpu-dev”

Testing the New Yocto Meta Layer

You can test the new Yocto meta layer by running the Yocto build commands described in Building Your Own Embedded Linux Image:

cd <BuildDir>
<INSTALL_DIR>/5.9/Boot2Qt/sources/meta-boot2qt/b2qt-init-build-env init --device mynewhw
export MACHINE=mynewhw
source ./setup-environment.sh
bitbake b2qt-embedded-qt5-image
bitbake meta-toolchain-b2qt-embedded-qt5-sdk

Available under certain Qt licenses.
Find out more.