On this page

C

Using custom meta layer

Any customization that you may want to add to the Qt Onboard should always be done in a separate layer and not directly in the Qt Onboard layers. This is the preferred way to work with Yocto layers and it allows you to keep all your changes in separate version control and to update all the other layers without fear of conflicts or losing your changes.

To create a new blank layer, you can use the bitbake-layers command and then add the layer to your build environment as follows:

bitbake-layers create-layer ../sources/meta-my-custom
bitbake-layers add-layer ../sources/meta-my-custom

Within this layer, you can now include any configuration changes or new recipes that you wish to change in the Qt Onboard. The changes are usually done in .bbappend files that allow you to modify how software components are built.

Example: Enabling web server in Qt Onboard image

When you want to enable a web server in the Qt Onboard, there are several options as Yocto supports for example the following servers: Apache2, Cherokee, Hiawatha, Monkey, NGINX, Nostromo, and lighttpd.

Most of the recipes are available in the meta-openembedded/meta-webserver layer. You need to separately add the layer to the conf/bblayers.conf file to make the layer accessible from the build. The lighttpd recipe, however, is already available in the default build configuration.

There are several different ways to include new software components into the Qt Onboard. The simplest one can be done even without separate customization layer, using the conf/local.conf file in your build environment:

IMAGE_INSTALL += "lighttpd"

To use the customization layer, add the same configuration into a new .bbappend file for the image recipe used in the target device, for example ../sources/meta-my-custom/recipes-qt/images/b2qt-embedded-qt6-image.bbappend.

After you have rebuilt the image, the web server runs on the default port 80 and serves the document-root from /www/pages/.

Available under certain Qt licenses.
Find out more.