Skip to contentSkip to conversation

Weston package enhancements

PATCH New Gustavo Zacarias 2 participants 15 messages Mar 29, 2016 – Mar 30, 2016

lore
Share & tools
lore
#0 lore raw

v3 cover Weston package enhancements

Changes for v3:
* Explicitly disable EGL if not available
* EGL requires mesa as provider
* libva can in fact be disabled/enabled
* Add explicit dbus support
* Add explicit lcms support
* Add explicit webp support
* Add explicit systemd support
* Add explicit libxml2 support

Changes for v2:
* Add libdrm dependency for DRM compositor
* Add weston-launch support
* Drop useless --disable-xwayland-test

Gustavo Zacarias (11):
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
weston: handle dbus dependency
weston: handle lcms dependecy
weston: handle webp dependency
weston: handle systemd dependency
weston: handle libxml2 dependency

 package/weston/Config.in | 10 ++++++
 package/weston/weston.mk | 82 ++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 83 insertions(+), 9 deletions(-)
Signature · 1 line
2.7.3
#1 lore raw

PATCH v3 1/11 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 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
package/weston/weston.mk +8 -2
index d818071..e7ad97e 100644
@@ -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,14 @@ WESTON_CONF_OPTS = \
 WESTON_MAKE_OPTS = \
 	WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols
 
+# Needs wayland-egl, which normally only mesa provides
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),yy)
+WESTON_CONF_OPTS += --enable-egl
+WESTON_DEPENDENCIES += libegl
+else
+WESTON_CONF_OPTS += --disable-egl
+endif
+
 ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
 WESTON_DEPENDENCIES += libunwind
 else
@@ -53,7 +60,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
#2 lore raw

PATCH v3 2/11 weston: set default backend for fbdev

In reply to Gustavo Zacarias

When 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
index e7ad97e..5af23df 100644
@@ -49,7 +49,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
#3 lore raw

PATCH v3 3/11 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
index aaf1706..8cefa41 100644
@@ -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
index 5af23df..d600bc3 100644
@@ -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 \
@@ -56,6 +55,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
#4 lore raw

PATCH v3 4/11 weston: handle optional libva support

In reply to Gustavo Zacarias

It's used for the recorder.

---
 package/weston/weston.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/weston/weston.mk +7 -0
index d600bc3..08c6337 100644
@@ -75,4 +75,11 @@ else
 WESTON_CONF_OPTS += --disable-rpi-compositor
 endif # BR2_PACKAGE_WESTON_RPI
 
+ifeq ($(BR2_PACKAGE_LIBVA),y)
+WESTON_CONF_OPTS += --enable-vaapi-recorder
+WESTON_DEPENDENIES += libva
+else
+WESTON_CONF_OPTS += --disable-vaapi-recorder
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.3
#5 lore raw

PATCH v3 5/11 weston: add weston-launch support

In reply to Gustavo Zacarias

The 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 | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
package/weston/weston.mk +16 -3
index 08c6337..e83abe0 100644
@@ -20,12 +20,26 @@ 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
+WESTON_DEPENDENCIES += linux-pam
+else
+WESTON_CONF_OPTS += --disable-weston-launch
+endif
+
 # Needs wayland-egl, which normally only mesa provides
 ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),yy)
 WESTON_CONF_OPTS += --enable-egl
@@ -68,7 +82,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
#6 lore raw

PATCH v3 6/11 weston: drop --disable-xwayland-test

In reply to Gustavo Zacarias

It'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
index e83abe0..363a2bf 100644
@@ -82,7 +82,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
#7 lore raw

PATCH v3 7/11 weston: handle dbus dependency

In reply to Gustavo Zacarias
---
 package/weston/weston.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/weston/weston.mk +7 -0
index 363a2bf..72190a8 100644
@@ -26,6 +26,13 @@ WESTON_CONF_OPTS = \
 WESTON_MAKE_OPTS = \
 	WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols
 
+ifeq ($(BR2_PACKAGE_DBUS),y)
+WESTON_CONF_OPTS += --enable-dbus
+WESTON_DEPENDENCIES += dbus
+else
+WESTON_CONF_OPTS += --disable-dbus
+endif
+
 # weston-launch must be u+s root in order to work properly
 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
 define WESTON_PERMISSIONS
