Skip to contentSkip to conversation

Pull request for branch yem/rpi-wayland

GIT PULL New Yann E. MORIN 3 participants 22 messages Oct 8, 2013 – Oct 9, 2013

lore
Share & tools
lore
#0 lore raw

From: "Yann E. MORIN" <[email protected]>

Hello All!

This series makes it possible to run weston on the raspberrypi.

The series:
- starts with three fixes (patches 1 through 3)
- then bumps wayland and weston (patches 4 and 5)
- fixes weston configure.ac with patches from upstream (patches 6 and 7)
- modifies weston to build more than one compositor (patch 8)
- fixes rpi-userland (patch 9)
- actualt enables the rpicompoisotor in weston (path 10)
- prepares EGL support for compositors (patch 11)

Please pay special attention to commit logs of patches 6 and 9, they are tricky. I can add more details, or reworks them, if need be.

Regards,
Yann E. MORIN.

The following changes since commit 637421c51f854414c8ecbaf047d1bddd2ac411cd:

lvm2: bump to version 2.02.103 and add license information (2013-10-08 22:54:45 +0200)

are available in the git repository at:

git://gitorious.org/buildroot/buildroot.git yem/rpi-wayland

for you to fetch changes up to fd39ceba9fbd9a3ca62b4920112316a573c76525:

package/weston: add option to enable EGL (2013-10-08 23:21:55 +0200)

----------------------------------------------------------------
Yann E. MORIN (11):
package/rpi-userland: rename patches
package/weston: fix variable name
package/weston: requires host-pkgconf
package/wayland: bump version
package/weston: bump version
package/weston: fix configure.ac to check for wayland-scanner package/weston: fix configure.ac for fbdev compositor package/weston: introduce infrastructure to select other compositors package/rpi-userland: add patch to remove faulty assert() package/weston: add RPi compositor
package/weston: add option to enable EGL

 ... => rpi-userland-000-add-pkgconfig-files.patch} |  0
 ...ake-vmcs.cmake-allow-to-override-VMCS_IN.patch} |  0
 .../rpi-userland-002-remove-faulty-assert.patch    | 21 ++++++++++++++
 package/wayland/wayland.mk                         |  3 +-
 package/weston/Config.in                           | 23 ++++++++++++++--
 ...02-fix-configure.ac-check-wayland-scanner.patch | 26 ++++++++++++++++++
 ...ompositor-fbdev-drop-dependency-on-libdrm.patch | 22 +++++++++++++++
 package/weston/weston.mk                           | 32 ++++++++++++++++++----
 8 files changed, 119 insertions(+), 8 deletions(-)
 rename package/rpi-userland/{rpi-userland-add-pkgconfig-files.patch => rpi-userland-000-add-pkgconfig-files.patch} (100%)
 rename package/rpi-userland/{rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch => rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch} (100%)
 create mode 100644 package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
 create mode 100644 package/weston/weston-0002-fix-configure.ac-check-wayland-scanner.patch
 create mode 100644 package/weston/weston-0003-compositor-fbdev-drop-dependency-on-libdrm.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/11 package/rpi-userland: rename patches

From: "Yann E. MORIN" <[email protected]>

Rename patches to follow standard naming scheme.

---
 ...d-pkgconfig-files.patch => rpi-userland-000-add-pkgconfig-files.patch} | 0
 ...erland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch} | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename package/rpi-userland/{rpi-userland-add-pkgconfig-files.patch => rpi-userland-000-add-pkgconfig-files.patch} (100%)
 rename package/rpi-userland/{rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch => rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch} (100%)
package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch renamed from package/rpi-userland/rpi-userland-add-pkgconfig-files.patch +0 -0
similarity index 100%
rename from package/rpi-userland/rpi-userland-add-pkgconfig-files.patch
rename to package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch
package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch renamed from package/rpi-userland/rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch +0 -0
similarity index 100%
rename from package/rpi-userland/rpi-userland-makefiles-0001-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
rename to package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch
Signature · 1 line
1.8.1.2
#4 lore raw

