Skip to content
Pavan nandyala edited this page Nov 24, 2018 · 12 revisions

Setup

Note: You only need this if you do not have an existing OpenEmbedded Yocto environment.

Make sure you install the repo command by Google first.

create a workspace for your yocto build:

$ mkdir -p rpi-yocto

Inside the newly created directory, initiate the repository

$ repo init -u ssh://git@github.com/WebPlatformForEmbedded/meta-wpe.git -b morty -m tools/manifests/rpi-yocto.xml

Fetch and sync all repositories:

$ repo sync

Build

Initiate OE by invoking the oe init script:

source poky/oe-init-build-env rpi-ml-build

or at least for Morty build

source openembedded-core/oe-init-build-env rpi-ml-build

Add bb layers:

bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake-layers add-layer ../meta-openembedded/meta-multimedia
bitbake-layers add-layer ../meta-openembedded/meta-networking
bitbake-layers add-layer ../meta-raspberrypi
bitbake-layers add-layer ../meta-wpe

Edit conf/local.conf and set the target machine:

MACHINE = "raspberrypi3"

Remove x11 from Distro features since we use wayland+westeros

DISTRO_FEATURES_remove = "x11"

Add opengl to Distro Features

DISTRO_FEATURES_append = " opengl"

you can use raspberrypi2 as well if you own raspberrypi2 machine.

To set a different GCC e.g. 6.3:

GCCVERSION = "6.%"

Build WPE with Westeros Compositor (DISTRO_FEATURES_append = " wayland" required):

$ bitbake wpe-westeros-image

Or build WPE with full screen EGL:

$ bitbake wpe-eglfs-image

Install

To flash the sdimg on the sd card:

$ sudo dd if=tmp/deploy/images/raspberrypi3/wpe-westeros-image-raspberrypi3.rpi-sdimg of=/dev/sdX

Image without Wayland

Optionally it is possible to use the RPI directly on top of RPI userland for the EGL. To achieve this add the following lines to the local config:

WPE_BACKEND = "rpi libinput"
WPE_PLATFORM = "egl"
NETFLIX_BACKEND = "rpi"
DISTRO_FEATURES_remove = "wayland"

Optional settings

Use 4.9 kernel (optional), edit conf/local.conf and set:

PREFERRED_VERSION_linux-raspberrypi = "4.9%"

To build without Westeros/Wayland support on RPI (fullscreen EGL), edit conf/local.conf and set:

WPE_BACKEND_rpi  = "rpi"
DISTRO_FEATURES_remove = "wayland"

Note WPE has many other view backends it can use. To select specific setting, like BCM Nexus or IntelCE edit your conf/local.conf and set the WPE_BACKEND = foo directly.

To build an initramfs image, edit conf/local.conf and set:

INITRAMFS_IMAGE_BUNDLE_rpi = "1"
INITRAMFS_IMAGE_rpi = "wpe-initramfs-image"
KERNEL_INITRAMFS = "-initramfs" BOOT_SPACE = "163840"

To install the initram fs, copy the zImage to the fat32 partition of your RPI.

Clone this wiki locally