Skip to contentSkip to conversation

weston: new freerdp backend (branch yem/bumps)

PATCH Superseded Yann E. MORIN 2 participants 17 messages Oct 6, 2014 – Oct 8, 2014

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover weston: new freerdp backend (branch yem/bumps)

Hello All!

This series adds the RDP backend to Weston. As a side effect, it cleans up and enhances FreeRDP.

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 7349af1bc4ed941d59c0c9971007479881379d3f:

openvmtools: remove unnecessary C flag (2014-10-06 21:16:09 +0200)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/bumps

for you to fetch changes up to 66cae859536aae20b149c905d270b48176057b9d:

package/weston: add support for the RDP compositor (2014-10-07 00:14:13 +0200)

----------------------------------------------------------------
Yann E. MORIN (7):
pacakge/freerdp: disable building the manpages package/freerdp: do not forcibly depend on X.Org package/freerdp: add missing dependency 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  | 34 +++++++++++++++++++++++++++++-----
 package/freerdp/freerdp.mk | 39 +++++++++++++++++++++++++++++++++++++--
 package/weston/Config.in   | 17 +++++++++++++++++
 package/weston/weston.mk   |  7 +++++++
 5 files changed, 91 insertions(+), 8 deletions(-)
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 v2 1/7 pacakge/freerdp: disable building the manpages

Building the manpages requires xsltproc, which might not be available. Also, who needs the manpages on the target anyway? ;-)

---
 package/freerdp/freerdp.mk | 2 ++
 1 file changed, 2 insertions(+)
package/freerdp/freerdp.mk +2 -0
index 84c2d81..e272165 100644
@@ -12,6 +12,8 @@ FREERDP_DEPENDENCIES = openssl zlib \
 FREERDP_LICENSE = Apache-2.0
 FREERDP_LICENSE_FILES = LICENSE
 
+FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/7 pacakge/freerdp: disable building the manpages

Quoted 4 lines · Yann E. MORIN

Building the manpages requires xsltproc, which might not be available. Also, who needs the manpages on the target anyway? ;-)

Quoted 24 lines
---
 package/freerdp/freerdp.mk | 2 ++
 1 file changed, 2 insertions(+)
package/freerdp/freerdp.mk +2 -1
index 84c2d81..e272165 100644
@@ -12,6 +12,8 @@ FREERDP_DEPENDENCIES = openssl zlib \
 FREERDP_LICENSE = Apache-2.0
 FREERDP_LICENSE_FILES = LICENSE
 
+FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Samuel
#3 lore raw

PATCH v2 2/7 package/freerdp: do not forcibly depend on X.Org

In reply to 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.

Re-order the menuconfig, as freerdp is no longer an X-only application.

---
 package/Config.in          |  2 +-
 package/freerdp/Config.in  | 17 ++++++++++++-----
 package/freerdp/freerdp.mk | 10 ++++++++--
 3 files changed, 21 insertions(+), 8 deletions(-)
package/Config.in +1 -1
index 2dbe6f8..c2bd239 100644
@@ -200,6 +200,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"
@@ -238,7 +239,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 +12 -5
index c5ff769..81a67ea 100644
@@ -1,14 +1,21 @@
 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
 	help
 	  FreeRDP is a free implementation of the Remote Desktop
 	  Protocol (RDP), released under the Apache license
 
 	  http://www.freerdp.com/
+
+if BR2_PACKAGE_FREERDP
+
+config BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+	def_bool y
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBX11
+	select BR2_PACKAGE_XLIB_LIBXT
+	select BR2_PACKAGE_XLIB_LIBXEXT
+	select BR2_PACKAGE_XLIB_LIBXCURSOR
+
+endif
package/freerdp/freerdp.mk +8 -2
index e272165..49347fa 100644
@@ -7,13 +7,19 @@
 # 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
 
 FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
 
+ifeq ($(BR2_PACKAGE_FREERDP_NEEDS_XLIBS),y)
+FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor
+FREERDP_CONF_OPTS += -DWITH_X11=ON
+else
+FREERDP_CONF_OPTS += -DWITH_X11=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 2/7 package/freerdp: do not forcibly depend on X.Org

Quoted 6 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.

Re-order the menuconfig, as freerdp is no longer an X-only application.

