.. include:: /keyword.rst ================ 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. .. _meta-chromium: https://github.com/OSSystems/meta-browser/tree/master/meta-chromium .. 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: .. prompt:: bash git clone https://github.com/OSSystems/meta-browser.git -b kirkstone $PROJ_ROOT/src/meta-browser 2. Clone dependency layer ``meta-lts-mixins``: .. prompt:: bash git clone https://git.yoctoproject.org/meta-lts-mixins -b kirkstone/rust-1.70 $PROJ_ROOT/src/meta-lts-mixins 3. Add ``meta-chromium`` and ``meta-lts-mixins`` layers to ``conf/bblayers.conf`` .. code-block:: /src/poky/../meta-browser/meta-chromium \ /src/poky/../meta-lts-mixins \ Add necessary configurations to `local.conf` -------------------------------------------- 1. Add the necessary configurations to the bottom of ``conf/local.conf`` .. code-block:: 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 :doc:`/sw/yocto/get-started/build-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 :ref:`WiFi section ` or the :ref:`Ethernet section ` to connect to the internet. .. code-block:: $ 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, .. code-block:: $ 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`_. .. _here: https://peter.sh/experiments/chromium-command-line-switches/