Weston package enhancement
v2 cover Weston package enhancement
Changes for v2:
* Add libdrm dependency for DRM compositor
* Add weston-launch support
* Drop useless --disable-xwayland-test
Gustavo Zacarias (6):
weston: add EGL support
weston: set default backend for fbdev
weston: add DRM compoitor support
weston: handle optional libva support
weston: add weston-launch support
weston: drop --disable-xwayland-test
package/weston/Config.in | 10 ++++++++++ package/weston/weston.mk | 47 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 48 insertions(+), 9 deletions(-)
Signature · 1 line
2.7.3
PATCH v2 1/6 weston: add EGL support
Also drop simple-egl-clients from the rpi compositor since it's a duplicate of the global one.
--- package/weston/weston.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
package/weston/weston.mk +6 -2
@@ -15,7 +15,6 @@ WESTON_DEPENDENCIES = host-pkgconf wayland wayland-protocols \ WESTON_CONF_OPTS = \ --with-dtddir=$(STAGING_DIR)/usr/share/wayland \ - --disable-egl \ --disable-simple-egl-clients \ --disable-xwayland \ --disable-x11-compositor \
@@ -28,6 +27,12 @@ WESTON_CONF_OPTS = \ WESTON_MAKE_OPTS = \ WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +WESTON_DEPENDENCIES += libegl +else +WESTON_CONF_OPTS += --disable-egl +endif + ifeq ($(BR2_PACKAGE_LIBUNWIND),y) WESTON_DEPENDENCIES += libunwind else
@@ -53,7 +58,6 @@ WESTON_CONF_OPTS += --enable-rpi-compositor \ --disable-resize-optimization \ --disable-setuid-install \ --disable-xwayland-test \ - --disable-simple-egl-clients \ WESTON_NATIVE_BACKEND=rpi-backend.so else WESTON_CONF_OPTS += --disable-rpi-compositor
Signature · 1 line
2.7.3
PATCH v2 2/6 weston: set default backend for fbdev
In reply to Gustavo ZacariasWhen it's enabled set the default weston backend to fbdev, otherwise the drm backend is the default even though we are not building it.
--- package/weston/weston.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/weston/weston.mk +3 -1
@@ -47,7 +47,9 @@ WESTON_CONF_OPTS += --disable-rdp-compositor endif ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y) -WESTON_CONF_OPTS += --enable-fbdev-compositor +WESTON_CONF_OPTS += \ + --enable-fbdev-compositor \ + WESTON_NATIVE_BACKEND=fbdev-backend.so else WESTON_CONF_OPTS += --disable-fbdev-compositor endif
Signature · 1 line
2.7.3
PATCH v2 3/6 weston: add DRM compoitor support
In reply to Gustavo Zacarias--- package/weston/Config.in | 10 ++++++++++ package/weston/weston.mk | 10 +++++++++- 2 files changed, 19 insertions(+), 1 deletion(-)
package/weston/Config.in +10 -0
@@ -37,6 +37,16 @@ if BR2_PACKAGE_WESTON config BR2_PACKAGE_WESTON_HAS_COMPOSITOR bool +config BR2_PACKAGE_WESTON_DRM + bool "DRM compositor" + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_WESTON_HAS_COMPOSITOR + +# Uses libgbm from mesa3d +comment "DRM compositor needs an OpenGL EGL backend provided by mesa3d" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL + config BR2_PACKAGE_WESTON_FBDEV bool "fbdev compositor"
package/weston/weston.mk +9 -1
@@ -18,7 +18,6 @@ WESTON_CONF_OPTS = \ --disable-simple-egl-clients \ --disable-xwayland \ --disable-x11-compositor \ - --disable-drm-compositor \ --disable-wayland-compositor \ --disable-headless-compositor \ --disable-weston-launch \
@@ -54,6 +53,15 @@ else WESTON_CONF_OPTS += --disable-fbdev-compositor endif +ifeq ($(BR2_PACKAGE_WESTON_DRM),y) +WESTON_CONF_OPTS += \ + --enable-drm-compositor \ + WESTON_NATIVE_BACKEND=drm-backend.so +WESTON_DEPENDENCIES += libdrm +else +WESTON_CONF_OPTS += --disable-drm-compositor +endif + ifeq ($(BR2_PACKAGE_WESTON_RPI),y) WESTON_DEPENDENCIES += rpi-userland WESTON_CONF_OPTS += --enable-rpi-compositor \
Signature · 1 line
2.7.3
PATCH v2 4/6 weston: handle optional libva support
In reply to Gustavo ZacariasThere's no enable/disable option so it's just the dependency.
--- package/weston/weston.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/weston/weston.mk +2 -1
@@ -11,7 +11,8 @@ WESTON_LICENSE = MIT WESTON_LICENSE_FILES = COPYING WESTON_DEPENDENCIES = host-pkgconf wayland wayland-protocols \ - libxkbcommon pixman libpng jpeg mtdev udev cairo libinput + libxkbcommon pixman libpng jpeg mtdev udev cairo libinput \ + $(if $(BR2_PACKAGE_LIBVA),libva) WESTON_CONF_OPTS = \ --with-dtddir=$(STAGING_DIR)/usr/share/wayland \
Signature · 1 line
2.7.3
PATCH v2 5/6 weston: add weston-launch support
In reply to Gustavo ZacariasThe weston-launch supplemental group is for users to be able to use/launch weston.
For a full weston(-launch) experience users should be at least members of weston-launch, video (for framebuffer permissions) and optionally audio.
--- package/weston/weston.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
package/weston/weston.mk +18 -3
@@ -21,12 +21,28 @@ WESTON_CONF_OPTS = \ --disable-x11-compositor \ --disable-wayland-compositor \ --disable-headless-compositor \ - --disable-weston-launch \ - --disable-colord + --disable-colord \ + --disable-setuid-install WESTON_MAKE_OPTS = \ WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols +# weston-launch must be u+s root in order to work properly +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +define WESTON_PERMISSIONS + /usr/bin/weston-launch f 4755 0 0 - - - - - +endef +define WESTON_USERS + - - weston-launch -1 - - - - Weston launcher group +endef +WESTON_CONF_OPTS += \ + --enable-weston-launch \ + --disable-setuid-install +WESTON_DEPENDENCIES += linux-pam +else +WESTON_CONF_OPTS += --disable-weston-launch +endif + ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) WESTON_DEPENDENCIES += libegl else
@@ -67,7 +83,6 @@ ifeq ($(BR2_PACKAGE_WESTON_RPI),y) WESTON_DEPENDENCIES += rpi-userland WESTON_CONF_OPTS += --enable-rpi-compositor \ --disable-resize-optimization \ - --disable-setuid-install \ --disable-xwayland-test \ WESTON_NATIVE_BACKEND=rpi-backend.so else
Signature · 1 line
2.7.3
PATCH v2 6/6 weston: drop --disable-xwayland-test
In reply to Gustavo ZacariasIt's in the rpi backend block which makes no sense, and it depends on xwayland being enabled which we currently don't support so remove it.
--- package/weston/weston.mk | 1 - 1 file changed, 1 deletion(-)
package/weston/weston.mk +0 -1
@@ -83,7 +83,6 @@ ifeq ($(BR2_PACKAGE_WESTON_RPI),y) WESTON_DEPENDENCIES += rpi-userland WESTON_CONF_OPTS += --enable-rpi-compositor \ --disable-resize-optimization \ - --disable-xwayland-test \ WESTON_NATIVE_BACKEND=rpi-backend.so else WESTON_CONF_OPTS += --disable-rpi-compositor
Signature · 1 line
2.7.3