Signature · 1 line
2.7.3
#8 lore raw

PATCH v3 8/11 weston: handle lcms dependecy

In reply to Gustavo Zacarias
---
 package/weston/weston.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/weston/weston.mk +7 -0
index 72190a8..e3a8f29 100644
@@ -101,4 +101,11 @@ else
 WESTON_CONF_OPTS += --disable-vaapi-recorder
 endif
 
+ifeq ($(BR2_PACKAGE_LCMS2),y)
+WESTON_CONF_OPTS += --enable-lcms
+WESTON_DEPENDENCIES += lcms2
+else
+WESTON_CONF_OPTS += --disable-lcms
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.3
#9 lore raw

PATCH v3 9/11 weston: handle webp dependency

In reply to Gustavo Zacarias

It doesn't have an enable/disable switch so it's just the dependency.

---
 package/weston/weston.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/weston/weston.mk +2 -1
index e3a8f29..de734e0 100644
@@ -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_WEBP),webp)
 
 WESTON_CONF_OPTS = \
 	--with-dtddir=$(STAGING_DIR)/usr/share/wayland \
Signature · 1 line
2.7.3
#10 lore raw

PATCH v3 10/11 weston: handle systemd dependency

In reply to Gustavo Zacarias
---
 package/weston/weston.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/weston/weston.mk +7 -0
index de734e0..9313fcc 100644
@@ -109,4 +109,11 @@ else
 WESTON_CONF_OPTS += --disable-lcms
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+WESTON_CONF_OPTS += --enable-systemd-login --enable-systemd-notify
+WESTON_DEPENDENCIES += systemd
+else
+WESTON_CONF_OPTS += --disable-systemd-login --disable-systemd-notify
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.3
#11 lore raw

PATCH v3 11/11 weston: handle libxml2 dependency

In reply to Gustavo Zacarias

It's used for JUnit XML output support.

---
 package/weston/weston.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/weston/weston.mk +7 -0
index 9313fcc..2891fe3 100644
@@ -116,4 +116,11 @@ else
 WESTON_CONF_OPTS += --disable-systemd-login --disable-systemd-notify
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+WESTON_CONF_OPTS += --enable-junit-xml
+WESTON_DEPENDENCIES += libxml2
+else
+WESTON_CONF_OPTS += --disable-junit-xml
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.3
#12 lore raw

PATCH v3 11/11 weston: handle libxml2 dependency

Hello,

Quoted 12 lines · Gustavo Zacarias

It's used for JUnit XML output support.

---
 package/weston/weston.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/weston/weston.mk +0 -0
index 9313fcc..2891fe3 100644

package/weston/weston.mk else · line 124

Quoted 9 lines
package/weston/weston.mk +6 -0
@@ -116,4 +116,11 @@ else
 WESTON_CONF_OPTS += --disable-systemd-login --disable-systemd-notify
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+WESTON_CONF_OPTS += --enable-junit-xml
+WESTON_DEPENDENCIES += libxml2
+else
+WESTON_CONF_OPTS += --disable-junit-xml
+endif

Do we really care about this JUnit XML output support ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#13 lore raw

PATCH v3 11/11 weston: handle libxml2 dependency

Quoted 10 lines · Thomas Petazzoni

package/weston/weston.mk else · line 124

Quoted 6 lines
package/weston/weston.mk +6 -0
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+WESTON_CONF_OPTS += --enable-junit-xml
+WESTON_DEPENDENCIES += libxml2
+else
+WESTON_CONF_OPTS += --disable-junit-xml
+endif

Do we really care about this JUnit XML output support ?

Thomas

Probably not very useful, just wanted to cover all available possibilities. Regards.

#14 lore raw

v3 cover Weston package enhancements

In reply to Gustavo Zacarias

Hello,

Quoted 4 lines · Gustavo Zacarias

Gustavo Zacarias (11):
weston: add EGL support
weston: set default backend for fbdev
weston: add DRM compoitor support

Quoted 8 lines

weston: handle optional libva support
weston: add weston-launch support
weston: drop --disable-xwayland-test
weston: handle dbus dependency
weston: handle lcms dependecy
weston: handle webp dependency
weston: handle systemd dependency
weston: handle libxml2 dependency

I've applied all, but I have a few comments on a few of them, which I'll do as reply to the patches themselves.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com