This repository provides build configurations for generating WPE images using the Yocto Project and kas. It supports multiple target devices (e.g. Raspberry Pi 3, 4, and 5) and includes instructions for building an SDK toolchain.
-
Install
kasand the container engine:# default: sudo apt-get install docker-ce # alternative option: sudo apt-get install podman export KAS_CONTAINER_ENGINE=podman
sudo apt-get install pipx pipx install kas>=5.0 -
Create your workdir:
mkdir -p ~/workdir/wpe-image cd ~/workdir/wpe-image git clone https://github.com/igalia/meta-wpe-image.git cd meta-wpe-image
-
Define external paths for the download and the shared state cached dirs:
export DL_DIR=$PWD/../cache/downloads/ export SSTATE_DIR=$PWD/../cache/sstate-cache/
-
Build your target enviroment. Examples:
-
RPI3:
export KAS_WORK_DIR="workdir/wpe-image-rpi3" mkdir -p ${KAS_WORK_DIR} kas-container build kas.yml:kas/machines/raspberrypi3-mesa.yml:kas/presets/wpe-nightly.yml
-
RPI4-64 using the propietary graphics stack (vc4graphics):
export KAS_WORK_DIR="workdir/wpe-image-rpi4-64" mkdir -p ${KAS_WORK_DIR} kas-container build kas.yml:kas/machines/raspberrypi4-64-mesa.yml:kas/presets/wpe-nightly.yml
-
RPI5:
export KAS_WORK_DIR="workdir/wpe-image-rpi5" mkdir -p ${KAS_WORK_DIR} kas-container build kas.yml:kas/machines/raspberrypi5.yml:kas/presets/wpe-nightly.yml
-
💡 Tip: Check the kas/machines/ directory for additional target configurations.
After the build completes, the generated image will be located at:
${KAS_WORK_DIR}/build/deploy/images/<<machine>>/
-
Preparing the SDK Toolchain
The following example targets
raspberrypi3-mesa, but the same steps apply to other machines with minor adjustments.export KAS_WORK_DIR="workdir/wpe-image" BASE_IMAGE=core-image-wpe-base kas-container shell kas.yml:kas/machines/raspberrypi3-mesa.yml -c "bitbake ${BASE_IMAGE} -c populate_sdk"
Check the resulting SDK installer:
ls ${KAS_WORK_DIR}/build/tmp/deploy/sdk/poky-wayland-*-raspberrypi3-mesa-toolchain-*.sh
-
Installing the SDK Toolchain
# execute the desired version ./tmp/deploy/sdk/poky-wayland-*-raspberrypi3-mesa-toolchain-*.sh -d ~/toolchain_env -y
-
Activate the SDK Toolchain
. ~/toolchain_env/environment-setup-*
Expected output includes variables such as:
$ env | grep OE ... OECORE_NATIVE_SYSROOT="${HOME}"/toolchain_env/sysroots/x86_64-pokysdk-linux OECORE_TARGET_OS=linux-gnueabi OECORE_TARGET_ARCH=arm ... $ env | grep poky ... CC=arm-poky-linux-gnueabi-gcc ... CXX=arm-poky-linux-gnueabi-g++ ... ...
- Weston:
/usr/bin/wpe-exported-wayland https://wpewebkit.org - DRM:
export WPE_DISPLAY="wpe-display-drm"; /usr/bin/wpe-exported-wayland https://wpewebkit.org
Contributions are welcomed!. Please send your patches as Pull Requests or fill a Issue report in case you need to ask for help.
Please follow standard Yocto contribution guidelines and ensure patches are well‑tested before submission.