* [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend
@ 2024-02-08 9:55 Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 1/3] package/wpebackend-rdk: new package Adrian Perez de Castro
` (8 more replies)
0 siblings, 9 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-02-08 9:55 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Hello all,
This patch series allows using the RDK backend for WPE WebKit. Currently the
main use case is to run WPEWebKit on RaspberryPi boards using on Dispmanx via
the rpi-userland EGL/GLES libraries.
In order to allow using the new wpebackend-rdk package I needed to un-hardcode
usage of wpebackend-fdo, in two places:
- The cog package may be built without wpebackend-fdo, passing an empty
list of platform plug-ins. It has built-in support to load "simple"
WPE backends like wpebackend-rdk. This was done by adding a config
option for the headless plug-in, instead of always building it, and
adjusting dependencies.
- The wpewebkit package does not need wpebackend-fdo at all during the
build. It only needs a backend installed at run time. This means it is
enough to make wpewebkit have a "depends on" on any of the backends,
to make sure they will be in the build, but none needs to be listed in
WPEWEBKIT_DEPENDENCIES.
I have tested this making builds based on raspberrypi3_defconfig, adding
rpi-userland and then picking wpebackend-rdk + wpewebkit + cog.
Hopefully the patch set is fine and nothing has slipped in the Kconfig
dependencies (typically my weakest part of Buildroot contributions).
Best regards,
-Adrian
Adrian Perez de Castro (3):
package/wpebackend-rdk: new package
package/cog: depend on wpebackend-fdo only if needed
package/wpewebkit: do not depend on wpebackend-fdo
package/Config.in | 1 +
package/cog/Config.in | 28 ++++++++++-
package/cog/cog.mk | 13 +++--
package/wpebackend-rdk/Config.in | 57 ++++++++++++++++++++++
package/wpebackend-rdk/wpebackend-rdk.hash | 5 ++
package/wpebackend-rdk/wpebackend-rdk.mk | 43 ++++++++++++++++
package/wpewebkit/Config.in | 9 ++--
package/wpewebkit/wpewebkit.mk | 2 +-
8 files changed, 147 insertions(+), 11 deletions(-)
create mode 100644 package/wpebackend-rdk/Config.in
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.hash
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.mk
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH 1/3] package/wpebackend-rdk: new package
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
@ 2024-02-08 9:55 ` Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 2/3] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
` (7 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-02-08 9:55 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
The wpebackend-rdk can be used as an alternative to wpebackend-fdo in
some cases, and also supports a few additional configurations. For now
only the Wayland-EGL and Broadcom RaspberryPi userland implementations
can be enabled. The former is useful for testing, and the latter allows
using WPE WebKit directly on top of Dispmanx in combination with the
rpi-userland package in supported RaspberryPi models.
This only adds the new package, follow-up commits will un-hardcode the
usage of wpebackend-fdo and allow selecting either which of both to
build.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/Config.in | 1 +
package/wpebackend-rdk/Config.in | 57 ++++++++++++++++++++++
package/wpebackend-rdk/wpebackend-rdk.hash | 5 ++
package/wpebackend-rdk/wpebackend-rdk.mk | 43 ++++++++++++++++
4 files changed, 106 insertions(+)
create mode 100644 package/wpebackend-rdk/Config.in
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.hash
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.mk
diff --git a/package/Config.in b/package/Config.in
index 91a6f1de00d..99bd6fee22e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1723,6 +1723,7 @@ menu "Graphics"
source "package/wlroots/Config.in"
source "package/woff2/Config.in"
source "package/wpebackend-fdo/Config.in"
+ source "package/wpebackend-rdk/Config.in"
source "package/wpewebkit/Config.in"
source "package/zbar/Config.in"
source "package/zxing-cpp/Config.in"
diff --git a/package/wpebackend-rdk/Config.in b/package/wpebackend-rdk/Config.in
new file mode 100644
index 00000000000..6125911bec9
--- /dev/null
+++ b/package/wpebackend-rdk/Config.in
@@ -0,0 +1,57 @@
+comment "wpebackend-rdk needs a toolchain w/ C++, wchar, threads, dynamic library, and rpi-userland or an OpenGL-capable Wayland backend"
+ depends on !(BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND) \
+ || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \
+ || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+
+config BR2_PACKAGE_WPEBACKEND_RDK
+ bool "wpebackend-rdk"
+ depends on !BR2_STATIC_LIBS # wayland
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, libglib2
+ depends on BR2_USE_WCHAR # libglib2
+ depends on BR2_USE_MMU # libglib2
+ depends on BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBWPE
+ help
+ WPEBackend interface supporting a number of configurations.
+
+if BR2_PACKAGE_WPEBACKEND_RDK
+
+choice
+ prompt Implementation
+ default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI if BR2_PACKAGE_RPI_USERLAND
+ default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL if BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+
+comment "brcm-rpi needs rpi-userland"
+ depends on !BR2_PACKAGE_RPI_USERLAND || !BR2_arm
+
+config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
+ bool "brcm-rpi"
+ depends on BR2_arm
+ depends on BR2_PACKAGE_RPI_USERLAND
+ help
+ Build RaspberryPi support using Broadcom's rpi-userland.
+
+comment "wayland-egl needs an EGL capable Wayland implementation"
+ depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+
+config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL
+ bool "wayland-egl"
+ depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+ help
+ Build Wayland-EGL support.
+
+endchoice
+
+if BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
+
+config BR2_PACKAGE_WPEBACKEND_RDK_LIBINPUT
+ bool "libinput support"
+ select BR2_PACKAGE_LIBINPUT
+ help
+ Support keyboard and mouse input through libinput
+
+endif
+
+endif
diff --git a/package/wpebackend-rdk/wpebackend-rdk.hash b/package/wpebackend-rdk/wpebackend-rdk.hash
new file mode 100644
index 00000000000..af7dab6a365
--- /dev/null
+++ b/package/wpebackend-rdk/wpebackend-rdk.hash
@@ -0,0 +1,5 @@
+# Generated locally
+sha256 4c6ae288cf66f0a47052a50972e3d3727617c4c3e104db20494a3c5feb262f40 wpebackend-rdk-4.4.1.tar.gz
+
+# License files
+sha256 a5ba969938c2896411ea1a23ee7d9ccb68306a65615b6711afe738c8f6ff2153 COPYING
diff --git a/package/wpebackend-rdk/wpebackend-rdk.mk b/package/wpebackend-rdk/wpebackend-rdk.mk
new file mode 100644
index 00000000000..f9740eb46cd
--- /dev/null
+++ b/package/wpebackend-rdk/wpebackend-rdk.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# wpebackend-rdk
+#
+################################################################################
+
+WPEBACKEND_RDK_VERSION = 4.4.1
+WPEBACKEND_RDK_SITE = $(call github,WebPlatformForEmbedded,WPEBackend-rdk,R$(WPEBACKEND_RDK_VERSION))
+WPEBACKEND_RDK_INSTALL_STAGING = YES
+WPEBACKEND_RDK_LICENSE = BSD-2-Clause
+WPEBACKEND_RDK_LICENSE_FILES = COPYING
+WPEBACKEND_RDK_DEPENDENCIES = libglib2 libwpe
+WPEBACKEND_RDK_CONF_OPTS = \
+ -DUSE_BACKEND_BCM_NEXUS=OFF \
+ -DUSE_BACKEND_BCM_NEXUS_WAYLAND=OFF \
+ -DUSE_BACKEND_INTEL_CE=OFF \
+ -DUSE_BACKEND_WESTEROS=OFF \
+ -DUSE_BACKEND_WPEFRAMEWORK=OFF \
+ -DUSE_HOLE_PUNCH_GSTREAMER=OFF \
+ -DUSE_VIRTUAL_KEYBOARD=OFF
+
+ifeq ($(BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI),y)
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_BCM_RPI=ON
+WPEBACKEND_RDK_DEPENDENCIES += rpi-userland
+else
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_BCM_RPI=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL),y)
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_WAYLAND_EGL=ON
+WPEBACKEND_RDK_DEPENDENCIES += libegl wayland
+else
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_WAYLAND_EGL=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_WPEBACKEND_RDK_LIBINPUT),y)
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_INPUT_LIBINPUT=ON
+WPEBACKEND_RDK_DEPENDENCIES += libinput
+else
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_INPUT_LIBINPUT=OFF
+endif
+
+$(eval $(cmake-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH 2/3] package/cog: depend on wpebackend-fdo only if needed
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 1/3] package/wpebackend-rdk: new package Adrian Perez de Castro
@ 2024-02-08 9:55 ` Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 3/3] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
` (6 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-02-08 9:55 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Make the Cog headless platform plug-in selectable, allowing to configure
the build without any plug-in at all. When all plug-ins are disabled,
Cog does not require wpebackend-fdo at build time, and it is still
able to use its built-in "fallback" support to load other WPE backends
like wpebackend-rdk.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/cog/Config.in | 28 ++++++++++++++++++++++++++--
package/cog/cog.mk | 13 ++++++++++---
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/package/cog/Config.in b/package/cog/Config.in
index d2a910f9b89..d706b045b15 100644
--- a/package/cog/Config.in
+++ b/package/cog/Config.in
@@ -19,6 +19,10 @@ config BR2_PACKAGE_COG
if BR2_PACKAGE_COG
+config BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
+ bool
+ default n
+
config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
string "home uri"
default "https://wpewebkit.org"
@@ -30,6 +34,8 @@ config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
config BR2_PACKAGE_COG_PLATFORM_FDO
bool "Wayland backend"
default y
+ depends on BR2_PACKAGE_WPEBACKEND_FDO
+ select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
select BR2_PACKAGE_LIBXKBCOMMON
select BR2_PACKAGE_WAYLAND_PROTOCOLS
help
@@ -43,6 +49,8 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
depends on BR2_PACKAGE_HAS_LIBGBM
depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
+ depends on BR2_PACKAGE_WPEBACKEND_FDO
+ select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
select BR2_PACKAGE_LIBDRM
select BR2_PACKAGE_LIBINPUT
help
@@ -50,16 +58,32 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
with video drivers that support kernel mode-setting (KMS)
via the DRM user-space API.
+config BR2_PACKAGE_COG_PLATFORM_HEADLESS
+ bool "Headless backend"
+ depends on BR2_PACKAGE_WPEBACKEND_FDO
+ select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
+ help
+ Enable the headless platform backend.
+
config BR2_PACKAGE_COG_USE_SYSTEM_DBUS
bool "expose system D-Bus control interface"
help
Expose remote control interface on system bus
-comment "DRM platform needs EGL and GBM"
+comment "Headless platform needs wpebackend-fdo"
+ depends on \
+ !BR2_PACKAGE_WPEBACKEND_FDO
+
+comment "DRM platform needs EGL, GBM, wpebackend-fdo"
depends on \
!BR2_PACKAGE_HAS_LIBEGL || \
!BR2_PACKAGE_HAS_LIBGBM || \
!BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF || \
- !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
+ !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || \
+ !BR2_PACKAGE_WPEBACKEND_FDO
+
+comment "Wayland platform needs wpebackend-fdo"
+ depends on \
+ !BR2_PACKAGE_WPEBACKEND_FDO
endif
diff --git a/package/cog/cog.mk b/package/cog/cog.mk
index e96909f7796..8fc50de56f1 100644
--- a/package/cog/cog.mk
+++ b/package/cog/cog.mk
@@ -8,7 +8,7 @@ COG_VERSION = 0.18.2
COG_SITE = https://wpewebkit.org/releases
COG_SOURCE = cog-$(COG_VERSION).tar.xz
COG_INSTALL_STAGING = YES
-COG_DEPENDENCIES = dbus wpewebkit wpebackend-fdo wayland
+COG_DEPENDENCIES = dbus wpewebkit wayland
COG_LICENSE = MIT
COG_LICENSE_FILES = COPYING
COG_CONF_OPTS = \
@@ -19,8 +19,6 @@ COG_CONF_OPTS = \
-Dcog_home_uri='$(call qstrip,$(BR2_PACKAGE_COG_PROGRAMS_HOME_URI))' \
-Dplatforms='$(subst $(space),$(comma),$(strip $(COG_PLATFORMS_LIST)))'
-COG_PLATFORMS_LIST = headless
-
ifeq ($(BR2_PACKAGE_WESTON),y)
COG_CONF_OPTS += -Dwayland_weston_direct_display=true
COG_DEPENDENCIES += weston
@@ -28,6 +26,11 @@ else
COG_CONF_OPTS += -Dwayland_weston_direct_display=false
endif
+ifeq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS),y)
+COG_PLATFORMS_LIST += headless
+COG_DEPENDENCIES += wpebackend-fdo
+endif
+
ifeq ($(BR2_PACKAGE_COG_PLATFORM_FDO),y)
COG_PLATFORMS_LIST += wayland
COG_DEPENDENCIES += libxkbcommon wayland-protocols
@@ -48,4 +51,8 @@ ifeq ($(BR2_PACKAGE_LIBMANETTE),y)
COG_DEPENDENCIES += libmanette
endif
+ifeq ($(BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO),y)
+COG_DEPENDENCIES += wpebackend-fdo
+endif
+
$(eval $(meson-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH 3/3] package/wpewebkit: do not depend on wpebackend-fdo
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 1/3] package/wpebackend-rdk: new package Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 2/3] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
@ 2024-02-08 9:55 ` Adrian Perez de Castro
2024-02-08 10:29 ` [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Thomas Petazzoni via buildroot
` (5 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-02-08 9:55 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
needed at all during the build. What is needed is a WPE backend at run
time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
reflect this, we make wpewebkit depend on either being selected.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/wpewebkit/Config.in | 9 ++++-----
package/wpewebkit/wpewebkit.mk | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
index 432aa4c3a30..779af0c892e 100644
--- a/package/wpewebkit/Config.in
+++ b/package/wpewebkit/Config.in
@@ -24,11 +24,11 @@ comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
|| !BR2_HOST_GCC_AT_LEAST_4_9
-comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
+comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
depends on !BR2_BINFMT_FLAT
- depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
- || !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+ depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
+ depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK
config BR2_PACKAGE_WPEWEBKIT
bool "wpewebkit"
@@ -41,8 +41,8 @@ config BR2_PACKAGE_WPEWEBKIT
depends on BR2_USE_WCHAR # icu, libsoup3
depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
- depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK
select BR2_PACKAGE_CAIRO
select BR2_PACKAGE_CAIRO_PNG
select BR2_PACKAGE_HARFBUZZ
@@ -59,7 +59,6 @@ config BR2_PACKAGE_WPEWEBKIT
select BR2_PACKAGE_WAYLAND_PROTOCOLS
select BR2_PACKAGE_WEBP
select BR2_PACKAGE_WEBP_DEMUX
- select BR2_PACKAGE_WPEBACKEND_FDO
help
WPE (Web Platform for Embedded) port of the WebKit engine,
to allow embedders to create simple and performant systems
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
index 13143efb38b..e54ec2952ff 100644
--- a/package/wpewebkit/wpewebkit.mk
+++ b/package/wpewebkit/wpewebkit.mk
@@ -16,7 +16,7 @@ WPEWEBKIT_CPE_ID_VENDOR = wpewebkit
WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit
WPEWEBKIT_DEPENDENCIES = host-gperf host-python3 host-ruby host-unifdef \
harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup3 libtasn1 \
- libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo
+ libpng libxslt libwpe openjpeg wayland-protocols webp
WPEWEBKIT_CMAKE_BACKEND = ninja
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
` (2 preceding siblings ...)
2024-02-08 9:55 ` [Buildroot] [PATCH 3/3] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
@ 2024-02-08 10:29 ` Thomas Petazzoni via buildroot
2024-06-14 23:45 ` Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 0/4] " Adrian Perez de Castro
` (4 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-08 10:29 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: Samuel Martin, buildroot
Hello Adrian,
On Thu, 8 Feb 2024 11:55:27 +0200
Adrian Perez de Castro <aperez@igalia.com> wrote:
> This patch series allows using the RDK backend for WPE WebKit. Currently the
> main use case is to run WPEWebKit on RaspberryPi boards using on Dispmanx via
> the rpi-userland EGL/GLES libraries.
Thanks for this patch series!
We have some other patches in patchwork related to webkit:
Some from you:
https://patchwork.ozlabs.org/project/buildroot/patch/20230423213001.2961215-1-aperez@igalia.com/
https://patchwork.ozlabs.org/project/buildroot/patch/20230423213233.2961770-1-aperez@igalia.com/
Are they still valid/application?
We also have twice the same (?) patch from Giulio:
https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-1-giulio.benetti@benettiengineering.com/
https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-2-giulio.benetti@benettiengineering.com/
is it relevant?
Could you have a look so we can hopefully clear up the backlog?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend
2024-02-08 10:29 ` [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Thomas Petazzoni via buildroot
@ 2024-06-14 23:45 ` Adrian Perez de Castro
2024-06-15 6:54 ` Giulio Benetti
2024-06-18 6:53 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-06-14 23:45 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Samuel Martin, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 1628 bytes --]
Hi Thomas, all,
On Thu, 08 Feb 2024 11:29:40 +0100 Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> Hello Adrian,
>
> On Thu, 8 Feb 2024 11:55:27 +0200
> Adrian Perez de Castro <aperez@igalia.com> wrote:
>
> > This patch series allows using the RDK backend for WPE WebKit. Currently the
> > main use case is to run WPEWebKit on RaspberryPi boards using on Dispmanx via
> > the rpi-userland EGL/GLES libraries.
>
> Thanks for this patch series!
:-)
> We have some other patches in patchwork related to webkit:
>
> Some from you:
>
> https://patchwork.ozlabs.org/project/buildroot/patch/20230423213001.2961215-1-aperez@igalia.com/
> https://patchwork.ozlabs.org/project/buildroot/patch/20230423213233.2961770-1-aperez@igalia.com/
>
> Are they still valid/application?
These two are no longer needed after the update to wpewebkit and
webkitgtk 2.44.x
> We also have twice the same (?) patch from Giulio:
>
> https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-1-giulio.benetti@benettiengineering.com/
> https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-2-giulio.benetti@benettiengineering.com/
>
> is it relevant?
I think these two shouldn't be needed anymore, Giulio sent a PR to
upstream WebKit which ended up being merged [1] and it was included
in the 2.44.x releases as well.
> Could you have a look so we can hopefully clear up the backlog?
> Thanks a lot!
My apologies for taking so long to reply, somehow I managed to let
this slip ^_^
Cheers,
—Adrián
---
[1] https://github.com/WebKit/WebKit/commit/360f2f938bba406c0e9bff52710a13c74eb8d1e9
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend
2024-06-14 23:45 ` Adrian Perez de Castro
@ 2024-06-15 6:54 ` Giulio Benetti
2024-06-18 6:53 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 20+ messages in thread
From: Giulio Benetti @ 2024-06-15 6:54 UTC (permalink / raw)
To: Adrian Perez de Castro, Thomas Petazzoni; +Cc: Samuel Martin, buildroot
Hello All,
On 15/06/24 01:45, Adrian Perez de Castro wrote:
[ SNIP ]
>> We also have twice the same (?) patch from Giulio:
>>
>> https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-1-giulio.benetti@benettiengineering.com/
>> https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-2-giulio.benetti@benettiengineering.com/
>>
>> is it relevant?
>
> I think these two shouldn't be needed anymore, Giulio sent a PR to
> upstream WebKit which ended up being merged [1] and it was included
> in the 2.44.x releases as well.
>
I have missed Github notification on merge 1 year ago. Anyway I've
marked both patches as rejected on Patchwork since they are upstreamed.
Best regards
--
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend
2024-06-14 23:45 ` Adrian Perez de Castro
2024-06-15 6:54 ` Giulio Benetti
@ 2024-06-18 6:53 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 20+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-06-18 6:53 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: Samuel Martin, buildroot
Hello Adrian,
On Sat, 15 Jun 2024 02:45:13 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:
> > Some from you:
> >
> > https://patchwork.ozlabs.org/project/buildroot/patch/20230423213001.2961215-1-aperez@igalia.com/
> > https://patchwork.ozlabs.org/project/buildroot/patch/20230423213233.2961770-1-aperez@igalia.com/
> >
> > Are they still valid/application?
>
> These two are no longer needed after the update to wpewebkit and
> webkitgtk 2.44.x
Thanks, I marked those two patches as "Superseded".
> > We also have twice the same (?) patch from Giulio:
> >
> > https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-1-giulio.benetti@benettiengineering.com/
> > https://patchwork.ozlabs.org/project/buildroot/patch/20230221161522.3749804-2-giulio.benetti@benettiengineering.com/
> >
> > is it relevant?
>
> I think these two shouldn't be needed anymore, Giulio sent a PR to
> upstream WebKit which ended up being merged [1] and it was included
> in the 2.44.x releases as well.
ACK, Giulio took care of changing the state of those other two patches
in patchwork.
> > Could you have a look so we can hopefully clear up the backlog?
> > Thanks a lot!
>
> My apologies for taking so long to reply, somehow I managed to let
> this slip ^_^
No worries :-)
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH v2 0/4] Add support for the WPE WebKit RDK backend
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
` (3 preceding siblings ...)
2024-02-08 10:29 ` [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Thomas Petazzoni via buildroot
@ 2024-06-27 19:33 ` Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package Adrian Perez de Castro
` (3 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-06-27 19:33 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Hello all,
Here's a v2 re-spin after a rebase and adding one additional fixup =)
This patch series allows using the RDK backend for WPE WebKit. Currently the
main use case is to run WPEWebKit on RaspberryPi boards using on Dispmanx via
the rpi-userland EGL/GLES libraries.
In order to allow using the new wpebackend-rdk package I needed to un-hardcode
usage of wpebackend-fdo, in two places:
- The cog package may be built without wpebackend-fdo, passing an empty
list of platform plug-ins. It has built-in support to load "simple"
WPE backends like wpebackend-rdk. This was done by adding a config
option for the headless plug-in, instead of always building it, and
adjusting dependencies.
- The wpewebkit package does not need wpebackend-fdo at all during the
build. It only needs a backend installed at run time. This means it is
enough to make wpewebkit have a "depends on" on any of the backends,
to make sure they will be in the build, but none needs to be listed in
WPEWEBKIT_DEPENDENCIES. Also, libdrm is not strictly needed and only
used if selected by some other means.
I have tested this making builds based on raspberrypi3_defconfig, adding
rpi-userland and then picking wpebackend-rdk + wpewebkit + cog.
Adrian Perez de Castro (4):
package/wpebackend-rdk: new package
package/cog: depend on wpebackend-fdo only if needed
package/wpewebkit: do not depend on wpebackend-fdo
package/wpewebkit: disable libdrm usage when not available
package/Config.in | 1 +
package/cog/Config.in | 28 ++++++++++-
package/cog/cog.mk | 13 +++--
package/wpebackend-rdk/Config.in | 57 ++++++++++++++++++++++
package/wpebackend-rdk/wpebackend-rdk.hash | 5 ++
package/wpebackend-rdk/wpebackend-rdk.mk | 43 ++++++++++++++++
package/wpewebkit/Config.in | 9 ++--
package/wpewebkit/wpewebkit.mk | 9 +++-
8 files changed, 154 insertions(+), 11 deletions(-)
create mode 100644 package/wpebackend-rdk/Config.in
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.hash
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.mk
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
` (4 preceding siblings ...)
2024-06-27 19:33 ` [Buildroot] [PATCH v2 0/4] " Adrian Perez de Castro
@ 2024-06-27 19:33 ` Adrian Perez de Castro
2024-08-02 21:00 ` Thomas Petazzoni via buildroot
2024-06-27 19:33 ` [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
` (2 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-06-27 19:33 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
The wpebackend-rdk can be used as an alternative to wpebackend-fdo in
some cases, and also supports a few additional configurations. For now
only the Wayland-EGL and Broadcom RaspberryPi userland implementations
can be enabled. The former is useful for testing, and the latter allows
using WPE WebKit directly on top of Dispmanx in combination with the
rpi-userland package in supported RaspberryPi models.
This only adds the new package, follow-up commits will un-hardcode the
usage of wpebackend-fdo and allow selecting either which of both to
build.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/Config.in | 1 +
package/wpebackend-rdk/Config.in | 57 ++++++++++++++++++++++
package/wpebackend-rdk/wpebackend-rdk.hash | 5 ++
package/wpebackend-rdk/wpebackend-rdk.mk | 43 ++++++++++++++++
4 files changed, 106 insertions(+)
create mode 100644 package/wpebackend-rdk/Config.in
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.hash
create mode 100644 package/wpebackend-rdk/wpebackend-rdk.mk
---
v1 -> v2:
- Unchanged.
diff --git a/package/Config.in b/package/Config.in
index 550fdc1f411..5dab5de59c1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1734,6 +1734,7 @@ menu "Graphics"
source "package/wlroots/Config.in"
source "package/woff2/Config.in"
source "package/wpebackend-fdo/Config.in"
+ source "package/wpebackend-rdk/Config.in"
source "package/wpewebkit/Config.in"
source "package/zbar/Config.in"
source "package/zxing-cpp/Config.in"
diff --git a/package/wpebackend-rdk/Config.in b/package/wpebackend-rdk/Config.in
new file mode 100644
index 00000000000..6125911bec9
--- /dev/null
+++ b/package/wpebackend-rdk/Config.in
@@ -0,0 +1,57 @@
+comment "wpebackend-rdk needs a toolchain w/ C++, wchar, threads, dynamic library, and rpi-userland or an OpenGL-capable Wayland backend"
+ depends on !(BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND) \
+ || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \
+ || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+
+config BR2_PACKAGE_WPEBACKEND_RDK
+ bool "wpebackend-rdk"
+ depends on !BR2_STATIC_LIBS # wayland
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, libglib2
+ depends on BR2_USE_WCHAR # libglib2
+ depends on BR2_USE_MMU # libglib2
+ depends on BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBWPE
+ help
+ WPEBackend interface supporting a number of configurations.
+
+if BR2_PACKAGE_WPEBACKEND_RDK
+
+choice
+ prompt Implementation
+ default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI if BR2_PACKAGE_RPI_USERLAND
+ default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL if BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+
+comment "brcm-rpi needs rpi-userland"
+ depends on !BR2_PACKAGE_RPI_USERLAND || !BR2_arm
+
+config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
+ bool "brcm-rpi"
+ depends on BR2_arm
+ depends on BR2_PACKAGE_RPI_USERLAND
+ help
+ Build RaspberryPi support using Broadcom's rpi-userland.
+
+comment "wayland-egl needs an EGL capable Wayland implementation"
+ depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+
+config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL
+ bool "wayland-egl"
+ depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+ help
+ Build Wayland-EGL support.
+
+endchoice
+
+if BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
+
+config BR2_PACKAGE_WPEBACKEND_RDK_LIBINPUT
+ bool "libinput support"
+ select BR2_PACKAGE_LIBINPUT
+ help
+ Support keyboard and mouse input through libinput
+
+endif
+
+endif
diff --git a/package/wpebackend-rdk/wpebackend-rdk.hash b/package/wpebackend-rdk/wpebackend-rdk.hash
new file mode 100644
index 00000000000..af7dab6a365
--- /dev/null
+++ b/package/wpebackend-rdk/wpebackend-rdk.hash
@@ -0,0 +1,5 @@
+# Generated locally
+sha256 4c6ae288cf66f0a47052a50972e3d3727617c4c3e104db20494a3c5feb262f40 wpebackend-rdk-4.4.1.tar.gz
+
+# License files
+sha256 a5ba969938c2896411ea1a23ee7d9ccb68306a65615b6711afe738c8f6ff2153 COPYING
diff --git a/package/wpebackend-rdk/wpebackend-rdk.mk b/package/wpebackend-rdk/wpebackend-rdk.mk
new file mode 100644
index 00000000000..f9740eb46cd
--- /dev/null
+++ b/package/wpebackend-rdk/wpebackend-rdk.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# wpebackend-rdk
+#
+################################################################################
+
+WPEBACKEND_RDK_VERSION = 4.4.1
+WPEBACKEND_RDK_SITE = $(call github,WebPlatformForEmbedded,WPEBackend-rdk,R$(WPEBACKEND_RDK_VERSION))
+WPEBACKEND_RDK_INSTALL_STAGING = YES
+WPEBACKEND_RDK_LICENSE = BSD-2-Clause
+WPEBACKEND_RDK_LICENSE_FILES = COPYING
+WPEBACKEND_RDK_DEPENDENCIES = libglib2 libwpe
+WPEBACKEND_RDK_CONF_OPTS = \
+ -DUSE_BACKEND_BCM_NEXUS=OFF \
+ -DUSE_BACKEND_BCM_NEXUS_WAYLAND=OFF \
+ -DUSE_BACKEND_INTEL_CE=OFF \
+ -DUSE_BACKEND_WESTEROS=OFF \
+ -DUSE_BACKEND_WPEFRAMEWORK=OFF \
+ -DUSE_HOLE_PUNCH_GSTREAMER=OFF \
+ -DUSE_VIRTUAL_KEYBOARD=OFF
+
+ifeq ($(BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI),y)
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_BCM_RPI=ON
+WPEBACKEND_RDK_DEPENDENCIES += rpi-userland
+else
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_BCM_RPI=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL),y)
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_WAYLAND_EGL=ON
+WPEBACKEND_RDK_DEPENDENCIES += libegl wayland
+else
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_BACKEND_WAYLAND_EGL=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_WPEBACKEND_RDK_LIBINPUT),y)
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_INPUT_LIBINPUT=ON
+WPEBACKEND_RDK_DEPENDENCIES += libinput
+else
+WPEBACKEND_RDK_CONF_OPTS += -DUSE_INPUT_LIBINPUT=OFF
+endif
+
+$(eval $(cmake-package))
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
` (5 preceding siblings ...)
2024-06-27 19:33 ` [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package Adrian Perez de Castro
@ 2024-06-27 19:33 ` Adrian Perez de Castro
2024-08-02 21:06 ` Thomas Petazzoni via buildroot
2024-06-27 19:33 ` [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 4/4] package/wpewebkit: disable libdrm usage when not available Adrian Perez de Castro
8 siblings, 1 reply; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-06-27 19:33 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Make the Cog headless platform plug-in selectable, allowing to configure
the build without any plug-in at all. When all plug-ins are disabled,
Cog does not require wpebackend-fdo at build time, and it is still
able to use its built-in "fallback" support to load other WPE backends
like wpebackend-rdk.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/cog/Config.in | 28 ++++++++++++++++++++++++++--
package/cog/cog.mk | 13 ++++++++++---
2 files changed, 36 insertions(+), 5 deletions(-)
---
v1 -> v2:
- Unchanged.
diff --git a/package/cog/Config.in b/package/cog/Config.in
index d2a910f9b89..d706b045b15 100644
--- a/package/cog/Config.in
+++ b/package/cog/Config.in
@@ -19,6 +19,10 @@ config BR2_PACKAGE_COG
if BR2_PACKAGE_COG
+config BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
+ bool
+ default n
+
config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
string "home uri"
default "https://wpewebkit.org"
@@ -30,6 +34,8 @@ config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
config BR2_PACKAGE_COG_PLATFORM_FDO
bool "Wayland backend"
default y
+ depends on BR2_PACKAGE_WPEBACKEND_FDO
+ select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
select BR2_PACKAGE_LIBXKBCOMMON
select BR2_PACKAGE_WAYLAND_PROTOCOLS
help
@@ -43,6 +49,8 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
depends on BR2_PACKAGE_HAS_LIBGBM
depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
+ depends on BR2_PACKAGE_WPEBACKEND_FDO
+ select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
select BR2_PACKAGE_LIBDRM
select BR2_PACKAGE_LIBINPUT
help
@@ -50,16 +58,32 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
with video drivers that support kernel mode-setting (KMS)
via the DRM user-space API.
+config BR2_PACKAGE_COG_PLATFORM_HEADLESS
+ bool "Headless backend"
+ depends on BR2_PACKAGE_WPEBACKEND_FDO
+ select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
+ help
+ Enable the headless platform backend.
+
config BR2_PACKAGE_COG_USE_SYSTEM_DBUS
bool "expose system D-Bus control interface"
help
Expose remote control interface on system bus
-comment "DRM platform needs EGL and GBM"
+comment "Headless platform needs wpebackend-fdo"
+ depends on \
+ !BR2_PACKAGE_WPEBACKEND_FDO
+
+comment "DRM platform needs EGL, GBM, wpebackend-fdo"
depends on \
!BR2_PACKAGE_HAS_LIBEGL || \
!BR2_PACKAGE_HAS_LIBGBM || \
!BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF || \
- !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
+ !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || \
+ !BR2_PACKAGE_WPEBACKEND_FDO
+
+comment "Wayland platform needs wpebackend-fdo"
+ depends on \
+ !BR2_PACKAGE_WPEBACKEND_FDO
endif
diff --git a/package/cog/cog.mk b/package/cog/cog.mk
index 7f680bb7005..166f095118b 100644
--- a/package/cog/cog.mk
+++ b/package/cog/cog.mk
@@ -8,7 +8,7 @@ COG_VERSION = 0.18.4
COG_SITE = https://wpewebkit.org/releases
COG_SOURCE = cog-$(COG_VERSION).tar.xz
COG_INSTALL_STAGING = YES
-COG_DEPENDENCIES = dbus wpewebkit wpebackend-fdo wayland
+COG_DEPENDENCIES = dbus wpewebkit wayland
COG_LICENSE = MIT
COG_LICENSE_FILES = COPYING
COG_CONF_OPTS = \
@@ -19,8 +19,6 @@ COG_CONF_OPTS = \
-Dcog_home_uri='$(call qstrip,$(BR2_PACKAGE_COG_PROGRAMS_HOME_URI))' \
-Dplatforms='$(subst $(space),$(comma),$(strip $(COG_PLATFORMS_LIST)))'
-COG_PLATFORMS_LIST = headless
-
ifeq ($(BR2_PACKAGE_WESTON),y)
COG_CONF_OPTS += -Dwayland_weston_direct_display=true
COG_DEPENDENCIES += weston
@@ -28,6 +26,11 @@ else
COG_CONF_OPTS += -Dwayland_weston_direct_display=false
endif
+ifeq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS),y)
+COG_PLATFORMS_LIST += headless
+COG_DEPENDENCIES += wpebackend-fdo
+endif
+
ifeq ($(BR2_PACKAGE_COG_PLATFORM_FDO),y)
COG_PLATFORMS_LIST += wayland
COG_DEPENDENCIES += libxkbcommon wayland-protocols
@@ -48,4 +51,8 @@ ifeq ($(BR2_PACKAGE_LIBMANETTE),y)
COG_DEPENDENCIES += libmanette
endif
+ifeq ($(BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO),y)
+COG_DEPENDENCIES += wpebackend-fdo
+endif
+
$(eval $(meson-package))
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
` (6 preceding siblings ...)
2024-06-27 19:33 ` [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
@ 2024-06-27 19:33 ` Adrian Perez de Castro
2024-08-02 21:08 ` Thomas Petazzoni via buildroot
2024-06-27 19:33 ` [Buildroot] [PATCH v2 4/4] package/wpewebkit: disable libdrm usage when not available Adrian Perez de Castro
8 siblings, 1 reply; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-06-27 19:33 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
needed at all during the build. What is needed is a WPE backend at run
time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
reflect this, we make wpewebkit depend on either being selected.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/wpewebkit/Config.in | 9 ++++-----
package/wpewebkit/wpewebkit.mk | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
---
v1 -> v2:
- Remove openjpeg dependency, which has been dropped in 2.44.x
diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
index e4b0320e1da..c55b827e2b8 100644
--- a/package/wpewebkit/Config.in
+++ b/package/wpewebkit/Config.in
@@ -24,11 +24,11 @@ comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
|| !BR2_HOST_GCC_AT_LEAST_4_9
-comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
+comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
depends on !BR2_BINFMT_FLAT
- depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
- || !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+ depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
+ depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK
config BR2_PACKAGE_WPEWEBKIT
bool "wpewebkit"
@@ -41,8 +41,8 @@ config BR2_PACKAGE_WPEWEBKIT
depends on BR2_USE_WCHAR # icu, libsoup3
depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
- depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK
select BR2_PACKAGE_CAIRO
select BR2_PACKAGE_CAIRO_PNG
select BR2_PACKAGE_HARFBUZZ
@@ -58,7 +58,6 @@ config BR2_PACKAGE_WPEWEBKIT
select BR2_PACKAGE_WAYLAND_PROTOCOLS
select BR2_PACKAGE_WEBP
select BR2_PACKAGE_WEBP_DEMUX
- select BR2_PACKAGE_WPEBACKEND_FDO
help
WPE (Web Platform for Embedded) port of the WebKit engine,
to allow embedders to create simple and performant systems
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
index ecb3b3e352b..382c2adca10 100644
--- a/package/wpewebkit/wpewebkit.mk
+++ b/package/wpewebkit/wpewebkit.mk
@@ -17,7 +17,7 @@ WPEWEBKIT_CPE_ID_VENDOR = wpewebkit
WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit
WPEWEBKIT_DEPENDENCIES = host-gperf host-python3 host-ruby host-unifdef \
harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup3 libtasn1 \
- libpng libxslt wayland-protocols webp wpebackend-fdo
+ libpng libxslt libwpe wayland-protocols webp
WPEWEBKIT_CMAKE_BACKEND = ninja
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Buildroot] [PATCH v2 4/4] package/wpewebkit: disable libdrm usage when not available
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
` (7 preceding siblings ...)
2024-06-27 19:33 ` [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
@ 2024-06-27 19:33 ` Adrian Perez de Castro
2024-08-02 21:15 ` Thomas Petazzoni via buildroot
8 siblings, 1 reply; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-06-27 19:33 UTC (permalink / raw)
To: buildroot; +Cc: Adrian Perez de Castro, Samuel Martin
Pass USE_LIBDRM=OFF to the wpewebkit CMake configuration step when the
libdrm package has not been selected.
WPE WebKit can be built without libdrm support, and it will still work
with backends that use other platform-specific methods to handle
graphics buffers and/or presenting content onto an output. For example
this is the case with wpebackend-rdk configured to use rpi-userland,
which uses dispmanx to produce the output instead of DRM/KMS.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
package/wpewebkit/wpewebkit.mk | 7 +++++++
1 file changed, 7 insertions(+)
---
v1 -> v2:
- Patch added.
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
index 382c2adca10..4071cbb0d83 100644
--- a/package/wpewebkit/wpewebkit.mk
+++ b/package/wpewebkit/wpewebkit.mk
@@ -87,6 +87,13 @@ else
WPEWEBKIT_CONF_OPTS += -DUSE_LIBBACKTRACE=OFF
endif
+ifeq ($(BR2_PACKAGE_LIBDRM),y)
+WPEWEBKIT_CONF_OPTS += -DUSE_LIBDRM=ON
+WPEWEBKIT_DEPENDENCIES += libdrm
+else
+WPEWEBKIT_CONF_OPTS += -DUSE_LIBDRM=OFF
+endif
+
ifeq ($(BR2_PACKAGE_WOFF2),y)
WPEWEBKIT_CONF_OPTS += -DUSE_WOFF2=ON
WPEWEBKIT_DEPENDENCIES += woff2
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package
2024-06-27 19:33 ` [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package Adrian Perez de Castro
@ 2024-08-02 21:00 ` Thomas Petazzoni via buildroot
2024-09-02 20:12 ` Adrian Perez de Castro
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-02 21:00 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: Samuel Martin, buildroot
Hello Adrian,
On Thu, 27 Jun 2024 22:33:29 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:
> The wpebackend-rdk can be used as an alternative to wpebackend-fdo in
> some cases, and also supports a few additional configurations. For now
> only the Wayland-EGL and Broadcom RaspberryPi userland implementations
> can be enabled. The former is useful for testing, and the latter allows
> using WPE WebKit directly on top of Dispmanx in combination with the
> rpi-userland package in supported RaspberryPi models.
>
> This only adds the new package, follow-up commits will un-hardcode the
> usage of wpebackend-fdo and allow selecting either which of both to
> build.
>
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
I wanted to merge this, but unfortunately:
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_RPI_USERLAND=y
BR2_PACKAGE_WPEBACKEND_RDK=y
# BR2_TARGET_ROOTFS_TAR is not set
fails to build with:
In file included from /home/thomas/projets/buildroot/output/build/wpebackend-rdk-4.4.1/src/bcm-rpi/view-backend.cpp:30:
/home/thomas/projets/buildroot/output/build/wpebackend-rdk-4.4.1/src/input/Libinput/LibinputServer.h:37:10: fatal error: libudev.h: No such file or directory
37 | #include <libudev.h>
| ^~~~~~~~~~~
compilation terminated.
as far as I can see, LibinputServer.h includes <libinput.h> and
<libudev.h>:
#ifndef KEY_INPUT_HANDLING_VIRTUAL
#include <libudev.h>
#include <libinput.h>
#else
#include <virtualinput.h>
#endif
whenever KEY_INPUT_HANDLING_VIRTUAL is *NOT* defined. And
KEY_INPUT_HANDLING_VIRTUAL is only defined when USE_VIRTUAL_KEYBOARD=ON.
I believe you should also properly use the USE_INPUT_UDEV and
USE_INPUT_WAYLAND options.
find_package(Libxkbcommon REQUIRED)
libxkbcommon is also a mandatory dependency. Even though it is
indirectly pulled in by libwpe, it should be expressed as a direct
dependency of wpebackend-rdk.
> ---
> package/Config.in | 1 +
> package/wpebackend-rdk/Config.in | 57 ++++++++++++++++++++++
> package/wpebackend-rdk/wpebackend-rdk.hash | 5 ++
> package/wpebackend-rdk/wpebackend-rdk.mk | 43 ++++++++++++++++
> 4 files changed, 106 insertions(+)
Please add yourself in the DEVELOPERS file for this package.
> diff --git a/package/wpebackend-rdk/Config.in b/package/wpebackend-rdk/Config.in
> new file mode 100644
> index 00000000000..6125911bec9
> --- /dev/null
> +++ b/package/wpebackend-rdk/Config.in
> @@ -0,0 +1,57 @@
> +comment "wpebackend-rdk needs a toolchain w/ C++, wchar, threads, dynamic library, and rpi-userland or an OpenGL-capable Wayland backend"
> + depends on !(BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND) \
> + || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \
> + || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
Please split this into two comments, one for the toolchain things, one
for the rpi-userland || wayland EGL.
Also, the option BR2_PACKAGE_HAS_LIBEGL_WAYLAND is gone, see commit
4fad6b3c58abd20c533b67b85658bc66d015110b. You can use
BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_WAYLAND instead. This needs to be
fixed globally.
> +config BR2_PACKAGE_WPEBACKEND_RDK
> + bool "wpebackend-rdk"
> + depends on !BR2_STATIC_LIBS # wayland
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, libglib2
> + depends on BR2_USE_WCHAR # libglib2
> + depends on BR2_USE_MMU # libglib2
> + depends on BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> + select BR2_PACKAGE_LIBGLIB2
> + select BR2_PACKAGE_LIBWPE
> + help
> + WPEBackend interface supporting a number of configurations.
Would be nice to have a slightly extended explanation for the poor
souls like that are very confused by libwpe vs. wpebackend-fdo vs.
wpebackend-rdk vs. wpewebkit vs. webkitgtk.
> +if BR2_PACKAGE_WPEBACKEND_RDK
> +
> +choice
> + prompt Implementation
Double quotes around "Implementation". Maybe it should be "Backend"
instead of "Implementation"?
> + default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI if BR2_PACKAGE_RPI_USERLAND
> + default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL if BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> +
> +comment "brcm-rpi needs rpi-userland"
> + depends on !BR2_PACKAGE_RPI_USERLAND || !BR2_arm
better expressed as:
depends on BR2_arm
depends on !BR2_PACKAGE_RPI_USERLAND
> +
> +config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
> + bool "brcm-rpi"
> + depends on BR2_arm
> + depends on BR2_PACKAGE_RPI_USERLAND
> + help
> + Build RaspberryPi support using Broadcom's rpi-userland.
> +
> +comment "wayland-egl needs an EGL capable Wayland implementation"
> + depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> +
> +config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL
> + bool "wayland-egl"
> + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> + help
> + Build Wayland-EGL support.
> +
> +endchoice
> +
> +if BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
> +
> +config BR2_PACKAGE_WPEBACKEND_RDK_LIBINPUT
> + bool "libinput support"
> + select BR2_PACKAGE_LIBINPUT
> + help
> + Support keyboard and mouse input through libinput
Why is the keyboard/mouse support with libinput only available with the
brcm-rpi backend? Reading the CMakeLists.txt, I don't really see any
relationship.
Could you fix up those different issues and submit a v3 ?
Thanks a lot!
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed
2024-06-27 19:33 ` [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
@ 2024-08-02 21:06 ` Thomas Petazzoni via buildroot
2024-09-02 20:21 ` Adrian Perez de Castro
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-02 21:06 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: Samuel Martin, buildroot
Hello,
On Thu, 27 Jun 2024 22:33:30 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:
> Make the Cog headless platform plug-in selectable, allowing to configure
> the build without any plug-in at all. When all plug-ins are disabled,
> Cog does not require wpebackend-fdo at build time, and it is still
> able to use its built-in "fallback" support to load other WPE backends
> like wpebackend-rdk.
This seems to makes sense to me, but I completely fail to understand
the complicated implementation you are proposing below.
There is in fact something already super wrong in package/cog: it has
wpebackend-fdo in COG_DEPENDENCIES, but it doesn't select it. It works
because it depends on wpewebkit, which itself selects wpebackend-fdo,
but that's really wrong. This should be fixed in a first patch.
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
> package/cog/Config.in | 28 ++++++++++++++++++++++++++--
> package/cog/cog.mk | 13 ++++++++++---
> 2 files changed, 36 insertions(+), 5 deletions(-)
>
> ---
> v1 -> v2:
> - Unchanged.
>
> diff --git a/package/cog/Config.in b/package/cog/Config.in
> index d2a910f9b89..d706b045b15 100644
> --- a/package/cog/Config.in
> +++ b/package/cog/Config.in
> @@ -19,6 +19,10 @@ config BR2_PACKAGE_COG
>
> if BR2_PACKAGE_COG
>
> +config BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
> + bool
> + default n
I believe this is not needed.
> config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
> string "home uri"
> default "https://wpewebkit.org"
> @@ -30,6 +34,8 @@ config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
> config BR2_PACKAGE_COG_PLATFORM_FDO
> bool "Wayland backend"
> default y
> + depends on BR2_PACKAGE_WPEBACKEND_FDO
> + select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
If the Wayland backend needs wpebackend-fdo, just select it:
select BR2_PACKAGE_WPEBACKEND_FDO
> select BR2_PACKAGE_LIBXKBCOMMON
> select BR2_PACKAGE_WAYLAND_PROTOCOLS
> help
> @@ -43,6 +49,8 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
> depends on BR2_PACKAGE_HAS_LIBGBM
> depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
> depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
> + depends on BR2_PACKAGE_WPEBACKEND_FDO
> + select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
If the DRM backend needs wpebackend-fdo, just select it:
select BR2_PACKAGE_WPEBACKEND_FDO
> select BR2_PACKAGE_LIBDRM
> select BR2_PACKAGE_LIBINPUT
> help
> @@ -50,16 +58,32 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
> with video drivers that support kernel mode-setting (KMS)
> via the DRM user-space API.
>
> +config BR2_PACKAGE_COG_PLATFORM_HEADLESS
> + bool "Headless backend"
> + depends on BR2_PACKAGE_WPEBACKEND_FDO
> + select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
Same, just select wpebackend-fdo.
> + help
> + Enable the headless platform backend.
> +
> config BR2_PACKAGE_COG_USE_SYSTEM_DBUS
> bool "expose system D-Bus control interface"
> help
> Expose remote control interface on system bus
>
> -comment "DRM platform needs EGL and GBM"
> +comment "Headless platform needs wpebackend-fdo"
> + depends on \
> + !BR2_PACKAGE_WPEBACKEND_FDO
> +
> +comment "DRM platform needs EGL, GBM, wpebackend-fdo"
> depends on \
> !BR2_PACKAGE_HAS_LIBEGL || \
> !BR2_PACKAGE_HAS_LIBGBM || \
> !BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF || \
> - !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
> + !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || \
> + !BR2_PACKAGE_WPEBACKEND_FDO
> +
> +comment "Wayland platform needs wpebackend-fdo"
> + depends on \
> + !BR2_PACKAGE_WPEBACKEND_FDO
Drop all those changes.
> endif
> diff --git a/package/cog/cog.mk b/package/cog/cog.mk
> index 7f680bb7005..166f095118b 100644
> --- a/package/cog/cog.mk
> +++ b/package/cog/cog.mk
> @@ -8,7 +8,7 @@ COG_VERSION = 0.18.4
> COG_SITE = https://wpewebkit.org/releases
> COG_SOURCE = cog-$(COG_VERSION).tar.xz
> COG_INSTALL_STAGING = YES
> -COG_DEPENDENCIES = dbus wpewebkit wpebackend-fdo wayland
> +COG_DEPENDENCIES = dbus wpewebkit wayland
> COG_LICENSE = MIT
> COG_LICENSE_FILES = COPYING
> COG_CONF_OPTS = \
> @@ -19,8 +19,6 @@ COG_CONF_OPTS = \
> -Dcog_home_uri='$(call qstrip,$(BR2_PACKAGE_COG_PROGRAMS_HOME_URI))' \
> -Dplatforms='$(subst $(space),$(comma),$(strip $(COG_PLATFORMS_LIST)))'
>
> -COG_PLATFORMS_LIST = headless
> -
> ifeq ($(BR2_PACKAGE_WESTON),y)
> COG_CONF_OPTS += -Dwayland_weston_direct_display=true
> COG_DEPENDENCIES += weston
> @@ -28,6 +26,11 @@ else
> COG_CONF_OPTS += -Dwayland_weston_direct_display=false
> endif
>
> +ifeq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS),y)
> +COG_PLATFORMS_LIST += headless
> +COG_DEPENDENCIES += wpebackend-fdo
> +endif
> +
> ifeq ($(BR2_PACKAGE_COG_PLATFORM_FDO),y)
> COG_PLATFORMS_LIST += wayland
> COG_DEPENDENCIES += libxkbcommon wayland-protocols
> @@ -48,4 +51,8 @@ ifeq ($(BR2_PACKAGE_LIBMANETTE),y)
> COG_DEPENDENCIES += libmanette
> endif
>
> +ifeq ($(BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO),y)
> +COG_DEPENDENCIES += wpebackend-fdo
> +endif
Drop this, and instead do:
ifeq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS),y)
COG_PLATFORMS_LIST += headless
COG_DEPENDENCIES += wpebackend-fdo
endif
ifeq ($(BR2_PACKAGE_COG_PLATFORM_FDO),y)
COG_PLATFORMS_LIST += wayland
COG_DEPENDENCIES += libxkbcommon wayland-protocols wpebackend-fdo
endif
ifeq ($(BR2_PACKAGE_COG_PLATFORM_DRM),y)
COG_PLATFORMS_LIST += drm
COG_DEPENDENCIES += libdrm libinput libgbm libegl udev wpebackend-fdo
endif
Could you rework a v3 according to those suggestions?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo
2024-06-27 19:33 ` [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
@ 2024-08-02 21:08 ` Thomas Petazzoni via buildroot
2024-09-02 20:15 ` Adrian Perez de Castro
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-02 21:08 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: Samuel Martin, buildroot
Hello,
On Thu, 27 Jun 2024 22:33:31 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:
> Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
> needed at all during the build. What is needed is a WPE backend at run
> time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
> reflect this, we make wpewebkit depend on either being selected.
>
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
> package/wpewebkit/Config.in | 9 ++++-----
> package/wpewebkit/wpewebkit.mk | 2 +-
> 2 files changed, 5 insertions(+), 6 deletions(-)
>
> ---
> v1 -> v2:
> - Remove openjpeg dependency, which has been dropped in 2.44.x
>
> diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> index e4b0320e1da..c55b827e2b8 100644
> --- a/package/wpewebkit/Config.in
> +++ b/package/wpewebkit/Config.in
> @@ -24,11 +24,11 @@ comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
> || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
> || !BR2_HOST_GCC_AT_LEAST_4_9
>
> -comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
> +comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
> depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> depends on !BR2_BINFMT_FLAT
> - depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
> - || !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> + depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
> + depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK
I think we will want to select one, see below.
>
> config BR2_PACKAGE_WPEWEBKIT
> bool "wpewebkit"
> @@ -41,8 +41,8 @@ config BR2_PACKAGE_WPEWEBKIT
> depends on BR2_USE_WCHAR # icu, libsoup3
> depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
> depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
> - depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
> depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> + depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK
Please use instead:
select BR2_PACKAGE_WPEBACKEND_FDO if !BR2_PACKAGE_WPEBACKEND_RDK # runtime
this will ensure that at least one is selected, taking by default
wpebackend-fdo, but allowing the user to enable wpebackend-rdk (and
disable wpebackend-fdo).
Also the "# runtime" comment is important, because it explains why an
option is selected, but not added to the build dependencies of the
package.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 4/4] package/wpewebkit: disable libdrm usage when not available
2024-06-27 19:33 ` [Buildroot] [PATCH v2 4/4] package/wpewebkit: disable libdrm usage when not available Adrian Perez de Castro
@ 2024-08-02 21:15 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 20+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-02 21:15 UTC (permalink / raw)
To: Adrian Perez de Castro; +Cc: Samuel Martin, buildroot
On Thu, 27 Jun 2024 22:33:32 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:
> Pass USE_LIBDRM=OFF to the wpewebkit CMake configuration step when the
> libdrm package has not been selected.
>
> WPE WebKit can be built without libdrm support, and it will still work
> with backends that use other platform-specific methods to handle
> graphics buffers and/or presenting content onto an output. For example
> this is the case with wpebackend-rdk configured to use rpi-userland,
> which uses dispmanx to produce the output instead of DRM/KMS.
>
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
> package/wpewebkit/wpewebkit.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package
2024-08-02 21:00 ` Thomas Petazzoni via buildroot
@ 2024-09-02 20:12 ` Adrian Perez de Castro
0 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-09-02 20:12 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Samuel Martin, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 8579 bytes --]
Hi!
On Fri, 02 Aug 2024 23:00:13 +0200 Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> On Thu, 27 Jun 2024 22:33:29 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
>
> > The wpebackend-rdk can be used as an alternative to wpebackend-fdo in
> > some cases, and also supports a few additional configurations. For now
> > only the Wayland-EGL and Broadcom RaspberryPi userland implementations
> > can be enabled. The former is useful for testing, and the latter allows
> > using WPE WebKit directly on top of Dispmanx in combination with the
> > rpi-userland package in supported RaspberryPi models.
> >
> > This only adds the new package, follow-up commits will un-hardcode the
> > usage of wpebackend-fdo and allow selecting either which of both to
> > build.
> >
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
>
> I wanted to merge this, but unfortunately:
>
> BR2_arm=y
> BR2_cortex_a9=y
> BR2_ARM_ENABLE_VFP=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_RPI_USERLAND=y
> BR2_PACKAGE_WPEBACKEND_RDK=y
> # BR2_TARGET_ROOTFS_TAR is not set
>
> fails to build with:
>
> In file included from /home/thomas/projets/buildroot/output/build/wpebackend-rdk-4.4.1/src/bcm-rpi/view-backend.cpp:30:
> /home/thomas/projets/buildroot/output/build/wpebackend-rdk-4.4.1/src/input/Libinput/LibinputServer.h:37:10: fatal error: libudev.h: No such file or directory
> 37 | #include <libudev.h>
> | ^~~~~~~~~~~
> compilation terminated.
>
> as far as I can see, LibinputServer.h includes <libinput.h> and
> <libudev.h>:
>
> #ifndef KEY_INPUT_HANDLING_VIRTUAL
> #include <libudev.h>
> #include <libinput.h>
> #else
> #include <virtualinput.h>
> #endif
>
> whenever KEY_INPUT_HANDLING_VIRTUAL is *NOT* defined. And
> KEY_INPUT_HANDLING_VIRTUAL is only defined when USE_VIRTUAL_KEYBOARD=ON.
>
> I believe you should also properly use the USE_INPUT_UDEV and
> USE_INPUT_WAYLAND options.
>
> find_package(Libxkbcommon REQUIRED)
>
> libxkbcommon is also a mandatory dependency. Even though it is
> indirectly pulled in by libwpe, it should be expressed as a direct
> dependency of wpebackend-rdk.
Aye, will fix. It seems I was a bit hasty checking the CMake build
system for the package O:-)
> > ---
> > package/Config.in | 1 +
> > package/wpebackend-rdk/Config.in | 57 ++++++++++++++++++++++
> > package/wpebackend-rdk/wpebackend-rdk.hash | 5 ++
> > package/wpebackend-rdk/wpebackend-rdk.mk | 43 ++++++++++++++++
> > 4 files changed, 106 insertions(+)
>
> Please add yourself in the DEVELOPERS file for this package.
Will do.
> > diff --git a/package/wpebackend-rdk/Config.in b/package/wpebackend-rdk/Config.in
> > new file mode 100644
> > index 00000000000..6125911bec9
> > --- /dev/null
> > +++ b/package/wpebackend-rdk/Config.in
> > @@ -0,0 +1,57 @@
> > +comment "wpebackend-rdk needs a toolchain w/ C++, wchar, threads, dynamic library, and rpi-userland or an OpenGL-capable Wayland backend"
> > + depends on !(BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND) \
> > + || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \
> > + || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
>
> Please split this into two comments, one for the toolchain things, one
> for the rpi-userland || wayland EGL.
>
> Also, the option BR2_PACKAGE_HAS_LIBEGL_WAYLAND is gone, see commit
> 4fad6b3c58abd20c533b67b85658bc66d015110b. You can use
> BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_WAYLAND instead. This needs to be
> fixed globally.
Ok.
> > +config BR2_PACKAGE_WPEBACKEND_RDK
> > + bool "wpebackend-rdk"
> > + depends on !BR2_STATIC_LIBS # wayland
> > + depends on BR2_INSTALL_LIBSTDCPP
> > + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, libglib2
> > + depends on BR2_USE_WCHAR # libglib2
> > + depends on BR2_USE_MMU # libglib2
> > + depends on BR2_PACKAGE_RPI_USERLAND || BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > + select BR2_PACKAGE_LIBGLIB2
> > + select BR2_PACKAGE_LIBWPE
> > + help
> > + WPEBackend interface supporting a number of configurations.
>
> Would be nice to have a slightly extended explanation for the poor
> souls like that are very confused by libwpe vs. wpebackend-fdo vs.
> wpebackend-rdk vs. wpewebkit vs. webkitgtk.
Wait for it... Things are gonna get even more complicated, probably in
WPE WebKit 2.48.x we are introducing a new WPEPlatform library (which
will be built part of the wpewebkit package) that will allow removing
the need for libwpe+wpebackend-foo.
So, here goes a quick bullet-points explanation, also for myself to help
later write the package descriptions when I re-spin this into an updated
v3 patchset:
- WPE WebKit is, to a certain degree, independent from the mechanisms
used to allocate graphics buffers and receiving user input.
- To achieve that independence, it uses interfaces defined by libwpe.
- In turn libwpe will dynamically load a WPE backend plug-in that
provides a concrete implementation (wpebackend-fdo, wpebackend-rdk).
- wpebackend-fdo provides API for applications to obtain the rendered
content as a series of EGLImages, and in that sense it is "generic"
but applications are then responsible for arranging how to display
things (this is what Cog's "platform plug-ins" do).
- wpebackend-rdk, on the other hand, handles displaying rendered
content itself, which can be more performant in some scenarios,
but at the cost of reduced flexibility and only being able to use
one single WebKitWebView in your application.
> > +if BR2_PACKAGE_WPEBACKEND_RDK
> > +
> > +choice
> > + prompt Implementation
>
> Double quotes around "Implementation". Maybe it should be "Backend"
> instead of "Implementation"?
I wanted to use a term different from "backend" to make it different
from the "WPE backend": wpebackend-rdk is a WPE backend, which has
different "implementations" (one for Wayland-EGL, one for RPi/dispmanx,
etc.). The issue here is that wpebackend-rdk can be built with different
compile-time options to support different hardware/configurations, when
in theory each one of those configurations should be a different
wpebackend-$foobar. My understanding is that wpebackend-rdk ended up the
way it is was to reuse common parts when building the different
configurations :-S
Using "backend" for both can quickly get confusing, as in: "wpebackend-rdk
is a WPE backend that has a Wayland-EGL backend". Compare with:
"wpebackend-rdk is a WPE backend that has a Wayland-EGL implementation".
Still a mouthful, but I think one can get what I am trying to avoid.
Maybe using "Configuration" instead? Suggestions for better wording are
more than welcome, too.
> > + default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI if BR2_PACKAGE_RPI_USERLAND
> > + default BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL if BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > +
> > +comment "brcm-rpi needs rpi-userland"
> > + depends on !BR2_PACKAGE_RPI_USERLAND || !BR2_arm
>
> better expressed as:
>
> depends on BR2_arm
> depends on !BR2_PACKAGE_RPI_USERLAND
Ok.
> > +
> > +config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
> > + bool "brcm-rpi"
> > + depends on BR2_arm
> > + depends on BR2_PACKAGE_RPI_USERLAND
> > + help
> > + Build RaspberryPi support using Broadcom's rpi-userland.
> > +
> > +comment "wayland-egl needs an EGL capable Wayland implementation"
> > + depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > +
> > +config BR2_PACKAGE_WPEBACKEND_RDK_IMPL_WAYLAND_EGL
> > + bool "wayland-egl"
> > + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > + help
> > + Build Wayland-EGL support.
> > +
> > +endchoice
> > +
> > +if BR2_PACKAGE_WPEBACKEND_RDK_IMPL_BRCM_RPI
> > +
> > +config BR2_PACKAGE_WPEBACKEND_RDK_LIBINPUT
> > + bool "libinput support"
> > + select BR2_PACKAGE_LIBINPUT
> > + help
> > + Support keyboard and mouse input through libinput
>
> Why is the keyboard/mouse support with libinput only available with the
> brcm-rpi backend? Reading the CMakeLists.txt, I don't really see any
> relationship.
When building wpebackend-rdk for Wayland-EGL then events coming from the
Wayland compositor are used (wl_seat, wl_pointer, and so on) and there
is no need for libinput there. And for the brcm-rpi configuration is
optional to use e.g. in kiosk or signage deployments.
> Could you fix up those different issues and submit a v3 ?
May take a little while, but I will indeed submit a new version of the
patch set at some point. Thanks for all the review comments!
Cheers,
—Adrián
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo
2024-08-02 21:08 ` Thomas Petazzoni via buildroot
@ 2024-09-02 20:15 ` Adrian Perez de Castro
0 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-09-02 20:15 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Samuel Martin, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 2870 bytes --]
Hi,
On Fri, 02 Aug 2024 23:08:32 +0200 Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> On Thu, 27 Jun 2024 22:33:31 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
>
> > Remove the wpewebkit package dependency on wpebackend-fdo, as it is not
> > needed at all during the build. What is needed is a WPE backend at run
> > time, which may be provided by wpebackend-fdo or wpebackend-rdk. To
> > reflect this, we make wpewebkit depend on either being selected.
> >
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> > package/wpewebkit/Config.in | 9 ++++-----
> > package/wpewebkit/wpewebkit.mk | 2 +-
> > 2 files changed, 5 insertions(+), 6 deletions(-)
> >
> > ---
> > v1 -> v2:
> > - Remove openjpeg dependency, which has been dropped in 2.44.x
> >
> > diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> > index e4b0320e1da..c55b827e2b8 100644
> > --- a/package/wpewebkit/Config.in
> > +++ b/package/wpewebkit/Config.in
> > @@ -24,11 +24,11 @@ comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gc
> > || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
> > || !BR2_HOST_GCC_AT_LEAST_4_9
> >
> > -comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
> > +comment "wpewebkit needs an OpenGL ES w/ EGL-capable implementation and an WPE backend"
> > depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> > depends on !BR2_BINFMT_FLAT
> > - depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
> > - || !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > + depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
> > + depends on !BR2_PACKAGE_WPEBACKEND_FDO && !BR2_PACKAGE_WPEBACKEND_RDK
>
> I think we will want to select one, see below.
Indeed, I didn't come up myself with a good way of making sure at least
one is picked...
> > config BR2_PACKAGE_WPEWEBKIT
> > bool "wpewebkit"
> > @@ -41,8 +41,8 @@ config BR2_PACKAGE_WPEWEBKIT
> > depends on BR2_USE_WCHAR # icu, libsoup3
> > depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
> > depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
> > - depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
> > depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> > + depends on BR2_PACKAGE_WPEBACKEND_FDO || BR2_PACKAGE_WPEBACKEND_RDK
>
> Please use instead:
>
> select BR2_PACKAGE_WPEBACKEND_FDO if !BR2_PACKAGE_WPEBACKEND_RDK # runtime
>
> this will ensure that at least one is selected, taking by default
> wpebackend-fdo, but allowing the user to enable wpebackend-rdk (and
> disable wpebackend-fdo).
...and no idea why this didn't cross my mind. Thanks for the suggestion,
this is the right thing to do.
> Also the "# runtime" comment is important, because it explains why an
> option is selected, but not added to the build dependencies of the
> package.
TIL, thanks.
Cheers,
—Adrián
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed
2024-08-02 21:06 ` Thomas Petazzoni via buildroot
@ 2024-09-02 20:21 ` Adrian Perez de Castro
0 siblings, 0 replies; 20+ messages in thread
From: Adrian Perez de Castro @ 2024-09-02 20:21 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Samuel Martin, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 6351 bytes --]
Hello,
On Fri, 02 Aug 2024 23:06:44 +0200 Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> On Thu, 27 Jun 2024 22:33:30 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
>
> > Make the Cog headless platform plug-in selectable, allowing to configure
> > the build without any plug-in at all. When all plug-ins are disabled,
> > Cog does not require wpebackend-fdo at build time, and it is still
> > able to use its built-in "fallback" support to load other WPE backends
> > like wpebackend-rdk.
>
> This seems to makes sense to me, but I completely fail to understand
> the complicated implementation you are proposing below.
Oops O:-)
> There is in fact something already super wrong in package/cog: it has
> wpebackend-fdo in COG_DEPENDENCIES, but it doesn't select it. It works
> because it depends on wpewebkit, which itself selects wpebackend-fdo,
> but that's really wrong. This should be fixed in a first patch.
You're right!
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> > package/cog/Config.in | 28 ++++++++++++++++++++++++++--
> > package/cog/cog.mk | 13 ++++++++++---
> > 2 files changed, 36 insertions(+), 5 deletions(-)
> >
> > ---
> > v1 -> v2:
> > - Unchanged.
> >
> > diff --git a/package/cog/Config.in b/package/cog/Config.in
> > index d2a910f9b89..d706b045b15 100644
> > --- a/package/cog/Config.in
> > +++ b/package/cog/Config.in
> > @@ -19,6 +19,10 @@ config BR2_PACKAGE_COG
> >
> > if BR2_PACKAGE_COG
> >
> > +config BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
> > + bool
> > + default n
>
> I believe this is not needed.
>
> > config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
> > string "home uri"
> > default "https://wpewebkit.org"
> > @@ -30,6 +34,8 @@ config BR2_PACKAGE_COG_PROGRAMS_HOME_URI
> > config BR2_PACKAGE_COG_PLATFORM_FDO
> > bool "Wayland backend"
> > default y
> > + depends on BR2_PACKAGE_WPEBACKEND_FDO
> > + select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
>
> If the Wayland backend needs wpebackend-fdo, just select it:
>
> select BR2_PACKAGE_WPEBACKEND_FDO
>
> > select BR2_PACKAGE_LIBXKBCOMMON
> > select BR2_PACKAGE_WAYLAND_PROTOCOLS
> > help
> > @@ -43,6 +49,8 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
> > depends on BR2_PACKAGE_HAS_LIBGBM
> > depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
> > depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
> > + depends on BR2_PACKAGE_WPEBACKEND_FDO
> > + select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
>
> If the DRM backend needs wpebackend-fdo, just select it:
>
> select BR2_PACKAGE_WPEBACKEND_FDO
>
> > select BR2_PACKAGE_LIBDRM
> > select BR2_PACKAGE_LIBINPUT
> > help
> > @@ -50,16 +58,32 @@ config BR2_PACKAGE_COG_PLATFORM_DRM
> > with video drivers that support kernel mode-setting (KMS)
> > via the DRM user-space API.
> >
> > +config BR2_PACKAGE_COG_PLATFORM_HEADLESS
> > + bool "Headless backend"
> > + depends on BR2_PACKAGE_WPEBACKEND_FDO
> > + select BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO
>
> Same, just select wpebackend-fdo.
>
> > + help
> > + Enable the headless platform backend.
> > +
> > config BR2_PACKAGE_COG_USE_SYSTEM_DBUS
> > bool "expose system D-Bus control interface"
> > help
> > Expose remote control interface on system bus
> >
> > -comment "DRM platform needs EGL and GBM"
> > +comment "Headless platform needs wpebackend-fdo"
> > + depends on \
> > + !BR2_PACKAGE_WPEBACKEND_FDO
> > +
> > +comment "DRM platform needs EGL, GBM, wpebackend-fdo"
> > depends on \
> > !BR2_PACKAGE_HAS_LIBEGL || \
> > !BR2_PACKAGE_HAS_LIBGBM || \
> > !BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF || \
> > - !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
> > + !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || \
> > + !BR2_PACKAGE_WPEBACKEND_FDO
> > +
> > +comment "Wayland platform needs wpebackend-fdo"
> > + depends on \
> > + !BR2_PACKAGE_WPEBACKEND_FDO
>
> Drop all those changes.
>
> > endif
> > diff --git a/package/cog/cog.mk b/package/cog/cog.mk
> > index 7f680bb7005..166f095118b 100644
> > --- a/package/cog/cog.mk
> > +++ b/package/cog/cog.mk
> > @@ -8,7 +8,7 @@ COG_VERSION = 0.18.4
> > COG_SITE = https://wpewebkit.org/releases
> > COG_SOURCE = cog-$(COG_VERSION).tar.xz
> > COG_INSTALL_STAGING = YES
> > -COG_DEPENDENCIES = dbus wpewebkit wpebackend-fdo wayland
> > +COG_DEPENDENCIES = dbus wpewebkit wayland
> > COG_LICENSE = MIT
> > COG_LICENSE_FILES = COPYING
> > COG_CONF_OPTS = \
> > @@ -19,8 +19,6 @@ COG_CONF_OPTS = \
> > -Dcog_home_uri='$(call qstrip,$(BR2_PACKAGE_COG_PROGRAMS_HOME_URI))' \
> > -Dplatforms='$(subst $(space),$(comma),$(strip $(COG_PLATFORMS_LIST)))'
> >
> > -COG_PLATFORMS_LIST = headless
> > -
> > ifeq ($(BR2_PACKAGE_WESTON),y)
> > COG_CONF_OPTS += -Dwayland_weston_direct_display=true
> > COG_DEPENDENCIES += weston
> > @@ -28,6 +26,11 @@ else
> > COG_CONF_OPTS += -Dwayland_weston_direct_display=false
> > endif
> >
> > +ifeq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS),y)
> > +COG_PLATFORMS_LIST += headless
> > +COG_DEPENDENCIES += wpebackend-fdo
> > +endif
> > +
> > ifeq ($(BR2_PACKAGE_COG_PLATFORM_FDO),y)
> > COG_PLATFORMS_LIST += wayland
> > COG_DEPENDENCIES += libxkbcommon wayland-protocols
> > @@ -48,4 +51,8 @@ ifeq ($(BR2_PACKAGE_LIBMANETTE),y)
> > COG_DEPENDENCIES += libmanette
> > endif
> >
> > +ifeq ($(BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO),y)
> > +COG_DEPENDENCIES += wpebackend-fdo
> > +endif
>
> Drop this, and instead do:
>
> ifeq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS),y)
> COG_PLATFORMS_LIST += headless
> COG_DEPENDENCIES += wpebackend-fdo
> endif
>
> ifeq ($(BR2_PACKAGE_COG_PLATFORM_FDO),y)
> COG_PLATFORMS_LIST += wayland
> COG_DEPENDENCIES += libxkbcommon wayland-protocols wpebackend-fdo
> endif
>
> ifeq ($(BR2_PACKAGE_COG_PLATFORM_DRM),y)
> COG_PLATFORMS_LIST += drm
> COG_DEPENDENCIES += libdrm libinput libgbm libegl udev wpebackend-fdo
> endif
With the additional BR2_PACKAGE_COG_NEEDS_WPEBACKEND_FDO configuration
symbol I was trying to avoid adding wpebackend-fdo more than once to
COG_DEPENDENCIES. If it's fine to have it there (as it seems to be the
case) then yes, I am aboard for all the simplifications.
> Could you rework a v3 according to those suggestions?
Yes, will re-spin this into a v3 at some point. Thanks for all the
recommendations!
Cheers,
—Adrián
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2024-09-02 20:21 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 9:55 [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 1/3] package/wpebackend-rdk: new package Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 2/3] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
2024-02-08 9:55 ` [Buildroot] [PATCH 3/3] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
2024-02-08 10:29 ` [Buildroot] [PATCH 0/3] Add support for the WPE WebKit RDK backend Thomas Petazzoni via buildroot
2024-06-14 23:45 ` Adrian Perez de Castro
2024-06-15 6:54 ` Giulio Benetti
2024-06-18 6:53 ` Thomas Petazzoni via buildroot
2024-06-27 19:33 ` [Buildroot] [PATCH v2 0/4] " Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 1/4] package/wpebackend-rdk: new package Adrian Perez de Castro
2024-08-02 21:00 ` Thomas Petazzoni via buildroot
2024-09-02 20:12 ` Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 2/4] package/cog: depend on wpebackend-fdo only if needed Adrian Perez de Castro
2024-08-02 21:06 ` Thomas Petazzoni via buildroot
2024-09-02 20:21 ` Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 3/4] package/wpewebkit: do not depend on wpebackend-fdo Adrian Perez de Castro
2024-08-02 21:08 ` Thomas Petazzoni via buildroot
2024-09-02 20:15 ` Adrian Perez de Castro
2024-06-27 19:33 ` [Buildroot] [PATCH v2 4/4] package/wpewebkit: disable libdrm usage when not available Adrian Perez de Castro
2024-08-02 21:15 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox