Skip to content
Wouter lucas van Boesschoten edited this page Dec 12, 2018 · 5 revisions

meta-wpe

Donate

meta-wpe is a meta layer for OpenEmbedded / Yocto environments. It provides the necessary recipes to build the WebPlatformforEmbedded components including the WPE WebKit browser.

Introduction

The meta-wpe layer provides the OpenEmbedded recipes to build the Web Platform for Embedded (WPE) components. The WPE components can be found under the main github org: https://github.com/WebPlatformForEmbedded

Components include:

  • WPE WebKit - powerful low-resource embedded WebKit engine with Wayland support
  • WPE Backend - Abstraction layer for WPE WebKit with support for MESA based gfx or Wayland/EGL gfx
  • WPE Framework - plugin based framework for embedding C/C++ components and bridging the "web" world.
  • WPE Framework plugins - various plugins from a DIAL Server, Compositor to premium app based plugins (NF, Amzn, etc)

The meta-wpe is frequently tested on reference devices such as Raspberry Pi and various other open-source boards.

Meta-wpe can be integrated into any OpenEmbedded based distribution. From the reference poky distro to the RDK-V distro, meta-wpe will easily be integrated into any distribution of choice.

To support different versions of OpenEmbedded, please find the respective branch names to match the OE releases. Note that older branched may have not been touched for a while and provider older snapshots of the meta-wpe components. If any support/updated are needed feel free to reach out through the issue tracker.

Quick Start

  1. git clone git@github.com:YoeDistro/yoe-distro.git and cd yoe-distro
  2. . raspberrypi3-envsetup.sh (OR any other machine with . ./\<machine\>-envsetup.sh)
  3. yoe_setup
  4. yoe_add_layer git@github.com:WebPlatformForEmbedded/meta-wpe master
  5. Add the following lines to conf/local.conf to build an eglfs image:
    DISTRO_FEATURES_remove_rpi = "x11"
    DISTRO_FEATURES_remove_rpi = "wayland"

Note: If you want to build a Wayland based image, don't remove Wayland.

  1. Build an full screen EGL image: bitbake wpe-eglfs-image.
  2. Insert SD card
  3. lsblk (note sd card device, and substitute for /dev/sdX below)
  4. yoe_install_image /dev/sdX wpe-eglfs-image
  5. Install SD card in a Raspberry PI and enjoy your new image

Note: If you do not want to use docker to build the image, please set export DOCKER_REPO=none prior to running the bitbake step.

Please visit the documentation for detailed instructions, including tutorials and HowTo's for different devices for WPE.

For more information on the core Distro please visit Yoe docs

Tutorials

Raspberry PI based systems can be found here: https://github.com/WebPlatformForEmbedded/meta-wpe/wiki/Raspberry-PI

Linaro/96boards based systems can be found here: https://github.com/WebPlatformForEmbedded/meta-wpe/wiki/96boards

Usage

The image will start WPEFramework through the chosen init system, which will in turn start the WPEWebKit Browser and point it to a local index.html. You should see a Hello page with the IP of the device. There is no need to login to the device and start the browser manually.

WPEFramework loads several plugins, including a webserver and the wpewebkit browser. A locally supplied user interface is available to interact with the WPEFramework web services. All interactions with the browser and other plugins are available through web APIs.

To interact with the browser:

  1. Find the IP of the device on the welcome page
  2. Navigate to the IP of the box with a browser to open the control UI
  3. Open the WebKit Browser tab and set a new URL in the input field

All keys that are typed when the control page in focus are forwarded to the device. Alternatively you can also hookup USB remotes/keyboards.

Change default URL

To make WPEFramework load another URL by default there are two ways:

  • Set the startup URL at build time
  • Modify the config on the device after you've build the image

Build time

To change the URL at build time, set the following variable in your local.conf:

WEBKITBROWSER_STARTURL = "http://www.github.com"

Rebuild your image as explained in the Quick start section.

Runtime

Or change the local configuration:

$ vi /etc/WPEFramework/plugins/WebKitBrowser.json

In the JSON file, edit the URL key/value. Save and restart the box or reload WPEFramework through systemctl or sysinit.

To change what WPEFramework loads, such as turn on/off plugins or interact with the service through another way please see the WPEFramework page on our wiki.