PATCH 2/11 package/weston: fix variable name

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

The weston package uses the $(WAYLAND_VERSION) variable instead of $(WESTON_VERSION).

This went unnoticed for now, as we were using the same version for wayland and weston. But that's not always the case, since we have, for example: wayland-1.2.1 and weston-1.2.2, and no wayland-1.2.2.

Fix this by using the correct variable.

Cc Thomas Petazzoni <[email protected]>
---
 package/weston/weston.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/weston/weston.mk +1 -1
index 6f7703e..5d2c829 100644
@@ -6,7 +6,7 @@
 
 WESTON_VERSION = 1.1.0
 WESTON_SITE = http://wayland.freedesktop.org/releases/
-WESTON_SOURCE = weston-$(WAYLAND_VERSION).tar.xz
+WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz
 WESTON_LICENSE = MIT
 WESTON_LICENSE_FILES = COPYING
 
Signature · 1 line
1.8.1.2
#5 lore raw

PATCH 2/11 package/weston: fix variable name

Dear Yann E. MORIN,

Quoted 5 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

The weston package uses the $(WAYLAND_VERSION) variable instead of $(WESTON_VERSION).

Quoted 8 lines

This went unnoticed for now, as we were using the same version for wayland and weston. But that's not always the case, since we have, for example: wayland-1.2.1 and weston-1.2.2, and no wayland-1.2.2.

Fix this by using the correct variable.

Cc Thomas Petazzoni <[email protected]>
Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 2/11 package/weston: fix variable name

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]>
Yann> The weston package uses the $(WAYLAND_VERSION) variable instead of Yann> $(WESTON_VERSION).

Yann> This went unnoticed for now, as we were using the same version for Yann> wayland and weston. But that's not always the case, since we have, Yann> for example: wayland-1.2.1 and weston-1.2.2, and no wayland-1.2.2.

Yann> Fix this by using the correct variable.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 3/11 package/weston: requires host-pkgconf

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

weston's configure.ac uses PKG_CHECK_MODULES, so it needs to depend on host-pkgconf.

---
It worked so far since weston depends on packages that themselves depend on host-pkgconf. But for sanity, make weston depend on it, too.

---
 package/weston/weston.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/weston/weston.mk +1 -1
index 5d2c829..38647bd 100644
@@ -10,7 +10,7 @@ WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz
 WESTON_LICENSE = MIT
 WESTON_LICENSE_FILES = COPYING
 
-WESTON_DEPENDENCIES = wayland libxkbcommon pixman libpng \
+WESTON_DEPENDENCIES = host-pkgconf wayland libxkbcommon pixman libpng \
 	jpeg mtdev udev cairo
 WESTON_CONF_OPT = \
 	--disable-egl \
Signature · 1 line
1.8.1.2
#8 lore raw

PATCH 3/11 package/weston: requires host-pkgconf

Dear Yann E. MORIN,

Quoted 6 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

weston's configure.ac uses PKG_CHECK_MODULES,
so it needs to depend on host-pkgconf.

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

PATCH 3/11 package/weston: requires host-pkgconf

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]> Yann> weston's configure.ac uses PKG_CHECK_MODULES, Yann> so it needs to depend on host-pkgconf.

Yann> Signed-off-by: "Yann E. MORIN" <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH 4/11 package/wayland: bump version

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

---
 package/wayland/wayland.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/wayland/wayland.mk +1 -1
index b5fe94d..0810536 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WAYLAND_VERSION = 1.1.0
+WAYLAND_VERSION = 1.2.1
 WAYLAND_SITE = http://wayland.freedesktop.org/releases/
 WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz
 WAYLAND_LICENSE = MIT
Signature · 1 line
1.8.1.2
#11 lore raw

PATCH 5/11 package/weston: bump version

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

---
 package/weston/weston.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/weston/weston.mk +1 -1