Quoted 90 lines
---
 package/Config.in          |  2 +-
 package/freerdp/Config.in  | 17 ++++++++++++-----
 package/freerdp/freerdp.mk | 10 ++++++++--
 3 files changed, 21 insertions(+), 8 deletions(-)
package/Config.in +1 -1
index 2dbe6f8..c2bd239 100644
@@ -200,6 +200,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"
@@ -238,7 +239,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 +12 -5
index c5ff769..81a67ea 100644
@@ -1,14 +1,21 @@
 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
        help
          FreeRDP is a free implementation of the Remote Desktop
          Protocol (RDP), released under the Apache license
 
          http://www.freerdp.com/
+
+if BR2_PACKAGE_FREERDP
+
+config BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+       def_bool y
+       depends on BR2_PACKAGE_XORG7
+       select BR2_PACKAGE_XLIB_LIBX11
+       select BR2_PACKAGE_XLIB_LIBXT
+       select BR2_PACKAGE_XLIB_LIBXEXT
+       select BR2_PACKAGE_XLIB_LIBXCURSOR
+
+endif
package/freerdp/freerdp.mk +8 -3
index e272165..49347fa 100644
@@ -7,13 +7,19 @@
 # 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
 
 FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
 
+ifeq ($(BR2_PACKAGE_FREERDP_NEEDS_XLIBS),y)
+FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor
+FREERDP_CONF_OPTS += -DWITH_X11=ON
+else
+FREERDP_CONF_OPTS += -DWITH_X11=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Samuel
#5 lore raw

PATCH v2 3/7 package/freerdp: add missing dependency

In reply to Yann E. MORIN

To build the server, FreeRDP needs the Xdamage library.

It seems we were (un)lucky so far, because the server is not built (by default?), even if Xdamage is enabled.

Add this missing dependency.

---
 package/freerdp/Config.in  | 1 +
 package/freerdp/freerdp.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/freerdp/Config.in +1 -0
index 81a67ea..23d0b0f 100644
@@ -17,5 +17,6 @@ config BR2_PACKAGE_FREERDP_NEEDS_XLIBS
 	select BR2_PACKAGE_XLIB_LIBXT
 	select BR2_PACKAGE_XLIB_LIBXEXT
 	select BR2_PACKAGE_XLIB_LIBXCURSOR
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE
 
 endif
package/freerdp/freerdp.mk +1 -1
index 49347fa..b50fd1e 100644
@@ -14,7 +14,7 @@ FREERDP_LICENSE_FILES = LICENSE
 FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
 
 ifeq ($(BR2_PACKAGE_FREERDP_NEEDS_XLIBS),y)
-FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor
+FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor xlib_libXdamage
 FREERDP_CONF_OPTS += -DWITH_X11=ON
 else
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
Signature · 1 line
1.9.1
#6 lore raw

PATCH v2 3/7 package/freerdp: add missing dependency

Yann,

Quoted 4 lines · Yann E. MORIN

To build the server, FreeRDP needs the Xdamage library.

It seems we were (un)lucky so far, because the server is not built (by default?), even if Xdamage is enabled.

You are talking about the content of freerdp/server directory here? If so, according to the CMake code, the server build is disabled by default, so you should also do:
FREERDP_CONF_OPTS += -DWITH_SERVER=ON

Quoted 2 lines

Add this missing dependency.

Checking carefully the CMake code, it seems that only Xshm is required for the client, all other X-features are just recommended.

Quoted 34 lines
---
 package/freerdp/Config.in  | 1 +
 package/freerdp/freerdp.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/freerdp/Config.in +1 -0
index 81a67ea..23d0b0f 100644
@@ -17,5 +17,6 @@ config BR2_PACKAGE_FREERDP_NEEDS_XLIBS
        select BR2_PACKAGE_XLIB_LIBXT
        select BR2_PACKAGE_XLIB_LIBXEXT
        select BR2_PACKAGE_XLIB_LIBXCURSOR
+       select BR2_PACKAGE_XLIB_LIBXDAMAGE
 
 endif
package/freerdp/freerdp.mk +1 -2
index 49347fa..b50fd1e 100644
@@ -14,7 +14,7 @@ FREERDP_LICENSE_FILES = LICENSE
 FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
 
 ifeq ($(BR2_PACKAGE_FREERDP_NEEDS_XLIBS),y)
-FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor
+FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor xlib_libXdamage
 FREERDP_CONF_OPTS += -DWITH_X11=ON
 else
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
--

1.9.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,

Signature · 1 line
Samuel
#7 lore raw

PATCH v2 3/7 package/freerdp: add missing dependency

Samuel, All,

On 2014-10-08 22:01 +0200, Samuel Martin spake thusly:

Quoted 10 lines · Yann E. MORIN
Quoted 4 lines

To build the server, FreeRDP needs the Xdamage library.

It seems we were (un)lucky so far, because the server is not built (by default?), even if Xdamage is enabled.

You are talking about the content of freerdp/server directory here? If so, according to the CMake code, the server build is disabled by default, so you should also do:
FREERDP_CONF_OPTS += -DWITH_SERVER=ON

So, we never ever built the server so far, only the lib and the client.

Quoted 4 lines
Quoted 1 line

Add this missing dependency.

Checking carefully the CMake code, it seems that only Xshm is required for the client, all other X-features are just recommended.

OK, I'll rework the series that way:

- only forcibly select the strictly required libs;
- build-depend on the optional libs if they are selected;
- since Xdamage is required for the server, only forcibly select it if the server is enabled.

Thamks! :-)

Regards,
Yann E. MORIN.

Quoted 42 lines
Quoted 33 lines
---
 package/freerdp/Config.in  | 1 +
 package/freerdp/freerdp.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
package/freerdp/Config.in +1 -0
index 81a67ea..23d0b0f 100644
@@ -17,5 +17,6 @@ config BR2_PACKAGE_FREERDP_NEEDS_XLIBS
        select BR2_PACKAGE_XLIB_LIBXT
        select BR2_PACKAGE_XLIB_LIBXEXT
        select BR2_PACKAGE_XLIB_LIBXCURSOR
+       select BR2_PACKAGE_XLIB_LIBXDAMAGE
 
 endif
package/freerdp/freerdp.mk +1 -2
index 49347fa..b50fd1e 100644
@@ -14,7 +14,7 @@ FREERDP_LICENSE_FILES = LICENSE
 FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF
 
 ifeq ($(BR2_PACKAGE_FREERDP_NEEDS_XLIBS),y)
-FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor
+FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor xlib_libXdamage
 FREERDP_CONF_OPTS += -DWITH_X11=ON
 else
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
--

1.9.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,

Signature · 1 line
Samuel
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.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH v2 4/7 package/freerdp: add options to enable/disable server and/or client

In reply to 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, with on 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; both default to 'y' so that a previous .config can be re-used as-is, and echibit the same behaviour, that is to build the server and client.

---
 package/freerdp/Config.in  | 20 ++++++++++++++++++--
 package/freerdp/freerdp.mk | 15 +++++++++++++++
 2 files changed, 33 insertions(+), 2 deletions(-)
package/freerdp/Config.in +18 -2
index 23d0b0f..8e29a5b 100644
@@ -6,17 +6,33 @@ config BR2_PACKAGE_FREERDP
 	  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_NEEDS_XLIBS
-	def_bool y
-	depends on BR2_PACKAGE_XORG7
+	bool
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XLIB_LIBXT
 	select BR2_PACKAGE_XLIB_LIBXEXT
 	select BR2_PACKAGE_XLIB_LIBXCURSOR
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE
 
+config BR2_PACKAGE_FREERDP_SERVER
+	bool "build server"
+	default y
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+
+config BR2_PACKAGE_FREERDP_CLIENT
+	bool "build client"
+	default y
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+
+comment "freerdp server and client needs X.Org"
+	depends on !BR2_PACKAGE_XORG7
+
 endif
package/freerdp/freerdp.mk +15 -0
index b50fd1e..594bab3 100644
@@ -20,6 +20,21 @@ else
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
 endif
 
+# We need to tell CMake to only create position-independent code,
+# othwerwise the server does not build.
+ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y)
+FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON \
+	-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+else
+FREERDP_CONF_OPTS += -DWITH_SERVER=OFF -DWITH_SERVER_INTERFACE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_FREERDP_CLIENT),y)
+FREERDP_CONF_OPTS += -DWITH_CLIENT=ON -DWITH_CLIENT_INTERFACE=ON
+else
+FREERDP_CONF_OPTS += -DWITH_CLIENT=OFF -DWITH_CLIENT_INTERFACE=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
Signature · 1 line
1.9.1
#9 lore raw

