Using Custom Meta Layer

Any customization that you may want to add to the Boot to Qt software stack should always be done in a separate layer and not directly in the Boot to Qt layer (meta-boot2qt). 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 loosing 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-boot2qt
bitbake-layers add-layer ../sources/meta-my-custom-boot2qt

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

Example: Enabling Web Server in Boot to Qt Image

When you want to enable a web server in the Boot to Qt software stack, 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 Boot to Qt software stack. 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 utilize that customization layer, you can create new .bbappend file for the packagegroup recipe that handles extra software component installations to the Boot to Qt software stack. In recipes-core/packagegroups/packagegroup-b2qt-embedded-base.bbappend, add:

RDEPENDS_${PN} += "lighttpd"

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.