Skip to content
Carlos Alberto Lopez Perez edited this page May 14, 2018 · 12 revisions

meta-webkit

This layer provides recipes of WebKit based runtimes and browsers for use with OpenEmbedded and/or Yocto.

This layer depends on:

URI: git://git.openembedded.org/openembedded-core
branch: master
revision: HEAD


URI: git://git.openembedded.org/meta-openembedded 
branch: master
revision: HEAD

Building an image with WPE

WPE (former WebKitForWayland) is a WebKit port intended to allow embedders to create simple and performant systems based on Web platform technologies. It is designed with hardware acceleration in mind, leveraging common 3D graphics APIs for best performance.

The usual way to create an image with WPE is:

  • Add this layer to bblayers.conf

  • Add the following to local.conf:

    DISTRO_FEATURES_append = " opengl wayland"
    IMAGE_INSTALL_append = " wpewebkit cog"
    PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-rdk"
    
  • Then build the target image, for example:

    bitbake core-image-weston
    
  • Run cog from a weston terminal.

Building an image with WebKitGTK+

WebKitGTK+ is a full-featured port of the WebKit rendering engine, suitable for projects requiring any kind of web integration, from hybrid HTML/CSS applications to full-fledged web browsers. It offers WebKit’s full functionality and is useful in a wide range of systems from desktop computers to embedded systems like phones, tablets, and televisions.

When creating an image with with WebkitGTK+, take into account:

  • The package webkitgtk contains the shared libraries and the webkitgtk runtime.

  • The package webkitgtk-bin contains the MiniBrowser executable (a very basic browser built on top of the webkitgtk runtime, mainly used for testing purposes).

  • The name of the recipe is the same than the one available in oe-core (master), so you should select which version of webkitgtk you want to build in your local.conf

  • The webkitgtk recipe has several packageconfig options that you can tune. Check the source code of the recipe to see all the ones available. For example, for enabling WebGL support you can add the following to your conf/local.conf file:

    PACKAGECONFIG_append_pn-webkitgtk = " webgl"
    
  • Add the following lines to your conf/local.conf file (for building the X11 backend of WebKitGTK+) :

    DISTRO_FEATURES_append = " opengl x11"
    IMAGE_INSTALL_append = " webkitgtk-bin cog"
    PACKAGECONFIG_pn-cog = "webkitgtk"
    
  • Then build the X11 image

    bitbake core-image-sato
    
  • Run cog (or MiniBrowser) from an X terminal.

Note about the recipe of webkitgtk in oe-core

The oe-core repository (since jethro release) already includes a recipe for WebKit2GTK+ with the very same name than the one included here.

The purpose of this layer is:

  • To ship a WPE recipe.
  • To provide WebKit2GTK+ recipes newer or different than the ones included in oe-core. For example, people with releases older than jethro can use this layer for easily building WebKit2GTK+. And people using jethro can use this layer to get more recent WebKit2GTK+ recipes.

Using the same name for the webkitgtk recipe than in oe-core is done on purpose. The idea is that you can select between the webkitgtk recipe from oe-core or from this layer by selecting the version with the variable PREFERRED_VERSION_webkitgtk in conf/local.conf.

If you don't want to use or experiment with the webkitgtk recipes from this layer, then the best thing to do is to simply ignore this layer and don't try to use it.

Further info

The following resources contain useful information:

Clone this wiki locally