GENIVI-fying Chromium

In the last weeks, I’ve been working to integrate Chromium in the GENIVI Development Platform (GDP).

GENIVI provides a platform tailored for the needs of the In-Vehicle Infotainment (IVI) industry. It’s interesting to highlight their early adoption of Wayland for the graphic stack and the development of the Wayland IVI extension to fulfil the specific needs of IVI window manager implementations.

In GDP application model, apps are under control of systemd, which takes care of starting and stopping them. Through the ivi-application protocol, applications register their surfaces to be managed by HMI central controller. This HMI controller will be in charge of manipulating the surfaces belonging to applications for presentation to the user, using the ivi-controller protocol. In the end, the Wayland compositor will compose the surfaces on screen.

The first step was to build Chromium for the target platform. GDP can be built with Yocto, and the meta-browser layer provides a set of recipes to build Chromium, among other browsers. Support for Chromium on Wayland is granted by the Ozone-Wayland project, developed mainly by Intel. We had already used this combination of software to run Chromium on embedded platforms, and made contributions to it.

To achieve the integration with the GDP application model, we need to put some files in place so the browser can be controlled by systemd and the HMI controller has some knowledge about its existence. We extend the chromium-wayland recipe with a .bbappend file added to the GDP recipes. With everything in place, and one additional dependency from meta-openembedded, we are able to add Chromium to a GDP image and build.

Chromium on GDP

If you want to reproduce the build yourself before everything is integrated, you can already do it:

  • Get the GENIVI development platform and follow instructions to set GDP master up for your board.
  • Get the meta-browser layer and add it to your conf/bblayers.conf. I currently recommend to use the branch ease-chromium-wayland-build from this fork, as it contains some cleanup patches that haven’t been integrated yet. EDIT: patches have been merged into upstream meta-browser, no need to use the fork now!
  • You should already have the meta-openembedded submodule, so add meta-openembedded/meta-gnome to your conf/bblayers.conf.
  • Get the integration patch and add it into the meta-genivi-dev submodule. You may add this fork as a new remote and change to the chromium-integration branch, or you could just wget the patch and apply it locally. EDIT: the patch has been amended several times, links were updated.
  • Add chromium-wayland to your IMAGE_INSTALL_append in conf/local.conf. Now you may bitbake your image.

Next steps include integrating my patches into mainline development of their respective projects, rebasing meta-browser to use the latest possible version of Chromium, trying more platforms (currently working on a Minnowboard) and general fine-tuning by fixing issues like the weird proportions of the browser window when running on GDP.

This work is performed by Igalia and sponsored by GENIVI through the Challenge Grant Program. Thank you!

GENIVI logo

5 thoughts on “GENIVI-fying Chromium

  1. Thanks, great to see the changes, just one question, does any ozone wayland patch is added for the multi screen support?

    • Hi! We are considering it for a second phase. We need to identify any potential problems of Ozone-Wayland in multi-seat environments and address them.

      If you have found any problems in specific scenarios, please get in touch! We could really use that input. We are in the genivi-projects or genivi-meta-ivi mailing lists.

    • Hi. Does new version of chromium include this patch or we need to apply?

      Is this patch suitable for ivi-shell?

      I am trying to run chromium under ivi shell and its not displaying on screen. My understanding is that it does not have support for ivi-shell.

      • Hi, thanks for leaving a comment!

        My memory is foggy, as you can imagine, this post is seven years old… I think it was possible to run Chromium on ivi-shell with no modifications, provided that it was able to run on the target board. The specific patches here were meant to integrate Chromium with the application launcher of the GENIVI dev platform, which is not a thing any more as far as I know. I don’t think you need these patches.

        Instead, my advice would be that you built chromium-ozone-wayland from the meta-browser layer: https://github.com/OSSystems/meta-browser. My colleagues at Igalia are maintaining these recipes, the latest stable version is available from there. You may need some adaption to run on your hardware but, as long as Chromium runs on the weston desktop shell, it should run on ivi-shell too.

        On ivi-shell, you may find the flag `–window-size=xxxx,yyyy` useful to enforce a window size on the browser, as far as I remember ivi-shell doesn’t report a window size to the applications and just stretches them.

        Best of luck with your hacking!

Leave a Reply

Your email address will not be published. Required fields are marked *