PATCH v2 4/7 package/freerdp: add options to enable/disable server and/or client

Yann,

Quoted 11 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, with on 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; both default to 'y' so that a previous .config can be re-used as-is, and echibit the same behaviour, that is to build the server and client.

s/echibit/exhibit/

Quoted 53 lines
---
 package/freerdp/Config.in  | 20 ++++++++++++++++++--
 package/freerdp/freerdp.mk | 15 +++++++++++++++
 2 files changed, 33 insertions(+), 2 deletions(-)
package/freerdp/Config.in +18 -2
index 23d0b0f..8e29a5b 100644
@@ -6,17 +6,33 @@ config BR2_PACKAGE_FREERDP
          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_NEEDS_XLIBS
-       def_bool y
-       depends on BR2_PACKAGE_XORG7
+       bool
        select BR2_PACKAGE_XLIB_LIBX11
        select BR2_PACKAGE_XLIB_LIBXT
        select BR2_PACKAGE_XLIB_LIBXEXT
        select BR2_PACKAGE_XLIB_LIBXCURSOR
        select BR2_PACKAGE_XLIB_LIBXDAMAGE
 
+config BR2_PACKAGE_FREERDP_SERVER
+       bool "build server"
+       default y
+       depends on BR2_PACKAGE_XORG7
+       select BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+
+config BR2_PACKAGE_FREERDP_CLIENT
+       bool "build client"
+       default y
+       depends on BR2_PACKAGE_XORG7
+       select BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+
+comment "freerdp server and client needs X.Org"
+       depends on !BR2_PACKAGE_XORG7
+
 endif
package/freerdp/freerdp.mk +0 -0
index b50fd1e..594bab3 100644

package/freerdp/freerdp.mk else · line 24

Quoted 5 lines
package/freerdp/freerdp.mk +2 -0
@@ -20,6 +20,21 @@ else
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
 endif
 
+# We need to tell CMake to only create position-independent code,
+# othwerwise the server does not build.

Hmm... here you could be a bit more talkative in the comment ;-), e.g. adding:

libfoo.a is used to build libbar.so, so even if we are building a static library (libfoo), it has to be built with PIC.

package/freerdp/freerdp.mk else · line 27

Quoted 3 lines
package/freerdp/freerdp.mk +3 -0
+ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y)
+FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=ON

CMAKE_POSITION_INDEPENDENT_CODE is global option. It is possible to set it locally using set_target_properties or set_property. But this requires patching the CMake; this should looks like this: [1] (not tested at all ;-]).

Quoted 14 lines
package/freerdp/freerdp.mk +10 -1
+else
+FREERDP_CONF_OPTS += -DWITH_SERVER=OFF -DWITH_SERVER_INTERFACE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_FREERDP_CLIENT),y)
+FREERDP_CONF_OPTS += -DWITH_CLIENT=ON -DWITH_CLIENT_INTERFACE=ON
+else
+FREERDP_CONF_OPTS += -DWITH_CLIENT=OFF -DWITH_CLIENT_INTERFACE=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
--
Quoted 2 lines

1.9.1

Regards,

[1] http://code.bulix.org/oixnjp-87161/?raw

Signature · 1 line
Samuel
#10 lore raw

PATCH v2 5/7 package/freerdp: also install to staging

In reply to Yann E. MORIN

freerdp 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
index 594bab3..ea590d1 100644
@@ -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_FREERDP_NEEDS_XLIBS),y)
Signature · 1 line
1.9.1
#11 lore raw

PATCH v2 5/7 package/freerdp: also install to staging

Quoted 4 lines · Yann E. MORIN

freerdp installs a library that other packages may use, so we must also install it to staging.

Quoted 24 lines
---
 package/freerdp/freerdp.mk | 2 ++
 1 file changed, 2 insertions(+)
package/freerdp/freerdp.mk +2 -1
index 594bab3..ea590d1 100644
@@ -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_FREERDP_NEEDS_XLIBS),y)
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Samuel
#12 lore raw

PATCH v2 6/7 package/freerdp: install server key and certificate

In reply to Yann E. MORIN

This is mandatory for an RDP server to have a key and a certificate, otherwise clients will refuse to connect to that server.