index 38647bd..990fb04 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WESTON_VERSION = 1.1.0
+WESTON_VERSION = 1.2.2
 WESTON_SITE = http://wayland.freedesktop.org/releases/
 WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz
 WESTON_LICENSE = MIT
Signature · 1 line
1.8.1.2
#12 lore raw

PATCH 6/11 package/weston: fix configure.ac to check for wayland-scanner

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

configure whines while checking for wayland-scanner.

wayland-scanner is used to generate the protocol parser C files from the protocol definition XML files.

weston has a hard-dependency on wayland-scanner, so it can regenerate its shell/mouse/keyboard/... "handlers".

Since we're using a tarball, those protocol files are already generated and up-to-date, but the check is hard-coded and unconditional. If wayland-scanner is missing, configure fails.

wayland-scanner is provided by wayland, so we'd have to have a host-wayland if we want wayland scanner.

We could well patch away this check, but we'd have to carry and maintain it probably for ever.

Better to fix it, and introduce a host-wayland. Make weston depend on host-wayland. Add a patch from upstream weston to fix configure whining.

---
 package/wayland/wayland.mk                         |  1 +
 ...02-fix-configure.ac-check-wayland-scanner.patch | 26 ++++++++++++++++++++++
 package/weston/weston.mk                           |  8 +++++--
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 package/weston/weston-0002-fix-configure.ac-check-wayland-scanner.patch
package/wayland/wayland.mk +1 -0
index 0810536..093be90 100644
@@ -28,3 +28,4 @@ endef
 WAYLAND_POST_CONFIGURE_HOOKS += WAYLAND_BUILD_SCANNER
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
package/weston/weston-0002-fix-configure.ac-check-wayland-scanner.patch new file +26 -0
new file mode 100644
index 0000000..ca7368f
@@ -0,0 +1,26 @@
+commit 9f43cb48aac9d27aa49fe955104f5cfd204703ed
+Author: Quentin Glidic <[email protected]>
+Date:   Sat Aug 24 20:36:10 2013 +0200
+
+    autotools: Fix AC_PATH_PROG call
+    
+    Signed-off-by: Quentin Glidic <[email protected]>
+    Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff --git a/configure.ac b/configure.ac
+index 0129157..43e5e5c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -424,8 +424,10 @@ if test "x$have_lcms" = xyes; then
+ fi
+ AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
+ 
+-AC_PATH_PROG([wayland_scanner], [wayland-scanner],
+-	     [AC_MSG_ERROR("wayland-scanner is needed to compile weston")])
++AC_PATH_PROG([wayland_scanner], [wayland-scanner])
++if test x$wayland_scanner = x; then
++	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
++fi
+ 
+ AC_CONFIG_FILES([Makefile
+ 		 shared/Makefile
package/weston/weston.mk +6 -2
index 990fb04..8b719b8 100644
@@ -10,8 +10,12 @@ WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz
 WESTON_LICENSE = MIT
 WESTON_LICENSE_FILES = COPYING
 
-WESTON_DEPENDENCIES = host-pkgconf wayland libxkbcommon pixman libpng \
-	jpeg mtdev udev cairo
+WESTON_DEPENDENCIES = host-pkgconf host-wayland wayland libxkbcommon pixman \
+	libpng jpeg mtdev udev cairo
+
+# We touch configure.ac with one of our patches
+WESTON_AUTORECONF = YES
+
 WESTON_CONF_OPT = \
 	--disable-egl \
 	--disable-xwayland \
Signature · 1 line
1.8.1.2
#13 lore raw

PATCH 6/11 package/weston: fix configure.ac to check for wayland-scanner

Dear Yann E. MORIN,

Quoted 14 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

configure whines while checking for wayland-scanner.

wayland-scanner is used to generate the protocol parser C files from the protocol definition XML files.

weston has a hard-dependency on wayland-scanner, so it can regenerate its shell/mouse/keyboard/... "handlers".

Since we're using a tarball, those protocol files are already generated and up-to-date, but the check is hard-coded and unconditional. If wayland-scanner is missing, configure fails.

Quoted 8 lines

wayland-scanner is provided by wayland, so we'd have to have a host-wayland if we want wayland scanner.

We could well patch away this check, but we'd have to carry and maintain it probably for ever.

Better to fix it, and introduce a host-wayland. Make weston depend on host-wayland. Add a patch from upstream weston to fix configure whining.

Huh? wayland.mk does build wayland-scanner with the native compiler before starting the build itself. It doesn't work anymore with 1.2.x ?

Thomas

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

PATCH 6/11 package/weston: fix configure.ac to check for wayland-scanner

Thomas, All,

On 2013-10-09 00:15 +0200, Thomas Petazzoni spake thusly:

Quoted 20 lines

Dear Yann E. MORIN,

Quoted 17 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

configure whines while checking for wayland-scanner.

wayland-scanner is used to generate the protocol parser C files from the protocol definition XML files.

weston has a hard-dependency on wayland-scanner, so it can regenerate its shell/mouse/keyboard/... "handlers".

Since we're using a tarball, those protocol files are already generated and up-to-date, but the check is hard-coded and unconditional. If wayland-scanner is missing, configure fails.

wayland-scanner is provided by wayland, so we'd have to have a host-wayland if we want wayland scanner.

Quoted 8 lines
Quoted 5 lines

We could well patch away this check, but we'd have to carry and maintain it probably for ever.

Better to fix it, and introduce a host-wayland. Make weston depend on host-wayland. Add a patch from upstream weston to fix configure whining.

Huh? wayland.mk does build wayland-scanner with the native compiler before starting the build itself. It doesn't work anymore with 1.2.x ?

He! I did not even check... Yes, it does.
I basically did not expect wayland to build host tools.

I'll rework the series so wayland installs wayland-scanner to $(HOST), and use that instead of host-wayland.

Thanks!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#15 lore raw

PATCH 6/11 package/weston: fix configure.ac to check for wayland-scanner

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN
Quoted 2 lines

Huh? wayland.mk does build wayland-scanner with the native compiler before starting the build itself. It doesn't work anymore with 1.2.x ?

He! I did not even check... Yes, it does.
I basically did not expect wayland to build host tools.

I'll rework the series so wayland installs wayland-scanner to $(HOST), and use that instead of host-wayland.

Well, using a host-wayland package is certainly an alternate approach. But at least at the time of wayland 1.1.x, building wayland-scanner manually was very easy, so I thought it was the best solution to just do it manually in wayland.mk. Should the build process of wayland-scanner become too complicated, having a host-wayland package would certainly be the appropriate solution.

Thomas

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

PATCH 6/11 package/weston: fix configure.ac to check for wayland-scanner

Thomas, All,

On 2013-10-09 00:25 +0200, Thomas Petazzoni spake thusly:

Quoted 13 lines

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN
Quoted 2 lines

Huh? wayland.mk does build wayland-scanner with the native compiler before starting the build itself. It doesn't work anymore with 1.2.x ?

He! I did not even check... Yes, it does.
I basically did not expect wayland to build host tools.

I'll rework the series so wayland installs wayland-scanner to $(HOST), and use that instead of host-wayland.

Quoted 6 lines

Well, using a host-wayland package is certainly an alternate approach. But at least at the time of wayland 1.1.x, building wayland-scanner manually was very easy, so I thought it was the best solution to just do it manually in wayland.mk. Should the build process of wayland-scanner become too complicated, having a host-wayland package would certainly be the appropriate solution.

As discussed on IRC, I'll go for the hand-crafted wayland-scanner install.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#17 lore raw

PATCH 7/11 package/weston: fix configure.ac for fbdev compositor

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Apply patch from upstream.

---
 ...ompositor-fbdev-drop-dependency-on-libdrm.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/weston/weston-0003-compositor-fbdev-drop-dependency-on-libdrm.patch
package/weston/weston-0003-compositor-fbdev-drop-dependency-on-libdrm.patch new file +22 -0
new file mode 100644
index 0000000..dfc20de
@@ -0,0 +1,22 @@
+commit 7b8e970ad1f1ef96db23b379a41edeb40ef1e8b6
+Author: Adrian Negreanu <[email protected]>
+Date:   Thu Sep 26 19:31:32 2013 +0300
+
+    compositor-fbdev: drop dependency on libdrm
+    
+    Signed-off-by: Adrian Negreanu <[email protected]>
+    Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff --git a/configure.ac b/configure.ac
+index 7c2da44..a43bf5b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -190,7 +190,7 @@ AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
+                [test x$enable_fbdev_compositor = xyes])
+ AS_IF([test x$enable_fbdev_compositor = xyes], [
+   AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
+-  PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0 libdrm >= 2.4.30])
++  PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
+ ])
+ 
+ AC_ARG_ENABLE([rdp-compositor], [  --enable-rdp-compositor],,
Signature · 1 line
1.8.1.2
#18 lore raw

PATCH 8/11 package/weston: introduce infrastructure to select other compositors

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

---
 package/weston/Config.in | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
package/weston/Config.in +9 -2
index 56eb135..0f168ac 100644
@@ -14,8 +14,6 @@ config BR2_PACKAGE_WESTON
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
-	# Make sure at least one backend is selected
-	select BR2_PACKAGE_WESTON_FBDEV
 	help
 	  Weston is the reference implementation of a Wayland
 	  compositor, and a useful compositor in its own right.
@@ -26,7 +24,16 @@ config BR2_PACKAGE_WESTON
 
 if BR2_PACKAGE_WESTON
 
+# These two options make sure at least one compositor is selected.
+config BR2_PACKAGE_WESTON_HAS_COMPOSITOR
+	bool
+config BR2_PACKAGE_WESTON_NEEDS_ONE_COMPOSITOR
+	def_bool y
+	depends on ! BR2_PACKAGE_WESTON_HAS_COMPOSITOR
+	select BR2_PACKAGE_WESTON_FBDEV
+
 config BR2_PACKAGE_WESTON_FBDEV
 	bool "fbdev compositor"
+	default y
 
 endif
Signature · 1 line
1.8.1.2
#19 lore raw

PATCH 9/11 package/rpi-userland: add patch to remove faulty assert()

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

While porting wayland/weston to run on the RPi, I always tripped on this assert.

Thinking there was an issue with weston, I poked the weston guys on IRC about the issue. 'daniels' on irc.freenode.net/#wayland suggested removing the assert altogether, as that's what they had pushed upstream in their wayland pull-request:
https://github.com/raspberrypi/userland/pull/92

Turns out they forgot to include this in their pull-request, but that they were using a patched rpi-userland without that assert.

And indeed, without that assert, weston runs on the RPi. :-)

