weston: new freerdp backend (branch yem/freerdp)
v4 cover weston: new freerdp backend (branch yem/freerdp)
Hello All!
This series adds the RDP backend to Weston. As a side effect, it cleans up and enhances FreeRDP.
Changes v3 -> v4:
- re-order arch-specific options for ease of review
- rebase; drop applied patch about man pages (Thomas)
Changes v2 -> v3:
- rework completely the depednencies on X11 libraries (Samuel)
- only install keys when the server is enabled (Samuel)
Changes v1 -> v2:
- new package python-lxml, needed for opengl-registry (Tomas P.)
- cleanup opengl-registry and nvidia-driver (Thomas P.)
- drop applied patches (Thomas P.)
Regards,
Yann E. MORIN.
The following changes since commit 88f3034651364d2cd6066f2df339a32e8eef8fc6:
dmalloc: Force arm mode instead of Thumb1 mode (2015-01-25 20:30:18 +0100)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/freerdp
for you to fetch changes up to afeaa5c1b90c41b25a3ace3c6d9a29f33d161aa3:
package/weston: add support for the RDP compositor (2015-01-25 23:31:57 +0100)
----------------------------------------------------------------
Yann E. MORIN (6):
package/freerdp: do not forcibly depend on X.Org package/freerdp: move architecture-specific block package/freerdp: add options to enable/disable server and/or client package/freerdp: also install to staging package/freerdp: install server key and certificate package/weston: add support for the RDP compositor
package/Config.in | 2 +- package/freerdp/Config.in | 29 +++++- .../freerdp-0002-fix-building-shared-libs.patch | 23 +++++ package/freerdp/freerdp.mk | 108 ++++++++++++++++++--- package/weston/Config.in | 17 ++++ package/weston/weston.mk | 7 ++ 6 files changed, 165 insertions(+), 21 deletions(-) create mode 100644 package/freerdp/freerdp-0002-fix-building-shared-libs.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. | '------------------------------^-------^------------------^--------------------'
PATCH v4 1/6 package/freerdp: do not forcibly depend on X.Org
It is possible to build the libfreerdp standalone, without X.Org. Having a libfreerdp will be usefull for the weston RDP compositor.
So, only select the strictly required X.Org library if X.Org is enabled, and only build with Xcursor if it is enabled. Drop dependency on other X.Org libraries, as they are not strictly required (or get pulled as dependencies of the mandatory libXext).
Re-order the menuconfig, as freerdp is no longer an X-only application.
--- package/Config.in | 2 +- package/freerdp/Config.in | 6 +----- package/freerdp/freerdp.mk | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 8 deletions(-)
package/Config.in +1 -1
@@ -211,6 +211,7 @@ endif source "package/fb-test-app/Config.in" source "package/fbterm/Config.in" source "package/fbv/Config.in" + source "package/freerdp/Config.in" source "package/imagemagick/Config.in" source "package/linux-fusion/Config.in" source "package/lite/Config.in"
@@ -247,7 +248,6 @@ comment "X applications" source "package/dillo/Config.in" source "package/docker/Config.in" source "package/feh/Config.in" - source "package/freerdp/Config.in" source "package/gmpc/Config.in" source "package/gob2/Config.in" source "package/gqview/Config.in"
package/freerdp/Config.in +1 -5
@@ -1,12 +1,8 @@ config BR2_PACKAGE_FREERDP bool "freerdp" select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXT - select BR2_PACKAGE_XLIB_LIBXEXT - select BR2_PACKAGE_XLIB_LIBXCURSOR select BR2_PACKAGE_ZLIB - depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 help FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license
package/freerdp/freerdp.mk +15 -2
@@ -7,8 +7,7 @@ # Changeset on the stable-1.1 branch FREERDP_VERSION = 440916eae2e07463912d5fe507677e67096eb083 FREERDP_SITE = $(call github,FreeRDP,FreeRDP,$(FREERDP_VERSION)) -FREERDP_DEPENDENCIES = openssl zlib \ - xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor +FREERDP_DEPENDENCIES = openssl zlib FREERDP_LICENSE = Apache-2.0 FREERDP_LICENSE_FILES = LICENSE
@@ -42,6 +41,20 @@ else FREERDP_CONF_OPTS += -DWITH_PULSEAUDIO=OFF endif +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) +FREERDP_DEPENDENCIES += xlib_libXext +FREERDP_CONF_OPTS += -DWITH_X11=ON +else +FREERDP_CONF_OPTS += -DWITH_X11=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +FREERDP_CONF_OPTS += -DWITH_XCURSOR=ON +FREERDP_DEPENDENCIES += xlib_libXcursor +else +FREERDP_CONF_OPTS += -DWITH_XCURSOR=OFF +endif + ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) FREERDP_CONF_OPTS += -DWITH_XINERAMA=ON FREERDP_DEPENDENCIES += xlib_libXinerama
Signature · 1 line
1.9.1
PATCH v4 1/6 package/freerdp: do not forcibly depend on X.Org
Dear Yann E. MORIN,
Quoted 10 lines · Yann E. MORIN
It is possible to build the libfreerdp standalone, without X.Org. Having a libfreerdp will be usefull for the weston RDP compositor.
So, only select the strictly required X.Org library if X.Org is enabled, and only build with Xcursor if it is enabled. Drop dependency on other X.Org libraries, as they are not strictly required (or get pulled as dependencies of the mandatory libXext).
Re-order the menuconfig, as freerdp is no longer an X-only application.
Quoted 7 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Reviewed-by Samuel Martin <[email protected]>--- package/Config.in | 2 +- package/freerdp/Config.in | 6 +----- package/freerdp/freerdp.mk | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 8 deletions(-)
Unfortunately, it doesn't build here :-/
Here is the defconfig I'm using:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2014.11.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17=y
BR2_TOOLCHAIN_EXTERNAL_LARGEFILE=y
BR2_TOOLCHAIN_EXTERNAL_INET_IPV6=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_FREERDP=y
# BR2_TARGET_ROOTFS_TAR is not set
The error I'm getting are:
-- checking for module 'gstreamer-plugins-base-0.10'
-- package 'gstreamer-plugins-base-0.10' not found
-- Could NOT find GSTREAMER (missing: GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIRS) CMake Warning at cmake/FindFeature.cmake:46 (message):
feature Gstreamer was requested but could not be found! ON / FALSE
Call Stack (most recent call first):
CMakeLists.txt:377 (find_feature)
The GStreamer part of it I've fixed by adding:
+ifeq ($(BR2_PACKAGE_GSTREAMER),y)
+FREERDP_CONF_OPTS += -DWITH_GSTREAMER=ON
+FREERDP_DEPENDENCIES += gstreamer
+else
+FREERDP_CONF_OPTS += -DWITH_GSTREAMER=OFF
+endif
(untested with GStreamer enabled). Once this is added, the remaining error is:
CMake Error at channels/client/CMakeLists.txt:33 (list):
list sub-command REMOVE_DUPLICATES requires list to be present.
My understanding is that the CHANNEL_STATIC_CLIENT_ENTRIES list is empty.
Can you have a look into this?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 2/6 package/freerdp: move architecture-specific block
In reply to Yann E. MORINMove the arch-spcific block up, so it does not interfere with followup patches (mostly to ease review).
--- package/freerdp/freerdp.mk | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
package/freerdp/freerdp.mk +16 -16
@@ -41,6 +41,22 @@ else FREERDP_CONF_OPTS += -DWITH_PULSEAUDIO=OFF endif +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +FREERDP_CONF_OPTS += -DWITH_NEON=ON +else +FREERDP_CONF_OPTS += -DWITH_NEON=OFF +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE2),y) +FREERDP_CONF_OPTS += -DWITH_SSE2=ON +else +FREERDP_CONF_OPTS += -DWITH_SSE2=OFF +endif + +ifeq ($(BR2_arm)$(BR2_armeb),y) +FREERDP_CONF_OPTS += -DARM_FP_ABI=$(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +endif + ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) FREERDP_DEPENDENCIES += xlib_libXext FREERDP_CONF_OPTS += -DWITH_X11=ON
@@ -76,20 +92,4 @@ else FREERDP_CONF_OPTS += -DWITH_XV=OFF endif -ifeq ($(BR2_ARM_CPU_HAS_NEON),y) -FREERDP_CONF_OPTS += -DWITH_NEON=ON -else -FREERDP_CONF_OPTS += -DWITH_NEON=OFF -endif - -ifeq ($(BR2_X86_CPU_HAS_SSE2),y) -FREERDP_CONF_OPTS += -DWITH_SSE2=ON -else -FREERDP_CONF_OPTS += -DWITH_SSE2=OFF -endif - -ifeq ($(BR2_arm)$(BR2_armeb),y) -FREERDP_CONF_OPTS += -DARM_FP_ABI=$(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) -endif - $(eval $(cmake-package))
Signature · 1 line
1.9.1
PATCH v4 2/6 package/freerdp: move architecture-specific block
Quoted 4 lines · Yann E. MORIN
Move the arch-spcific block up, so it does not interfere with followup patches (mostly to ease review).
Signed-off-by "Yann E. MORIN" <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH v4 3/6 package/freerdp: add options to enable/disable server and/or client
In reply to Yann E. MORINBuilding the client or the server requires an X.Org stack.
Since freerdp can also be used for weston (wayland-based, hence no X.Org stack), we may want to disable the client and server.
Conversely, even with an X.Org stack, we may want to enable either or none if we're just interested in the library.
Add two options, one to enable the server, the other the client; the client option defaults to 'Y' so that a previous .config can be re-used as-is, and exhibit the same behaviour as before; the server option defaults to 'N' as we were not ever building the server so far.
---
Changes v2 -> v3:
- use -fPIC only for that library that needs it, not the whole package (Samuel)
- fix X.Org dependencies (Samuel)
- don't default server to 'Y'
--- package/freerdp/Config.in | 25 ++++++++- .../freerdp-0002-fix-building-shared-libs.patch | 23 ++++++++ package/freerdp/freerdp.mk | 62 ++++++++++++++++++++-- 3 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 package/freerdp/freerdp-0002-fix-building-shared-libs.patch
package/freerdp/Config.in +24 -1
@@ -2,9 +2,32 @@ config BR2_PACKAGE_FREERDP bool "freerdp" select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_ZLIB - select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 help FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license + This only installs the freerdp library. + http://www.freerdp.com/ + +if BR2_PACKAGE_FREERDP + +config BR2_PACKAGE_FREERDP_SERVER + bool "build server" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + +config BR2_PACKAGE_FREERDP_CLIENT + bool "build client" + default y + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +comment "freerdp server and client need X.Org" + depends on !BR2_PACKAGE_XORG7 + +endif
package/freerdp/freerdp-0002-fix-building-shared-libs.patch new file +23 -0
@@ -0,0 +1,23 @@ +winpr/tools: fix building shared libs + +libwinpr-makecert-tool.a is used to build libxfreerdp-server.so, so even +if we are building a static libwinpr-makecert-tool.a library, we need to +build it with -fPIC. + +Patch and commit log suggested by Samuel MARTIN. + +Signed-off-by: "Yann E. MORIN" <[email protected]> +Cc: Samuel Martin <[email protected]> + +diff -durN freerdp-440916eae2e07463912d5fe507677e67096eb083.orig/winpr/tools/makecert/CMakeLists.txt freerdp-440916eae2e07463912d5fe507677e67096eb083/winpr/tools/makecert/CMakeLists.txt +--- freerdp-440916eae2e07463912d5fe507677e67096eb083.orig/winpr/tools/makecert/CMakeLists.txt 2014-08-25 06:52:43.000000000 -0700 ++++ freerdp-440916eae2e07463912d5fe507677e67096eb083/winpr/tools/makecert/CMakeLists.txt 2014-10-24 15:39:39.600319523 -0700 +@@ -43,3 +43,8 @@ + + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools") + ++if(BUILD_SHARED_LIBS) ++ # build libwinpr-makecert-tool.a with PIC because it is used to build ++ # the shared library libxfreerdp-server.so. ++ set_property(TARGET ${MODULE_NAME} PROPERTY POSITION_INDEPENDENT_CODE TRUE) ++endif()
package/freerdp/freerdp.mk +58 -4
87 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v4 3/6 package/freerdp: add options to enable/disable server and/or client
Quoted 8 lines · Yann E. MORIN
Building the client or the server requires an X.Org stack.
Since freerdp can also be used for weston (wayland-based, hence no X.Org stack), we may want to disable the client and server.
Conversely, even with an X.Org stack, we may want to enable either or none if we're just interested in the library.
Quoted 7 lines
Add two options, one to enable the server, the other the client; the client option defaults to 'Y' so that a previous .config can be re-used as-is, and exhibit the same behaviour as before; the server option defaults to 'N' as we were not ever building the server so far.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Samuel Martin <[email protected]>
Regards,
Signature · 1 line
Samuel
PATCH v4 4/6 package/freerdp: also install to staging
In reply to Yann E. MORINfreerdp installs a library that other packages may use, so we must also install it to staging.
--- package/freerdp/freerdp.mk | 2 ++ 1 file changed, 2 insertions(+)
package/freerdp/freerdp.mk +2 -0
@@ -11,6 +11,8 @@ FREERDP_DEPENDENCIES = openssl zlib FREERDP_LICENSE = Apache-2.0 FREERDP_LICENSE_FILES = LICENSE +FREERDP_INSTALL_STAGING = YES + FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF ifeq ($(BR2_PACKAGE_CUPS),y)
Signature · 1 line
1.9.1
PATCH v4 5/6 package/freerdp: install server key and certificate
In reply to Yann E. MORINThis is mandatory for an RDP server to have a key and a certificate, otherwise clients will refuse to connect to that server.
We install the key and certificate bundled in FreeRDP. The user can install its own set using a post-build script if needed.
---
Changes v2 -> v3:
- only install the keys when the server is enabled (Samuel)
--- package/freerdp/freerdp.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/freerdp/freerdp.mk +9 -0
@@ -64,6 +64,15 @@ endif ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y) FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON +# Install the server key and certificate, so that a client can connect. +# A user can override them with its own in a post-build script, if needed. +define FREERDP_INSTALL_KEYS + $(INSTALL) -D $(@D)/server/X11/server.key \ + $(TARGET_DIR)/etc/freerdp/keys/server.key + $(INSTALL) -D $(@D)/server/X11/server.crt \ + $(TARGET_DIR)/etc/freerdp/keys/server.crt +endef +FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_INSTALL_KEYS else FREERDP_CONF_OPTS += -DWITH_SERVER=OFF -DWITH_SERVER_INTERFACE=OFF endif
Signature · 1 line
1.9.1
PATCH v4 6/6 package/weston: add support for the RDP compositor
In reply to Yann E. MORINUsing the RDP compositor, one can run a headless machine to serve remote clients, using the RDP protocol.
Add an option to enable the rdp-backend.
--- package/weston/Config.in | 17 +++++++++++++++++ package/weston/weston.mk | 7 +++++++ 2 files changed, 24 insertions(+)
package/weston/Config.in +17 -0
@@ -40,6 +40,23 @@ config BR2_PACKAGE_WESTON_HAS_COMPOSITOR config BR2_PACKAGE_WESTON_FBDEV bool "fbdev compositor" +config BR2_PACKAGE_WESTON_RDP + bool "RDP compositor" + select BR2_PACKAGE_FREERDP + select BR2_PACKAGE_WESTON_HAS_COMPOSITOR + help + This enables the RDP backend, which allows accessing weston + through the network with any RDP-compliant client. + + Please note that one must pass those options to weston for RDP + to be functional: + --rdp-tls-cert=/path/to/server.crt + --rdp-tls-key=/path/to/server.key + + By default, Buildroot installs such files in /etc/freerdp/server/ + so you may want to change them in a post-build script or a rootfs + overlay. + # rpi-userland is an EGL/GLES provider, so we can't select it config BR2_PACKAGE_WESTON_RPI bool "RPi compositor"
package/weston/weston.mk +7 -0
@@ -32,6 +32,13 @@ else WESTON_CONF_OPTS += --disable-libinput-backend endif +ifeq ($(BR2_PACKAGE_WESTON_RDP),y) +WESTON_DEPENDENCIES += freerdp +WESTON_CONF_OPTS += --enable-rdp-compositor +else +WESTON_CONF_OPTS += --disable-rdp-compositor +endif + ifeq ($(BR2_PACKAGE_LIBUNWIND),y) WESTON_DEPENDENCIES += libunwind else
Signature · 1 line
1.9.1