Chromium Browser

Support for chromium browser can be added to the IoT Yocto image by adding the meta-chromium layer. These instructions are applicable to Kirkstone (Yocto 4.0) builds.

Important

Adding chromium support requires roughly 400MB of space.

Add meta-chromium to rity-demo-image

Add meta-browser layer

  1. Run the following command to download the meta-browser layer:

git clone https://github.com/OSSystems/meta-browser.git -b kirkstone $PROJ_ROOT/src/meta-browser
  1. Clone dependency layer meta-lts-mixins:

git clone https://git.yoctoproject.org/meta-lts-mixins -b kirkstone/rust-1.70 $PROJ_ROOT/src/meta-lts-mixins
  1. Add meta-chromium and meta-lts-mixins layers to conf/bblayers.conf

<absolute_path_to_rity-kirkstone>/src/poky/../meta-browser/meta-chromium \
<absolute_path_to_rity-kirkstone>/src/poky/../meta-lts-mixins \

Add necessary configurations to local.conf

  1. Add the necessary configurations to the bottom of conf/local.conf

LICENSE_FLAGS_ACCEPTED += "commercial_libav commercial_x264"
PACKAGECONFIG_pn-chromium-ozone-wayland ?= " use-egl proprietary-codecs use_vaapi "
IMAGE_INSTALL:append = " chromium-ozone-wayland "

Build Image

Please refer to Build from Source Code to build the demo images of each board.

Running chromium

Note

The chromium recipe has not been optimized for acceleration on GPU. Hence, you might notice reduced GPU acceleration.

Before running chromium, you need an active internet connection. Refer to the WiFi section or the Ethernet section to connect to the internet.

$ chromium --no-sandbox

Note

We need to use the –no-sandbox flag because we are logged in as the root user which doesn’t allow sandboxing. Other users will not need to use this flag.

Chromium flags can be accessed from chrome://flags, and set and unset during runtime. Alternatively, flags can be set while launching chromium from the command line. For example,

$ chromium --no-sandbox --ignore-gpu-blacklist --enable-gpu-rasterization --enable-oop-rasterization --enable-zero-copy --enable-accelerated-video-decode

A comprehensive list of all switches can be found here.