Wayland:
Wayland is a display SERVER and COMPOSITION protocol. It is relatively new, as its first release was in 2012.
The protocol enables applications to allocate their own off-screen buffers and render their window contents directly, using hardware accelerated libraries like OpenGL ES, or high quality software implementations like Cairo.
Wayland is ONLY a display server protocol, not a display server itself. Weston is the reference Wayland protocol implementation.
YOCTO Setup
.
$ mkdir ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config –list
$ mkdir fsl-release-bsp
$ cd fsl-release-bsp
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.52-1.1.0_ga
$ repo sync
you will be able to build Yocto and also have all the recipes to do so, we need to add WAYLAND, then execute the following steps:
$ DISTRO=fsl-imx-wayland MACHINE=imx6qsabresd source fsl-setup-release.sh -b build-wayland
$ bitbake fsl-image-gui
After these steps, you will have a wayland based i.MX6Q image where you will be able to play with all the knowledge we provided here.
Once your image has been properly generated, you will find the Weston source codes in:
<YOUR YOCTODIR>/build-wayland/tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/weston/1.9.0-r0/weston-1.9.0
Wayland application for extended desktop:
This functionality is only supported using the GAL2D blitter, in order to enable a multiple desktop approach, you need to pass the following parameters to your weston command:
/etc/init.d/weston stop
echo 0 > /sys/class/graphics/fb4/blank
weston --tty=1 --use-gal2d=1 --use-gl=0 --device=/dev/fb0,/dev/fb4 &
Xwayland:
Wayland is a complete window system in itself, but even so, if we're migrating away from X, it makes sense to have a good backwards compatibility story. With a few changes, the Xorg server can be modified to use wayland input devices for input and forward either the root window or individual top-level windows as wayland surfaces.
DISTRO=fsl-imx-xwayland MACHINE=imx6qsabresd source ./fsl-setup-release.sh -b build-xwayland
bitbake fsl-image-gui
Once you have the image your Wayland/Weston image will be able to run X11 applications
Excepting X11 applications that use EGL, we don’t support that, if you plan to use EGL apps, please use the Wayland provided functions to create the buffer.
Application for rotation:
Weston allows rotating windows with super-key + middle mouse button. As this works for Wayland clients only, you can run Xwayland in weston, run your X application on Xwayland, and rotate the Xwayland display.
For another option:
Create a file ~/.config/weston.ini with this content:
[core]
modules=xwayland.so
shell=desktop-shell.so
idle-time=0
[shell]
background-color=0xff002244
locking=false
# panel-location=none
[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
path=/usr/bin/weston-terminal
[launcher]
icon=/usr/share/icons/hicolor/48x48/apps/firefox.png
path=/usr/bin/firefox
[output]
name=X1
mode=640x800
transform=90
# wanna get mad? use: transform=flipped-270
scale=1
This weston.ini enables a rootless xwayland.so in weston. The [output] section with name=X1 defines weston's appearance as X client.
transform=90 rotates the weston display.
the [launcher] sections can be used to create custom panel starters for your X applications.
See /usr/share/doc/weston/examples/weston.ini for more detailed information
for further cases, I will attach in the future.
@Joan Xie,
Is ther any document or guide for imx8qxp of wayland and weston (run and configuration)? thanks.