---
 package/freerdp/freerdp.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/freerdp/freerdp.mk +10 -0
index ea590d1..e643e57 100644
@@ -86,4 +86,14 @@ else
 FREERDP_CONF_OPTS += -DWITH_XV=OFF
 endif
 
+# Install the server key and certificate, so that a client can connect.
+# A user can override them with its opwn 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
+
 $(eval $(cmake-package))
Signature · 1 line
1.9.1
#13 lore raw

PATCH v2 6/7 package/freerdp: install server key and certificate

Yann,

Quoted 13 lines · Yann E. MORIN

This is mandatory for an RDP server to have a key and a certificate, otherwise clients will refuse to connect to that server.

---
 package/freerdp/freerdp.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/freerdp/freerdp.mk +0 -0
index ea590d1..e643e57 100644

package/freerdp/freerdp.mk else · line 90

Quoted 5 lines
package/freerdp/freerdp.mk +2 -0
@@ -86,4 +86,14 @@ else
 FREERDP_CONF_OPTS += -DWITH_XV=OFF
 endif
 
+# Install the server key and certificate, so that a client can connect.
+# A user can override them with its opwn in a post-build script, if needed.

s/opwn/own/

package/freerdp/freerdp.mk else · line 97

Quoted 7 lines
package/freerdp/freerdp.mk +7 -0
+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

It is useful for the client only? or the server? or both? If it is only useful for one or the other, maybe it should be nested in a if-block using the BR2_PACKAGE_FREERDP_CLIENT (or BR2_PACKAGE_FREERDP_SERVER)?

Quoted 9 lines
package/freerdp/freerdp.mk +1 -1
+
 $(eval $(cmake-package))
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,

Signature · 1 line
Samuel
#14 lore raw

PATCH v2 6/7 package/freerdp: install server key and certificate

Samuel, All,

On 2014-10-08 22:58 +0200, Samuel Martin spake thusly:

Quoted 17 lines · Yann E. MORIN
Quoted 16 lines

This is mandatory for an RDP server to have a key and a certificate, otherwise clients will refuse to connect to that server.

---
 package/freerdp/freerdp.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/freerdp/freerdp.mk +0 -0
index ea590d1..e643e57 100644
@@ -86,4 +86,14 @@ else
 FREERDP_CONF_OPTS += -DWITH_XV=OFF
 endif
 
Quoted 4 lines

package/freerdp/freerdp.mk else · line 90

Quoted 2 lines
package/freerdp/freerdp.mk +2 -0
+# Install the server key and certificate, so that a client can connect.
+# A user can override them with its opwn in a post-build script, if needed.

s/opwn/own/

Yup.

Quoted 4 lines
Quoted 4 lines
package/freerdp/freerdp.mk +4 -0
+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 \
Quoted 8 lines

package/freerdp/freerdp.mk else · line 97

Quoted 3 lines
package/freerdp/freerdp.mk +3 -0
+                     $(TARGET_DIR)/etc/freerdp/keys/server.crt
+endef
+FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_INSTALL_KEYS

It is useful for the client only? or the server? or both? If it is only useful for one or the other, maybe it should be nested in a if-block using the BR2_PACKAGE_FREERDP_CLIENT (or BR2_PACKAGE_FREERDP_SERVER)?

It;s for the server only. Will fix. 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 v2 7/7 package/weston: add support for the RDP compositor

In reply to Yann E. MORIN

Using 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
index fafdf95..c08b33c 100644
@@ -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.
+
 comment "RPi compositor needs a toolchain w/ C++, largefile, threads"
 	depends on BR2_arm
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
package/weston/weston.mk +7 -0
index 9964b90..2829a10 100644
@@ -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
#16 lore raw

PATCH v2 7/7 package/weston: add support for the RDP compositor

Quoted 6 lines · Yann E. MORIN

Using 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.

Quoted 58 lines
---
 package/weston/Config.in | 17 +++++++++++++++++
 package/weston/weston.mk |  7 +++++++
 2 files changed, 24 insertions(+)
package/weston/Config.in +17 -0
index fafdf95..c08b33c 100644
@@ -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.
+
 comment "RPi compositor needs a toolchain w/ C++, largefile, threads"
        depends on BR2_arm
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
package/weston/weston.mk +7 -1
index 9964b90..2829a10 100644
@@ -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
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Samuel