---
The weston guys will probably push this upstream soon. If not, then I'll take the burden to do it.

---
 .../rpi-userland-002-remove-faulty-assert.patch     | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch new file +21 -0
new file mode 100644
index 0000000..5075a1e
@@ -0,0 +1,21 @@
+interface: remove faulty assert() to make weston happy at runtime
+
+This was removed after a discussion on IRC with the weston guys
+(at 'daniels' on irc.freenode.net/#wayland).
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+Upstream status: no, will be pushed by weston guys later.
+If not, I'll do it.
+
+diff -durN rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c
+--- rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-04 17:43:44.000000000 +0200
++++ rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-08 22:28:51.611433539 +0200
+@@ -1187,7 +1187,6 @@
+          continue;
+    
+       if(dispmanx_client.update_callback ) {
+-         vcos_assert( dispmanx_client.pending_update_handle == (DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1]);
+          dispmanx_client.update_callback((DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1], dispmanx_client.update_callback_param);
+       }
+    }
Signature · 1 line
1.8.1.2
#20 lore raw

PATCH 10/11 package/weston: add RPi compositor

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Procedure highly inspired by:
http://wayland.freedesktop.org/raspberrypi.html

The resulting weston works almost flawlessly, but requires a bit of love:
- /boot/config.txt must include this line: dispmanx_offline=1
- at least 128MiB of RAM must be allocated to the GPU
- after 24-or-so terminal-clients are connected, the screen turns black. Exiting a client restores the screen

