Building Wayland-Weston for i.MX6

Document created by Prabhu Sundararaj Employee on Aug 12, 2013Last modified by ebiz_ws_prod on Dec 13, 2017
Version 4Show Document
  • View in full screen mode

The instructions is based on building wayland-weston on Ubuntu prebuilt image. The same can be applied to other build systems as well.




The following is the software environment required:


- Ubuntu Oneiric (11.10) distribution. (Download Pre-built Ubuntu demo image from

- Wayland/Weston : Wayland dependencies are listed in

- 0001-DRM-condition.patch and 0002-Enable-weston-for-Vivante-GPU.patches for Weston.



This release is based on Wayland 1.1.0 version.



  1. The steps are based on wayland building from
  2. Download wayland-1.1.0.tar.xz from

   3. Setting up the environment. This need to be performed on the target

$export WLD=/usr

$export LD_LIBRARY_PATH=$WLD/lib

$export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/

$export ACLOCAL="aclocal -I $WLD/share/aclocal"


       Also, create the 'share/aclocal' directory.


               $mkdir -p $WLD/share/aclocal

      Let us consider, extracting the package to /opt

$cd /opt

$tar xvvf wayland-1.1.0.tar.xz

$cd wayland-1.1.0

$ ./configure --prefix=$WLD --disable-documentation

$ make

$ make install


  4. Setting up GPU-VIV graphics drivers

The GPU-VIV graphics drivers are available as part of BSP release.

Get the gpu-viv-wl-bin-mx6q-{VER}.tar.gz for 4.0.0 release gpu-viv-wl-bin-mx6q-3.0.35-4.0.0.tar.gz from the BSP-Source/pkgs

Extract to the target $ROOTFS

The prebuilt root file system (rootfs) may come with prebuilt GPU driver. By default, it may set to EGL framebuffer.

To enable Wayland/Weston support, make EGL and GAL point to correct binaries as shown below:

$ ls –l $(ROOTFS)/usr/lib/* -> ->

$ ls –l $(ROOTFS)/usr/lib/



  5. Build the libxkbcommon as in

6. We will need Cairo stack as Weston clients depend on Cairo for rendering. Please build Cairo as described in, but note that, for now, we do not enable gl backend for Cairo, so the '--enable-gl --enable-xcb' flags must not be used when building.

7. Building Weston

    Now add the following environment settings in the terminal window. (Note the "`"- backtick - character).

export WLD=/usr


export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/

export ACLOCAL="aclocal -I $WLD/share/aclocal"

export LD_LIBRARY_PATH="/usr/lib"

export LDFLAGS="-lwayland-server -lwayland-client -lwayland-server -lwayland-cursor -lpixman-1"

export COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1"

export COMPOSITOR_CFLAGS="-I $WLD/include -I $WLD/include/pixman-1 -L$SDK_DIR/drivers -DLINUX=1 -DEGL_API_FB -DEGL_API_WL"

export CLIENT_CFLAGS="-I $WLD/include -I $WLD/include/cairo -I $WLD/include/pixman-1"

export CLIENT_LIBS="-lGLESv2 -lEGL -lwayland-client -lwayland-cursor -lxkbcommon"


export SIMPLE_EGL_CLIENT_LIBS="-lGLESv2 -lEGL -lwayland-client -lwayland-cursor"

export IMAGE_LIBS="-lwayland-cursor"

export WESTON_INFO_LIBS="-lwayland-client"


Apply the two patches 0001-DRM-condition.patch and 0002-Enable-weston-for-Vivante-GPU.patch.


Build the Weston.

$cd /opt

$tar xvvf weston-1.1.1.tar.xz

$ cd weston-1.1.1

    $ ./configure --prefix=$WLD \

        --disable-setuid-install \

        --disable-x11-compositor --disable-drm-compositor \

        --disable-rpi-compositor --disable-wayland-compositor \

        --disable-weston-launch --disable-libunwind \

        --disable-xwayland-test \


$ make

$ make install


Also, Weston must be run as root. copy weston.ini and weston-desktop-shell.ini to /root/.config/ . In terminal window,

export LD_LIBRARY_PATH="/usr/lib"

export XDG_RUNTIME_DIR=/tmp

Execute 'src/weston'. You should see a blue screen fading in. In a different terminal, enter 'clients/simple-shm &'. You should see a scrolling color pattern. You can then enter 'clients/simple-egl &' to see a 3D client  action.

Original Attachment has been moved to:

Original Attachment has been moved to: