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:

Creating a New Yocto Meta Layer

The integration of the new device support to Boot to Qt is done in a new meta layer. The new meta layer needs to contain information of all BSP (Board Support Package) meta layers that provide Yocto support for the selected devices. Also, the meta layer can provide required recipes and configurations that support running the Boot to Qt software stack on a target device.

To create a new blank layer, you can use the bitbake-layers command or you can use an existing Boot to Qt BSP layer as a template. As an example, see Boot to Qt BSP layer for Renesas boards.

bblayers.conf.sample File

All the meta layers need to be included in the bitbake build. Therefore a new BSP layer should define a bblayers.conf.sample file that consist of all the meta layers used in the build.

For all the Renesas boards, the conf/bblayers.conf.sample file is as follows:

POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE')) + '/../..')}"
BBLAYERS ?= " \
    ${BSPDIR}/sources/poky/meta \
    ${BSPDIR}/sources/poky/meta-poky \
    ${BSPDIR}/sources/meta-renesas/meta-rcar-gen3 \
    ${BSPDIR}/sources/meta-openembedded/meta-oe \
    ${BSPDIR}/sources/meta-openembedded/meta-python \
    ${BSPDIR}/sources/meta-openembedded/meta-networking \
    ${BSPDIR}/sources/meta-openembedded/meta-initramfs \
    ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
    ${BSPDIR}/sources/meta-boot2qt/meta-boot2qt \
    ${BSPDIR}/sources/meta-boot2qt/meta-boot2qt-distro \
    ${BSPDIR}/sources/meta-boot2qt-renesas \
    ${BSPDIR}/sources/meta-mingw \
    ${BSPDIR}/sources/meta-qt5 \
"

Hardware Specific Configurations

The new Yocto meta layer may require some hardware specific configurations. The configurations can be defined to affect all the devices that are built with the layer or they can be targeted to a specific device. The configuration file in conf/distro/include/b2qt.inc can be used to define configurations that are needed by all the device variants supported by the layer. The conf/distro/include/{MACHINE}.conf files can be used to define configurations that are specific to a selected device.

Typically, a hardware specific configuration file defines boot configurations, adaptations of the BSP layer to Boot to Qt, and other configurations that might be required.

For example, the Renesas meta layer defines the device names for the QBSP installer in conf/distro/include/b2qt.inc file:

DEPLOY_CONF_NAME_ebisu      = "Renesas R-Car-E3 Ebisu 4D"
DEPLOY_CONF_NAME_m3ulcb     = "Renesas R-Car-M3 Starter Kit Pro"
DEPLOY_CONF_NAME_h3ulcb     = "Renesas R-Car-H3 Starter Kit Premier"
DEPLOY_CONF_NAME_salvator-x = "Renesas R-Car H3 M3 Salvator-X(S)"

Recipes

As any other Yocto meta layer, the new Boot to Qt BSP layer can contain new recipes and .bbappend files to existing recipes.

Manifest

The Repo tool from Google is used to handle all the meta layers that are required to build Boot to Qt for the selected device. The Repo tool uses a manifest file that defines which meta layers are downloaded and which versions are used.

The Repo tool is normally used with a separate manifest repository that contains only the manifest XML file describing all the needed Yocto meta layers. Qt provides such a repository in https://code.qt.io/cgit/yocto/boot2qt-manifest.git/. This repository provides manifests for all the Boot to Qt releases, but can also have manifests for 3rd party vendor supported releases.

For example, the manifest file for Renesas boards is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Yocto -->
<remote name="yocto"
        fetch="git://git.yoctoproject.org"/>
<project name="poky"
        remote="yocto"
        revision="eac84e73e8d94610173c3bb3b6c6d74b58e44f60"
        path="sources/poky"/>
<project name="meta-mingw"
        remote="yocto"
        revision="756963cc28ebc163df7d7f4b4ee004c18d3d3260"
        path="sources/meta-mingw"/>

<!-- OpenEmbedded -->
<remote name="oe"
        fetch="git://git.openembedded.org"/>
<project name="meta-openembedded"
        remote="oe"
        revision="9e60d30669a2ad0598e9abf0cd15ee06b523986b"
        path="sources/meta-openembedded"/>
<project name="meta-python2"
        remote="oe"
        revision="4400f9155ec193d028208cf0c66aeed2ba2b00ab"
        path="sources/meta-python2"/>

<!-- Qt -->
<remote name="qt"
        fetch="git://code.qt.io/yocto"
        pushurl="ssh://codereview.qt-project.org/yocto"/>
<project name="meta-boot2qt"
        remote="qt"
        revision="lts-5.15"
        path="sources/meta-boot2qt">
    <linkfile dest="setup-environment.sh" src="scripts/setup-environment.sh"/>
</project>
<project name="meta-boot2qt-renesas"
        remote="qt"
        revision="lts-5.15"
        path="sources/meta-boot2qt-renesas">
    <linkfile dest="sources/templates" src="conf"/>
</project>
<project name="meta-qt5"
        remote="qt"
        revision="5.15"
        path="sources/meta-qt5"/>

<!-- Device specific layers -->
<remote name="renesas"
        fetch="https://github.com/renesas-rcar"/>
<project name="meta-renesas"
        remote="renesas"
        revision="9a58b78a5c2960332b6ed4b02a6d8d5c606fa3e5"
        path="sources/meta-renesas"/>
</manifest>

Both the meta-boot2qt and the meta-boot2qt-renesas BSP layers have extra <linkfile> configuration specifically added to support correct initialization of the build environment. Those should always be used in Boot to Qt BSP manifest files.

Testing the New Yocto Meta Layer

Initializing the build environment from the manifest repository would look like:

repo init -u git://code.qt.io/yocto/boot2qt-manifest -m <manifest>
repo sync

export MACHINE=<target machine>
. ./setup-environment.sh

bitbake b2qt-embedded-qt5-image

Available under certain Qt licenses.
Find out more.