Adding yocto packages: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use PYRO_V1.0_VAR-SOM-MX6 as default
<!-- Set release according to "release" parameter in URL and use PYRO_V1.0_VAR-SOM-MX6 as default
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
--> {{INIT_RELEASE_PARAM|RELEASE_PYRO_V1.0_VAR-SOM-MX6}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_PYRO_V1.0_VAR-SOM-MX6}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
-->{{PageHeader|Adding packages to the Yocto build }} {{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}[[Category:DART-6UL]][[Category:VAR-SOM-MX7]]__toc__
-->{{PageHeader|Adding packages to the Yocto build }} {{DocImage|category1=Yocto|category2=VAR-SOM-MX6}}[[Category:DART-6UL]][[Category:VAR-SOM-MX7]]__toc__
= General =
Packages and package groups can be added to image recipes.
See the Yocto Development manual for how to customize an image: http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#usingpoky-extend-customimage-imagefeatures
= Adding a package to the local build of the BSP=
Search for the corresponding recipe and which layer the recipe is in. This link is a useful tool for doing so: http://layers.openembedded.org/layerindex/branch/morty/layers/
If the package is in the meta-openembedded layer, the recipe is already available in your build tree.
Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
  IMAGE_INSTALL_append = " <package>"
Note: The leading white-space between the &quot; and the package name is necessary for the append command.
If you need to add a layer to the BSP, clone or extract it to the YOCTO_DIR/sources/ directory. Then, modify YOCTO_DIR/BUILD_DIR/conf/bblayers.conf to include this new layer in BBLAYERS:
  BBLAYERS += "${BSPDIR}/sources/<new_layer>"
= Webserver support =
Recipes in meta-openembedded/meta-webserver/recipes-httpd:<br>
- apache2<br>
- cherokee<br>
- hiawatha<br>
- monkey<br>
- nginx<br>
- nostromo<br>
- sthttpd<br>
Recipes in poky/meta/recipes-extended/lighttpd:<br>
- lighttpd<br>
Although full of capabilities and features, Apache is commonly considered quite heavy, so is not generally used for embedded devices.<br>
Nostromo and sthttpd are commonly considered ultralight webserver, with a very small set of capabilities and features, with very limited resource requirements.<br>
The usual choice is usually between the following 5:<br>
- cherokee<br>
- hiawatha<br>
- monkey<br>
- nginx<br>
- lighttpd<br>
Here you can find an article comparing the above 5 webserver:<br>
https://www.linux.com/news/which-light-weight-open-source-web-server-right-you<br>


{{Adding_yocto_packages_common}}


= Accelerated browsers support =
= Accelerated browsers support =


Yocto build system allow integrating browsers that support iMX6 GPU accelerations.
Yocto build system allow integrating browsers that support iMX GPU accelerations.


The common used browsers are:
The common used browsers are:
* qtwebkit based browsers: [https://trac.webkit.org/wiki/QtWebKit QtWebKit] is the WebKit porting to Qt. [https://webkit.org WebKit] is an open source web browser engine. Qt5 provide some demo implementations in webkitwidgets examples.
* qtwebkit based browsers: [https://trac.webkit.org/wiki/QtWebKit QtWebKit] is the WebKit porting to Qt. [https://webkit.org WebKit] is an open source web browser engine. Qt5 provides some demo implementations in webkitwidgets examples. Qt6 does not support qtwebkit.
* qtwebengine based browsers: [https://wiki.qt.io/QtWebEngine QtWebEngine] integrates chromium's fast moving web capabilities into Qt. Qt5 provide some demo implementations in webenginewidgets examples.
* qtwebengine based browsers: [https://wiki.qt.io/QtWebEngine QtWebEngine] integrates chromium's fast moving web capabilities into Qt. Both Qt5 and Qt6 provide some demo implementations in webenginewidgets examples.
* chromium based browsers: [http://www.chromium.org/Home Chromium] is an open-source browser project.
* chromium based browsers: [http://www.chromium.org/Home Chromium] is an open-source browser project.


Till 2016, FSLC community maintained [https://github.com/Freescale/chromium-imx chromium-imx] project:  customized Chromium versions (up to v48) providing GPU and VPU integration for iMX6 CPUs.
Till 2016, FSLC community maintained [https://github.com/Freescale/chromium-imx chromium-imx] project:  customized Chromium versions (up to v48) providing GPU and VPU integration for iMX CPUs.


Much more updated Chromium versions are available from [https://github.com/OSSystems/meta-browser meta-browser], only providing GPU integration.
Much more updated Chromium versions are available from [https://github.com/OSSystems/meta-browser meta-browser], only providing GPU integration.
Line 62: Line 21:
The minimum requirements to use chromium browsers is X11 or Wayland.
The minimum requirements to use chromium browsers is X11 or Wayland.


Qt based browsers directly rely on Qt integration with iMX6 accelerations.
Qt based browsers directly rely on Qt integration with iMX accelerations.


QtWebKit has been superseded by QtWebEngine, mainly because QtWebKit has not been actively synchronized with the upstream WebKit code since Qt 5.2 and has been deprecated in Qt 5.5. Further details are available in [http://doc.qt.io/qt-5/qtwebengine-overview.html Qt WebEngine Overview]
QtWebKit has been superseded by QtWebEngine, mainly because QtWebKit has not been actively synchronized with the upstream WebKit code since Qt 5.2, it has been deprecated in Qt 5.5 and completely removed from Qt6 releases. Further details are available in [http://doc.qt.io/qt-5/qtwebengine-overview.html Qt WebEngine Overview]


Qt team provides a [http://code.qt.io/cgit/qt-apps/qtwebbrowser.git QtWebEngine browser] for embedded touch devices and related recipes hase been integrated in our BSP starting from Sumo.
For Qt5 only, Qt team provides a [http://code.qt.io/cgit/qt-apps/qtwebbrowser.git QtWebEngine browser] for embedded touch devices and related recipes hase been integrated in our BSP starting from Sumo.


The performance of each browser is strictly related to the features to be used, so different html applications can provide better performance with different browsers.
The performance of each browser is strictly related to the features to be used, so different html applications can provide better performance with different browsers.


The following table try to summarize some benchmark for Wayland backend:


{| class="wikitable"
== Add QtWebKit examples to the build (Qt5 only) ==
|-
! scope="col"| website
! scope="col"| QtWebKit
! scope="col"| QtWebEngine
! scope="col"| Chromium
|-
! scope="row"| http://peacekeeper.futuremark.com
| crash
| 623
| n/a
|-
! scope="row"| http://www.kevs3d.co.uk/dev/canvasmark
| n/a
| 4796
| 3780
|-
! scope="row"| http://webglsamples.org/blob/blob.html
| 2 fps
| 32 fps
| 34 fps
|}
 
== Add QtWebKit examples to the build ==


Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
<pre>
<pre>
IMAGE_INSTALL_append = " qtwebkit-examples-examples"
IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " qtwebkit-examples-examples"
</pre>
</pre>
The demo browser used for the above tests is available as
/usr/share/qt5/examples/webkitwidgets/fancybrowser/fancybrowser


== Add QtWebEngine examples to the build ==
== Add QtWebEngine examples to the build (Both Qt5 and Qt6) ==


Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
<pre>
<pre>
IMAGE_INSTALL_append = " qtwebengine-examples"
IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " qtwebengine-examples"
</pre>
</pre>


The demo browser used for the above tests is available as
For Qt6, the following may be also be required
/usr/share/qt5/examples/webenginewidgets/fancybrowser/fancybrowser
<pre>
PACKAGECONFIG{{#var:YOCTO_OVERRIDE_PREFIX}}append{{#var:YOCTO_OVERRIDE_PREFIX}}pn-qtwebengine = " examples"
</pre>


== Add Chromium to the build ==
== Add Chromium to the build ==
Line 124: Line 59:


To build chromium, you can add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
To build chromium, you can add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:
  IMAGE_INSTALL_append = " chromium'''<suffix>'''"
  IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " chromium'''<suffix>'''"
  LICENSE_FLAGS_WHITELIST += "commercial_libav commercial_x264"
  LICENSE_FLAGS_WHITELIST += "commercial_libav commercial_x264"
{{Note|The '''<suffix>''' depends on your specific Yocto version and graphic backend.}}
{{Note|The '''<suffix>''' depends on your specific Yocto version and graphic backend.}}
Till Yocto Morty, chromium was available only for x11 backend and no suffix was required
Till Yocto Morty, chromium was available only for x11 backend and no suffix was required
  IMAGE_INSTALL_append = " chromium"
  IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " chromium"
Starting from Yocto Thud, chromium is available for both x11 backend
Starting from Yocto Thud, chromium is available for both x11 backend
  IMAGE_INSTALL_append = " chromium-x11"
  IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " chromium-x11"
and wayland backend
and wayland backend
  IMAGE_INSTALL_append = " chromium-ozone-wayland"
  IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " chromium-ozone-wayland"
If you plan to use Chromium, please take care of the specific requirements for commercial license of libav and x264 packages.
If you plan to use Chromium, please take care of the specific requirements for commercial license of libav and x264 packages.



Latest revision as of 20:42, 23 August 2024

Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release RELEASE_PYRO_V1.0_VAR-SOM-MX6.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
Adding packages to the Yocto build



General

Packages and package groups can be added to image recipes. See the Yocto Development manual for how to customize an image: https://docs.yoctoproject.org/dev-manual/customizing-images.html#customizing-images-using-custom-image-features-and-extra-image-features

Adding a package to the local build of the BSP

Search for the corresponding recipe and which layer the recipe is in. This link is a useful tool for doing so: http://layers.openembedded.org/layerindex/branch/morty/layers/

If the package is in the meta-openembedded layer, the recipe is already available in your build tree.

Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:

 IMAGE_INSTALL_append = " <package>"

Note: The leading white-space between the " and the package name is necessary for the append command.

If you need to add a layer to the BSP, clone or extract it to the YOCTO_DIR/sources/ directory. Then, modify YOCTO_DIR/BUILD_DIR/conf/bblayers.conf to include this new layer in BBLAYERS:

 BBLAYERS += "${BSPDIR}/sources/<new_layer>"

Webserver support

Recipes in meta-openembedded/meta-webserver/recipes-httpd:
- apache2
- cherokee
- hiawatha
- monkey
- nginx
- nostromo
- sthttpd
Recipes in poky/meta/recipes-extended/lighttpd:
- lighttpd

Although full of capabilities and features, Apache is commonly considered quite heavy, so is not generally used for embedded devices.
Nostromo and sthttpd are commonly considered ultralight webserver, with a very small set of capabilities and features, with very limited resource requirements.
The usual choice is usually between the following 5:
- cherokee
- hiawatha
- monkey
- nginx
- lighttpd
Here you can find an article comparing the above 5 webserver:
https://www.linux.com/news/which-light-weight-open-source-web-server-right-you


Accelerated browsers support

Yocto build system allow integrating browsers that support iMX GPU accelerations.

The common used browsers are:

  • qtwebkit based browsers: QtWebKit is the WebKit porting to Qt. WebKit is an open source web browser engine. Qt5 provides some demo implementations in webkitwidgets examples. Qt6 does not support qtwebkit.
  • qtwebengine based browsers: QtWebEngine integrates chromium's fast moving web capabilities into Qt. Both Qt5 and Qt6 provide some demo implementations in webenginewidgets examples.
  • chromium based browsers: Chromium is an open-source browser project.

Till 2016, FSLC community maintained chromium-imx project: customized Chromium versions (up to v48) providing GPU and VPU integration for iMX CPUs.

Much more updated Chromium versions are available from meta-browser, only providing GPU integration.

The minimum requirements to use chromium browsers is X11 or Wayland.

Qt based browsers directly rely on Qt integration with iMX accelerations.

QtWebKit has been superseded by QtWebEngine, mainly because QtWebKit has not been actively synchronized with the upstream WebKit code since Qt 5.2, it has been deprecated in Qt 5.5 and completely removed from Qt6 releases. Further details are available in Qt WebEngine Overview

For Qt5 only, Qt team provides a QtWebEngine browser for embedded touch devices and related recipes hase been integrated in our BSP starting from Sumo.

The performance of each browser is strictly related to the features to be used, so different html applications can provide better performance with different browsers.


Add QtWebKit examples to the build (Qt5 only)

Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:

IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " qtwebkit-examples-examples"

Add QtWebEngine examples to the build (Both Qt5 and Qt6)

Add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:

IMAGE_INSTALL{{#var:YOCTO_OVERRIDE_PREFIX}}append = " qtwebengine-examples"

For Qt6, the following may be also be required

PACKAGECONFIG{{#var:YOCTO_OVERRIDE_PREFIX}}append{{#var:YOCTO_OVERRIDE_PREFIX}}pn-qtwebengine = " examples"

Add Chromium to the build

Chromium support is provided by the 3rd party layer meta-browser.

Due to the lack of dedicated integrations with iMX SoCs, this layer is no longer part of our latest manifests. Also, be aware that the branch/commit should match your current BSP version, but not all the branches are available from meta-browser layer: e.g. at the time being, there's no dunfell branch.

Before proceeding, double-check that the meta-browser layer is actually listed in the YOCTO_DIR/BUILD_DIR/conf/bblayers.conf file.

If missing, ensure to have downloaded the meta-browser layer in YOCTO_DIR/sources folder and to add it to the list in the YOCTO_DIR/BUILD_DIR/conf/bblayers.conf file.

To build chromium, you can add the following line to YOCTO_DIR/BUILD_DIR/conf/local.conf:

IMAGE_INSTALL_append = " chromium<suffix>"
LICENSE_FLAGS_WHITELIST += "commercial_libav commercial_x264"
The <suffix> depends on your specific Yocto version and graphic backend.

Till Yocto Morty, chromium was available only for x11 backend and no suffix was required

IMAGE_INSTALL_append = " chromium"

Starting from Yocto Thud, chromium is available for both x11 backend

IMAGE_INSTALL_append = " chromium-x11"

and wayland backend

IMAGE_INSTALL_append = " chromium-ozone-wayland"

If you plan to use Chromium, please take care of the specific requirements for commercial license of libav and x264 packages.

Also, starting from March 2021, in the master branch, the layer structure has been reorganized with the commit chromium, firefox: split layer into meta-chromium and meta-firefox.

Building chromium from a meta-layer version before this commit, the expected change in the bblayers.conf file is

BBLAYERS += "${BSPDIR}/sources/meta-browser"

while after this commit, the expected change in the bblayers.conf file is

BBLAYERS += "${BSPDIR}/sources/meta-browser/meta-chromium"

The demo browser used for the above tests is available as

/usr/bin/google-chrome