It seems increasing/decreasing the amount of memory allocated to the GPU makes the clients limit to wobble above/below 24 clients at a time. YMMV, as they say...

Without dispmanx_offline=1, the limit is much below 24, arounf 13. But changing the amount of memory allocated to the GPU does not change this limit in this case. YMMV, again.

Anyway, there are not many different clients available, besides the terminal client, since all other clients are EGL-based, and there is (yet) no EGL support (for weston!) on the RPi. So the tests were made only with the terminal client.

The system is rather smooth, but spwaning too many clients in a rapid-fire is sure to exhibit some lag. Resizing windows is a bit jerky, but moving them along is fine.

---
 package/weston/Config.in |  8 ++++++++
 package/weston/weston.mk | 14 +++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
package/weston/Config.in +8 -0
index 0f168ac..8c00bf6 100644
@@ -36,4 +36,12 @@ config BR2_PACKAGE_WESTON_FBDEV
 	bool "fbdev compositor"
 	default y
 
+config BR2_PACKAGE_WESTON_RPI
+	bool "RPi compositor"
+	depends on BR2_arm                  # rpi-userland
+	depends on BR2_INSTALL_LIBSTDCPP    # rpi-userland
+	depends on BR2_LARGEFILE            # rpi-userland
+	select BR2_PACKAGE_RPI_USERLAND
+	select BR2_PACKAGE_WESTON_HAS_COMPOSITOR
+
 endif
