Wayland: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 7: Line 7:
=== Enable Wayland in a image ===
=== Enable Wayland in a image ===


* If "wayland" distro feature, Mesa builds the wayland-egl platform
The wayland compositor can be enabled by listing it as a DISTRO_FEATURE; there are two steps:
* Weston compositor. If wayland disto feature, build with KMS. If x11 distro feature, builds with X11.


To enable in an image, you need to add the following parameters in conf/local.conf:
==== Enable building ====
* CORE_IMAGE_EXTRA_INSTALL += "wayland weston"  
 
* Wayland - If "wayland" flag in DISTRO_FEATURES is set, Mesa builds the wayland-egl platform
* Weston compositor -
** If "wayland flag in DISTRO_FEATURES is set, Weston will build with KMS support.  
** Also, if X11 is enabled, as in the x11 DISTRO_FEATURES flag is set, weston will be build with X11 support.
 
The preferred way to enable building is
 
DISTRO_FEATURES_append = " wayland x11"
 
==== Enable installing in an image ====


By default, the weston will be built with only the X11-backend compositor. To enable the DRI/KMS backend (in order to run weston directly on hardware), you need to also add
To set installation in an image, you need to add the following parameters in conf/local.conf:


* DISTRO_FEATURES_append = " wayland" # notice the extra space, it's important !
* CORE_IMAGE_EXTRA_INSTALL += "wayland weston"  


=== Running Weston ===
=== Running Weston ===
Line 30: Line 39:
* mkdir -p /tmp/$USER-weston
* mkdir -p /tmp/$USER-weston
* chmod 0700 /tmp/$USER-weston
* chmod 0700 /tmp/$USER-weston
* export XDG_RUNTIME_DIR=/tmp/$USER=weston
* export XDG_RUNTIME_DIR=/tmp/$USER-weston


==== Launch ====
==== Launch ====
Line 42: Line 51:
Weston 1.0.3 will not run directly on the emulated QEMU hardware, due to lack of EGL support.
Weston 1.0.3 will not run directly on the emulated QEMU hardware, due to lack of EGL support.


Under X, there is a problem displaying the window, https://bugzilla.yoctoproject.org/show_bug.cgi?id=3879
Weston will run under X emulation without issues.
 


=== Physical Machines ===
=== Physical Machines ===

Latest revision as of 08:48, 16 July 2018

Current Status

Wayland protocol libraries and the reference Weston compositor are integrated as packages in the core-oe meta/ layer. The packages can be build against targets that accept mesa-dri. For example, intel-specific emgd drivers that override mesa-dri cannot be used to build Weston.

Enable Wayland in a image

The wayland compositor can be enabled by listing it as a DISTRO_FEATURE; there are two steps:

Enable building

  • Wayland - If "wayland" flag in DISTRO_FEATURES is set, Mesa builds the wayland-egl platform
  • Weston compositor -
    • If "wayland flag in DISTRO_FEATURES is set, Weston will build with KMS support.
    • Also, if X11 is enabled, as in the x11 DISTRO_FEATURES flag is set, weston will be build with X11 support.

The preferred way to enable building is

DISTRO_FEATURES_append = " wayland x11"

Enable installing in an image

To set installation in an image, you need to add the following parameters in conf/local.conf:

  • CORE_IMAGE_EXTRA_INSTALL += "wayland weston"

Running Weston

To run Weston inside X11, simply adding weston to the image will be sufficient. Under Sato there will be a Weston launcher in the Utility category.

Wayland/Weston work in still developer-oriented. The best way to run them is through CLI. As we fine tune the way to run Weston and setting policies, scripts to automate this work will be provided.

Environment setup

Please do export XDG_RUNTIME_DIR:

  • mkdir -p /tmp/$USER-weston
  • chmod 0700 /tmp/$USER-weston
  • export XDG_RUNTIME_DIR=/tmp/$USER-weston

Launch

  • weston

Current working status

QEMU

Weston 1.0.3 will not run directly on the emulated QEMU hardware, due to lack of EGL support.

Weston will run under X emulation without issues.


Physical Machines

There is no embedded-class physical machine yet verified to run Weston to top of hardware. Current efforts focus on enabling FRI2.

Plan

  • Upgrade Weston to a version that can run only on framebuffer (e.g. pixman)
  • Image that boots Weston on KMS
  • Enable GTK+ 3 Wayland support
  • Enable Qt Wayland support
  • Enable Clutter Wayland support