package/weston/weston.mk +13 -1
index 8b719b8..da3e2f5 100644
@@ -23,8 +23,8 @@ WESTON_CONF_OPT = \
 	--disable-drm-compositor \
 	--disable-wayland-compositor \
 	--disable-headless-compositor \
-	--disable-rpi-compositor \
 	--disable-weston-launch \
+	--disable-colord \
 	--disable-libunwind
 
 ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y)
@@ -33,4 +33,16 @@ else
 WESTON_CONF_OPT += --disable-fbdev-compositor
 endif
 
+ifeq ($(BR2_PACKAGE_WESTON_RPI),y)
+WESTON_DEPENDENCIES += rpi-userland
+WESTON_CONF_OPT += --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_OPT += --disable-rpi-compositor
+endif # BR2_PACKAGE_WESTON_RPI
+
 $(eval $(autotools-package))
Signature · 1 line
1.8.1.2
#21 lore raw

PATCH 11/11 package/weston: add option to enable EGL

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Add a no-prompt option to enable EGL. Compositors that can use EGL can select this option.

Currently, no compositor (supported by Buildroot) selects EGL, but this will be the case when westion 1.3.0 is out (since the RPi compositor will have gained EGL support by that time with commit #b4659eb in upstream weston).

---
 package/weston/Config.in | 4 ++++
 package/weston/weston.mk | 6 ++++++
 2 files changed, 10 insertions(+)
package/weston/Config.in +4 -0
index 8c00bf6..4096671 100644
@@ -24,6 +24,10 @@ config BR2_PACKAGE_WESTON
 
 if BR2_PACKAGE_WESTON
 
+# Whether EGL support is needed
+config BR2_PACKAGE_WESTON_EGL
+    bool
+
 # These two options make sure at least one compositor is selected.
 config BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	bool
package/weston/weston.mk +6 -0
index da3e2f5..d8c5ec1 100644
@@ -27,6 +27,12 @@ WESTON_CONF_OPT = \
 	--disable-colord \
 	--disable-libunwind
 
+ifeq ($(BR2_PACKAGE_WESTON_EGL),y)
+WESTON_CONF_OPT += --enable-egl
+else
+WESTON_CONF_OPT += --disable-egl --disable-simple-egl-clients
+endif
+
 ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y)
 WESTON_CONF_OPT += --enable-fbdev-compositor
 else
Signature · 1 line
1.8.1.2