All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v7 0/3] Qt WebEngine support
@ 2017-08-13 13:56 Gaël PORTAY
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks Gaël PORTAY
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Gaël PORTAY @ 2017-08-13 13:56 UTC (permalink / raw)
  To: buildroot

Hi all,

The purpose of this patch series is to continue the integration of Qt5 WebEngine
in buildroot; started long time ago by Akihiko Odaki [1] and Julien Corjon [2].

The first patch adds the rpi-userland OpenGL libraries symlinks. WebEngine
eglfs backend loads dynamically libEGL.so.1 and libGLESv2.so.2 [3].

	$ ls -l output/target/usr/lib/libEGL* output/target/usr/lib/libGLESv2*
	-rwxr-xr-x 1 buildroot buildroot 130032 Aug 10 21:17 output/target/usr/lib/libEGL.so
	lrwxrwxrwx 1 buildroot buildroot      9 Aug  9 12:30 output/target/usr/lib/libEGL.so.1 -> libEGL.so
	-rwxr-xr-x 1 buildroot buildroot  71088 Aug 10 21:16 output/target/usr/lib/libGLESv2.so
	lrwxrwxrwx 1 buildroot buildroot     12 Aug  9 12:30 output/target/usr/lib/libGLESv2.so.2 -> libGLESv2.so

A PR has been made [4].

The second patch provides the Qt WebEngine package. The additionnal patch fixes
a build issue when samples are compiled without the support of printing [5].
This patch is already merged [6] and concerns only 5.9.1.

It fixes the error below.

	.obj/browsermainwindow.o: In function `BrowserMainWindow::printRequested(QWebEnginePage*)': browsermainwindow.cpp:(.text+0x2cc0): undefined reference to `QWebEnginePage::print(QPrinter*, QWebEngineCallback<bool> const&)'

The last patch is a special defconfig that provides a Qt WebEngine setup on
raspberrypi3.

With this patchset, one can run the Qt quicknanobrowser sample on a rpi3 with
the following options:
  - BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc" and
    BR2_TOOLCHAIN_BUILDROOT_CXX=y (Qt 5 needs a toolchain w/ wchar, NPTL, C++,
    dynamic library)
  - BR2_PACKAGE_LIBERATION (Qt 5.8 requires a least one font)
  - BR2_PACKAGE_RPI_USERLAND (to enable OpenGL backend)
  - BR2_PACKAGE_QT5BASE_EXAMPLES (to install quicknanobrowser sample)
  - BR2_PACKAGE_QT5QUICKCONTROLS (needed by quicknanobrowser)
  - BR2_PACKAGE_QT5WEBENGINE (because it is what we want :))

To browse for HTTPS websites, please consider adding the following options as
well:
  - BR2_PACKAGE_CA_CERT (for certificates)
  - BR2_PACKAGE_NTPD (to sync date)

To run quicknanobrowser:
	# cd /usr/lib/qt/examples/webengine/quicknanobrowser/
	# ./quicknanobrowser

I have tested it with a rpi 3; and I will be glad if someone else has another
EGL platform to test it.

Enjoy ;)

Note: For now, quicknanobrowser will just display the qt website without any
input backend.

Note 2: Since bump to 5.9.1, the chromium's copy of opus fails with neon [7].
BR2_PACKAGE_QT5WEBENGINE_SYSTEM_FFMPEG option allows one to use buildroot copy
(which compiles fine).

	In file included from ../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c:31:0:
	/home/gportay/src/buildroot/output-rpi3-qt5.9/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include/arm_neon.h:8997:1: error: inlining failed in call to always_inline ?vld1q_s32?: target specific option mismatch
	 vld1q_s32 (const int32_t * __a)
	 ^~~~~~~~~
	../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c:40:15: note: called from here
	     int32x4_t coef0 = vld1q_s32(coef32);
		       ^~~~~
	../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c: At top level:
	cc1: warning: unrecognized command line option ?-Wno-#pragma-messages?

Note 3: Since bump to 5.9.1, chromium requires udev.

Note 4: Tested against:
        - GCC 6.x and binutils 2.27 on rpi 3.
        - GCC 7.x and binutils 2.28 on rpi 3.

Note 5: Version 5.6.2 causes a build issue while building chromium. I disabled
        the build against this version and am waiting for the release 5.6.3.

[1] https://patchwork.ozlabs.org/patch/640633/
[2] http://lists.busybox.net/pipermail/buildroot/2015-July/132010.html
[3] https://github.com/qt/qtwebengine/blob/5.9/src/core/surface_factory_qt.cpp#L76-L86
[4] https://github.com/raspberrypi/userland/pull/379
[5] https://bugreports.qt.io/browse/QTBUG-61510
[6] https://codereview.qt-project.org/#/c/198041/
[7] https://patchwork.ozlabs.org/patch/791332/

Note 6: The chromium.inc has been generated thanks
( echo 'CHROMIUM_LICENSE_FILES = \' &&
  cd output/build/qt5webengine-5.9.1/ && \
  find "src/3rdparty/chromium/" -type f -iname "*LICENSE*" -o -iname "*COPYING*" -o -iname "*GPL*" | \
  sed -e '/\.asm$/d' \
      -e '/\.h$/d' \
      -e '/\.c$/d' \
      -e '/\.cc$/d' \
      -e '/\.cpp$/d' \
      -e '/\.pyc\?$/d' \
      -e '/\.pl$/d' \
      -e '/\.sha1$/d' \
      -e '/\.patch$/d' \
      -e '/licensecheck/d' \
      -e 's,^,\t,' \
      -e 's,$, \\,' | \
  sort && \
  echo '' ) >package/qt5/qt5webengine/chromium.inc

Changes since RFC:
 - rebase to master (use SPDX licenses, remove license approved, update
   qt5_defconfig...)
 - remove the patch "prefer arm tune"
 - disable build with Qt 5.6 LTS (not working, waiting for 5.6.3 in August)
 - re-order patches

Changes since v1:
 - manually create symlinks to preserve SONAME
 - add my signed-off-by to the qt webengine patch
 - make qtwe package depends on supported architectures
 - fix Kconfig comment about Qt 5.6
 - sort alphabetically chromium licenses

Changes since v2:
 - fix build issue when I sorted alphabetically the chromium licenses
 - replace legacy option BR2_TARGET_ROOTFS_EXT2_BLOCK to
   new option BR2_TARGET_ROOTFS_EXT2_SIZE

Changes since v3:
 - add my signed-off-by and the PR link to the rpi-userland patch
 - move rpi patch index from 0001 to 0007

Changes since v4:
 - bump to Qt WebEngine to 5.9.1
 - added the mainlined patch that fixes the build issue with samples when print
   is not supported
 - udev is selected (required by chromium)
 - add config entry to use system ffmpeg and set it to yes by default
 - the patch concerning the path to CA certificates has been removed since it is
   no more relevant in 5.9.x
 - increase BR2_TARGET_ROOTFS_EXT2_SIZE to 360MB to support
   $ du -sk target/
   312480	target/

Changes since v5:
 - really add the mainlined patch that fixes the build issue with samples when
   print is not supported
 - add BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS to list all supported
   architectures
 - add BR2_PACKAGE_QT5WEBENGINE missing dependencies (tc, mmu, wchar...)
 - stop using && for depends on relationships
 - update chromium licence list in chromium.inc
 - remove option BR2_PACKAGE_QT5WEBENGINE_SYSTEM_FFMPEG;
   and compile ffmpeg, opus, libvpx and webp packages
 - reword help and add url to documentation of package qt5webengine
 - remove hash of 5.6.2 version
 - add QT5WEBENGINE_ namespace to QMAKEFLAGS
 - add missing TARGET_MAKE_ENV to BUILD_CMD
 - create python symlink form $(HOST_DIR)/bin (was $(HOST_DIR)/usr/bin)
 - add myself to DEVELOPERS

Changes since v6:
 - rpi-userland commit message:
   fix output of ls -l snippet
   update url to link to qtwe-5.9.1
   add upstream-status
 - qtwe:
   add missing host-bison, host-flex and host-pkgconf dependencies
   select BR2_HOSTARCH_NEEDS_IA32_COMPILER for 32-bit targets

Ga?l PORTAY (3):
  rpi-userland: fix opengl library symlinks
  qt5webengine: new package
  configs: new raspberrypi3 qt5 config

 DEVELOPERS                                         |   1 +
 configs/raspberrypi3_qt5_defconfig                 |  48 ++++
 package/qt5/Config.in                              |   1 +
 .../0001-Always-compile-QWebEnginePage-print.patch | 244 ++++++++++++++++
 package/qt5/qt5webengine/Config.in                 |  75 +++++
 package/qt5/qt5webengine/chromium.inc              | 310 +++++++++++++++++++++
 package/qt5/qt5webengine/qt5webengine.hash         |   2 +
 package/qt5/qt5webengine/qt5webengine.mk           |  80 ++++++
 .../0007-Add-OpenGL-library-versioning.patch       |  41 +++
 9 files changed, 802 insertions(+)
 create mode 100644 configs/raspberrypi3_qt5_defconfig
 create mode 100644 package/qt5/qt5webengine/5.9.1/0001-Always-compile-QWebEnginePage-print.patch
 create mode 100644 package/qt5/qt5webengine/Config.in
 create mode 100644 package/qt5/qt5webengine/chromium.inc
 create mode 100644 package/qt5/qt5webengine/qt5webengine.hash
 create mode 100644 package/qt5/qt5webengine/qt5webengine.mk
 create mode 100644 package/rpi-userland/0007-Add-OpenGL-library-versioning.patch

-- 
2.13.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks
  2017-08-13 13:56 [Buildroot] [PATCH v7 0/3] Qt WebEngine support Gaël PORTAY
@ 2017-08-13 13:56 ` Gaël PORTAY
  2017-08-14 21:47   ` Yann E. MORIN
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 2/3] qt5webengine: new package Gaël PORTAY
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Gaël PORTAY @ 2017-08-13 13:56 UTC (permalink / raw)
  To: buildroot

The Qt WebEngine module loads libEGL.so.1 and libGLESv2.so.2 libraries.
Paths are hard-coded [1].

This patch sets up cmake to create those library links.

	$ ls -l output/target/usr/lib/libEGL* output/target/usr/lib/libGLESv2*
	-rwxr-xr-x 1 buildroot buildroot 130032 Aug 10 21:17 output/target/usr/lib/libEGL.so
	lrwxrwxrwx 1 buildroot buildroot      9 Aug  9 12:30 output/target/usr/lib/libEGL.so.1 -> libEGL.so
	-rwxr-xr-x 1 buildroot buildroot  71088 Aug 10 21:16 output/target/usr/lib/libGLESv2.so
	lrwxrwxrwx 1 buildroot buildroot     12 Aug  9 12:30 output/target/usr/lib/libGLESv2.so.2 -> libGLESv2.so

A pull request is pending [2].

[1] https://github.com/qt/qtwebengine/blob/5.9.1/src/core/surface_factory_qt.cpp#L76-L86
[2] https://github.com/raspberrypi/userland/pull/379

Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
---
 .../0007-Add-OpenGL-library-versioning.patch       | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 package/rpi-userland/0007-Add-OpenGL-library-versioning.patch

diff --git a/package/rpi-userland/0007-Add-OpenGL-library-versioning.patch b/package/rpi-userland/0007-Add-OpenGL-library-versioning.patch
new file mode 100644
index 000000000..9a22a66d2
--- /dev/null
+++ b/package/rpi-userland/0007-Add-OpenGL-library-versioning.patch
@@ -0,0 +1,41 @@
+From a6abc80168512993f390cfdb40531c50829af6da Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= <gael.portay@savoirfairelinux.com>
+Date: Fri, 3 Mar 2017 17:28:41 -0500
+Subject: [PATCH] Add OpenGL library versioning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Some applications like QtWebEngine dynamically load libraries using
+dlopen. The library name is hardcoded, and it includes the library
+version [1].
+
+This patch creates symlinks for EGL and GLES libraries.
+
+	libEGL.so.1 -> libEGL.so
+	libGLESv2.so.2 -> libGLESv2.so
+
+[1] https://github.com/qt/qtwebengine/blob/v5.9.1/src/core/surface_factory_qt.cpp#L76-L86
+
+Upstream-Status: https://github.com/raspberrypi/userland/pull/379
+Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
+---
+ host_applications/android/apps/vidtex/CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/host_applications/android/apps/vidtex/CMakeLists.txt b/host_applications/android/apps/vidtex/CMakeLists.txt
+index 1f705ef..d68ae5f 100644
+--- a/host_applications/android/apps/vidtex/CMakeLists.txt
++++ b/host_applications/android/apps/vidtex/CMakeLists.txt
+@@ -10,3 +10,8 @@ set (VIDTEX_SOURCES
+    vidtex.c)
+ add_executable(vidtex ${VIDTEX_SOURCES})
+ target_link_libraries(vidtex GLESv2 EGL m bcm_host mmal_core mmal_components mmal_util mmal_vc_client vcos)
++
++set(DESTDIR \$ENV{DESTDIR})
++include(GNUInstallDirs)
++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink libEGL.so ${DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libEGL.so.1)")
++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink libGLESv2.so ${DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libGLESv2.so.2)")
+-- 
+2.13.2
+
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 2/3] qt5webengine: new package
  2017-08-13 13:56 [Buildroot] [PATCH v7 0/3] Qt WebEngine support Gaël PORTAY
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks Gaël PORTAY
@ 2017-08-13 13:56 ` Gaël PORTAY
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 3/3] configs: new raspberrypi3 qt5 config Gaël PORTAY
  2017-08-13 14:01 ` [Buildroot] [PATCH v7 0/3] Qt WebEngine support Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Gaël PORTAY @ 2017-08-13 13:56 UTC (permalink / raw)
  To: buildroot

This patch is based on works [1] and [2].

The chromium.inc has been generated using the following command.

	( echo 'CHROMIUM_LICENSE_FILES = \' &&
	  cd output/build/qt5webengine-5.9.1/ && \
	  find "src/3rdparty/chromium/" -type f -iname "*LICENSE*" -o -iname "*COPYING*" -o -iname "*GPL*" | \
	  sed -e '/\.asm$/d' \
	      -e '/\.h$/d' \
	      -e '/\.c$/d' \
	      -e '/\.cc$/d' \
	      -e '/\.cpp$/d' \
	      -e '/\.pyc\?$/d' \
	      -e '/\.pl$/d' \
	      -e '/\.sha1$/d' \
	      -e '/\.patch$/d' \
	      -e '/licensecheck/d' \
	      -e 's,^,\t,' \
	      -e 's,$, \\,' | \
	  sort && \
	  echo '' ) >package/qt5/qt5webengine/chromium.inc

[1]: http://lists.busybox.net/pipermail/buildroot/2015-July/132010.html
[2]: https://patchwork.ozlabs.org/patch/640633/

Cc: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Cc: Julien Corjon <corjon.j@ecagroup.com>
Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
---
 DEVELOPERS                                         |   1 +
 package/qt5/Config.in                              |   1 +
 .../0001-Always-compile-QWebEnginePage-print.patch | 244 ++++++++++++++++
 package/qt5/qt5webengine/Config.in                 |  75 +++++
 package/qt5/qt5webengine/chromium.inc              | 310 +++++++++++++++++++++
 package/qt5/qt5webengine/qt5webengine.hash         |   2 +
 package/qt5/qt5webengine/qt5webengine.mk           |  80 ++++++
 7 files changed, 713 insertions(+)
 create mode 100644 package/qt5/qt5webengine/5.9.1/0001-Always-compile-QWebEnginePage-print.patch
 create mode 100644 package/qt5/qt5webengine/Config.in
 create mode 100644 package/qt5/qt5webengine/chromium.inc
 create mode 100644 package/qt5/qt5webengine/qt5webengine.hash
 create mode 100644 package/qt5/qt5webengine/qt5webengine.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index f3944e274..a6f84e77e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -630,6 +630,7 @@ F:	package/zxing-cpp/
 
 N:	Ga?l Portay <gael.portay@savoirfairelinux.com>
 F:	package/qt5/qt5virtualkeyboard/
+F:	package/qt5/qt5webengine/
 
 N:	Gary Bisson <gary.bisson@boundarydevices.com>
 F:	board/boundarydevices/
diff --git a/package/qt5/Config.in b/package/qt5/Config.in
index abaa58499..f2a1f378c 100644
--- a/package/qt5/Config.in
+++ b/package/qt5/Config.in
@@ -79,6 +79,7 @@ source "package/qt5/qt5tools/Config.in"
 source "package/qt5/qt5virtualkeyboard/Config.in"
 source "package/qt5/qt5webchannel/Config.in"
 source "package/qt5/qt5webkit/Config.in"
+source "package/qt5/qt5webengine/Config.in"
 source "package/qt5/qt5websockets/Config.in"
 source "package/qt5/qt5x11extras/Config.in"
 source "package/qt5/qt5xmlpatterns/Config.in"
diff --git a/package/qt5/qt5webengine/5.9.1/0001-Always-compile-QWebEnginePage-print.patch b/package/qt5/qt5webengine/5.9.1/0001-Always-compile-QWebEnginePage-print.patch
new file mode 100644
index 000000000..b807011d7
--- /dev/null
+++ b/package/qt5/qt5webengine/5.9.1/0001-Always-compile-QWebEnginePage-print.patch
@@ -0,0 +1,244 @@
+From 085c2c529473bbe9dd7c8c5698a45053520cc423 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?J=C3=BCri=20Valdmann?= <juri.valdmann@qt.io>
+Date: Tue, 20 Jun 2017 15:36:43 +0200
+Subject: [PATCH 1/1] Always compile QWebEnginePage::print
+
+- Remove two out of five layers of ifdefs around and inside this method.
+- Now always compiled but will yield an error if printing is disabled.
+- Remove printing-related ifdefs from demobrowser.
+
+Task-number: QTBUG-61510
+Change-Id: I79781189d3d3fb62db0a2216b2b989e3fa1d1f86
+Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Reviewed-by: Rolf Eike Beer <eb@emlix.com>
+---
+ examples/webenginewidgets/demobrowser/browsermainwindow.cpp | 12 ------------
+ examples/webenginewidgets/demobrowser/browsermainwindow.h   |  6 ------
+ examples/webenginewidgets/demobrowser/printtopdfdialog.cpp  |  7 -------
+ src/webenginewidgets/api/qwebenginepage.cpp                 | 10 ++--------
+ src/webenginewidgets/api/qwebenginepage.h                   |  8 --------
+ 5 files changed, 2 insertions(+), 41 deletions(-)
+
+diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
+index 327d7a9d..14d49f7f 100644
+--- a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
++++ b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
+@@ -109,9 +109,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
+     , m_historyForward(0)
+     , m_stop(0)
+     , m_reload(0)
+-#ifndef QT_NO_PRINTER
+     , m_currentPrinter(nullptr)
+-#endif
+ {
+     setToolButtonStyle(Qt::ToolButtonFollowStyle);
+     setAttribute(Qt::WA_DeleteOnClose, true);
+@@ -312,9 +310,7 @@ void BrowserMainWindow::setupMenu()
+ #if defined(QWEBENGINEPAGE_PRINT)
+     fileMenu->addAction(tr("P&rint Preview..."), this, SLOT(slotFilePrintPreview()));
+ #endif
+-#ifndef QT_NO_PRINTER
+     fileMenu->addAction(tr("&Print..."), this, SLOT(slotFilePrint()), QKeySequence::Print);
+-#endif
+     fileMenu->addAction(tr("&Print to PDF..."), this, SLOT(slotFilePrintToPDF()));
+     fileMenu->addSeparator();
+ 
+@@ -702,23 +698,19 @@ void BrowserMainWindow::slotFileOpen()
+ 
+ void BrowserMainWindow::slotFilePrintPreview()
+ {
+-#ifndef QT_NO_PRINTPREVIEWDIALOG
+     if (!currentTab())
+         return;
+     QPrintPreviewDialog *dialog = new QPrintPreviewDialog(this);
+     connect(dialog, SIGNAL(paintRequested(QPrinter*)),
+             currentTab(), SLOT(print(QPrinter*)));
+     dialog->exec();
+-#endif
+ }
+ 
+ void BrowserMainWindow::slotFilePrint()
+ {
+-#ifndef QT_NO_PRINTER
+     if (!currentTab())
+         return;
+     printRequested(currentTab()->page());
+-#endif
+ }
+ 
+ void BrowserMainWindow::slotHandlePdfPrinted(const QByteArray& result)
+@@ -751,7 +743,6 @@ void BrowserMainWindow::slotFilePrintToPDF()
+     currentTab()->page()->printToPdf(invoke(this, &BrowserMainWindow::slotHandlePdfPrinted), dialog->pageLayout());
+ }
+ 
+-#ifndef QT_NO_PRINTER
+ void BrowserMainWindow::slotHandlePagePrinted(bool result)
+ {
+     Q_UNUSED(result);
+@@ -763,7 +754,6 @@ void BrowserMainWindow::slotHandlePagePrinted(bool result)
+ 
+ void BrowserMainWindow::printRequested(QWebEnginePage *page)
+ {
+-#ifndef QT_NO_PRINTDIALOG
+     if (m_currentPrinter)
+         return;
+     m_currentPrinter = new QPrinter();
+@@ -774,9 +764,7 @@ void BrowserMainWindow::printRequested(QWebEnginePage *page)
+         return;
+     }
+     page->print(m_currentPrinter, invoke(this, &BrowserMainWindow::slotHandlePagePrinted));
+-#endif
+ }
+-#endif
+ 
+ void BrowserMainWindow::slotPrivateBrowsing()
+ {
+diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.h b/examples/webenginewidgets/demobrowser/browsermainwindow.h
+index 91e1c1d2..5bbbb292 100644
+--- a/examples/webenginewidgets/demobrowser/browsermainwindow.h
++++ b/examples/webenginewidgets/demobrowser/browsermainwindow.h
+@@ -56,9 +56,7 @@
+ #include <QtCore/QUrl>
+ 
+ QT_BEGIN_NAMESPACE
+-#ifndef QT_NO_PRINTER
+ class QPrinter;
+-#endif
+ class QWebEnginePage;
+ QT_END_NAMESPACE
+ 
+@@ -142,10 +140,8 @@ private slots:
+     void slotSwapFocus();
+     void slotHandlePdfPrinted(const QByteArray&);
+ 
+-#ifndef QT_NO_PRINTER
+     void slotHandlePagePrinted(bool result);
+     void printRequested(QWebEnginePage *page);
+-#endif
+     void geometryChangeRequested(const QRect &geometry);
+     void updateToolbarActionText(bool visible);
+     void updateBookmarksToolbarActionText(bool visible);
+@@ -180,9 +176,7 @@ private:
+     QAction *m_restoreLastSession;
+     QAction *m_addBookmark;
+ 
+-#ifndef QT_NO_PRINTER
+     QPrinter *m_currentPrinter;
+-#endif
+ 
+     QIcon m_reloadIcon;
+     QIcon m_stopIcon;
+diff --git a/examples/webenginewidgets/demobrowser/printtopdfdialog.cpp b/examples/webenginewidgets/demobrowser/printtopdfdialog.cpp
+index 0f3b1765..50a8bb91 100644
+--- a/examples/webenginewidgets/demobrowser/printtopdfdialog.cpp
++++ b/examples/webenginewidgets/demobrowser/printtopdfdialog.cpp
+@@ -52,10 +52,8 @@
+ #include "ui_printtopdfdialog.h"
+ 
+ #include <QtCore/QDir>
+-#ifndef QT_NO_PRINTER
+ #include <QtPrintSupport/QPageSetupDialog>
+ #include <QtPrintSupport/QPrinter>
+-#endif // QT_NO_PRINTER
+ #include <QtWidgets/QFileDialog>
+ 
+ PrintToPdfDialog::PrintToPdfDialog(const QString &filePath, QWidget *parent) :
+@@ -66,11 +64,8 @@ PrintToPdfDialog::PrintToPdfDialog(const QString &filePath, QWidget *parent) :
+     ui->setupUi(this);
+     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
+     connect(ui->chooseFilePathButton, &QToolButton::clicked, this, &PrintToPdfDialog::onChooseFilePathButtonClicked);
+-#ifndef QT_NO_PRINTER
+     connect(ui->choosePageLayoutButton, &QToolButton::clicked, this, &PrintToPdfDialog::onChoosePageLayoutButtonClicked);
+-#else
+     ui->choosePageLayoutButton->hide();
+-#endif // QT_NO_PRINTER
+     updatePageLayoutLabel();
+     setFilePath(filePath);
+ }
+@@ -82,7 +77,6 @@ PrintToPdfDialog::~PrintToPdfDialog()
+ 
+ void PrintToPdfDialog::onChoosePageLayoutButtonClicked()
+ {
+-#ifndef QT_NO_PRINTER
+     QPrinter printer;
+     printer.setPageLayout(currentPageLayout);
+ 
+@@ -92,7 +86,6 @@ void PrintToPdfDialog::onChoosePageLayoutButtonClicked()
+     currentPageLayout.setPageSize(printer.pageLayout().pageSize());
+     currentPageLayout.setOrientation(printer.pageLayout().orientation());
+     updatePageLayoutLabel();
+-#endif // QT_NO_PRINTER
+ }
+ 
+ void PrintToPdfDialog::onChooseFilePathButtonClicked()
+diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
+index 2cdb0116..6042b9fd 100644
+--- a/src/webenginewidgets/api/qwebenginepage.cpp
++++ b/src/webenginewidgets/api/qwebenginepage.cpp
+@@ -80,11 +80,9 @@
+ #include <QMenu>
+ #include <QMessageBox>
+ #include <QMimeData>
+-#if defined(QT_PRINTSUPPORT_LIB)
+-#ifndef QT_NO_PRINTER
++#ifdef ENABLE_PRINTING
+ #include <QPrinter>
+-#endif //QT_NO_PRINTER
+-#endif //QT_PRINTSUPPORT_LIB
++#endif
+ #include <QStandardPaths>
+ #include <QStyle>
+ #include <QTimer>
+@@ -2051,8 +2049,6 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res
+ #endif // if defined(ENABLE_PDF)
+ }
+ 
+-#if defined(QT_PRINTSUPPORT_LIB)
+-#ifndef QT_NO_PRINTER
+ /*!
+     \fn void QWebEnginePage::print(QPrinter *printer, FunctorOrLambda resultCallback)
+     Renders the current content of the page into a temporary PDF document, then prints it using \a printer.
+@@ -2089,8 +2085,6 @@ void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &re
+     d->m_callbacks.invokeDirectly(resultCallback, false);
+ #endif // if defined(ENABLE_PDF)
+ }
+-#endif // if defined(QT_NO_PRINTER)
+-#endif // if defined(QT_PRINTSUPPORT_LIB)
+ 
+ /*!
+     \since 5.7
+diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
+index c7d5a19e..5619639c 100644
+--- a/src/webenginewidgets/api/qwebenginepage.h
++++ b/src/webenginewidgets/api/qwebenginepage.h
+@@ -55,11 +55,7 @@
+ 
+ QT_BEGIN_NAMESPACE
+ class QMenu;
+-#if defined(QT_PRINTSUPPORT_LIB)
+-#ifndef QT_NO_PRINTER
+ class QPrinter;
+-#endif // QT_NO_PRINTER
+-#endif // QT_PRINTSUPPORT_LIB
+ 
+ class QWebChannel;
+ class QWebEngineContextMenuData;
+@@ -294,15 +290,11 @@ public:
+     void printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF()));
+ #endif
+ 
+-#if defined(QT_PRINTSUPPORT_LIB)
+-#ifndef QT_NO_PRINTER
+ #ifdef Q_QDOC
+     void print(QPrinter *printer, FunctorOrLambda resultCallback);
+ #else
+     void print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback);
+ #endif // QDOC
+-#endif // QT_NO_PRINTER
+-#endif // QT_PRINTSUPPORT_LIB
+ 
+     const QWebEngineContextMenuData &contextMenuData() const;
+ 
+-- 
+2.13.2
+
diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in
new file mode 100644
index 000000000..3d9a16c24
--- /dev/null
+++ b/package/qt5/qt5webengine/Config.in
@@ -0,0 +1,75 @@
+config BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
+	bool
+	default y if BR2_aarch64 || BR2_arm || \
+		BR2_i386 || BR2_x86_64 || \
+		BR2_mips || BR2_mips64
+
+comment "qt5webengine needs an Open(E)GL-capable backend"
+	depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
+	depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || !BR2_PACKAGE_HAS_LIBEGL
+
+comment "qt5webengine is not yet buildable with Qt 5.6"
+	depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_QT5_VERSION_5_6
+
+config BR2_PACKAGE_QT5WEBENGINE
+	bool "qt5webengine"
+	depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
+	depends on !BR2_BINFMT_FLAT # qt5base-icu
+	depends on BR2_HOST_GCC_AT_LEAST_4_8 # qt5base-icu
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # qt5base-icu
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libvpx, qt5base-dbus
+	depends on BR2_USE_MMU # libglib2, qt5base-dbus
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_PACKAGE_HAS_LIBEGL # qt5base-eglfs
+	depends on BR2_PACKAGE_QT5_GL_AVAILABLE # qt5declarative, qt5base-eglfs
+	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE # qt5declarative
+	depends on !BR2_PACKAGE_QT5_VERSION_5_6
+	# For 32-bits targets, v8 (a chromium 3rd-party) adds -m32 flag to build
+	# internal host-tools.
+	# https://github.com/v8/v8/blob/5.6.326.55/gypfiles/toolchain.gypi#L1036-L1037
+	select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64 # v8/chromium
+	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_LIBVPX
+	select BR2_PACKAGE_OPUS
+	select BR2_PACKAGE_WEBP
+	select BR2_PACKAGE_WEBP_DEMUX
+	select BR2_PACKAGE_QT5BASE_DBUS
+	select BR2_PACKAGE_QT5BASE_EGLFS
+	select BR2_PACKAGE_QT5BASE_FONTCONFIG
+	select BR2_PACKAGE_QT5BASE_ICU
+	select BR2_PACKAGE_QT5BASE_GUI
+	select BR2_PACKAGE_QT5BASE_WIDGETS
+	select BR2_PACKAGE_QT5DECLARATIVE
+	select BR2_PACKAGE_QT5DECLARATIVE_QUICK
+	select BR2_PACKAGE_QT5WEBCHANNEL
+	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXCURSOR if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXI if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXSCRNSAVER if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXTST if BR2_PACKAGE_QT5BASE_XCB
+	help
+	  The Qt WebEngine module provides a web browser engine that
+	  makes it easy to embed content from the World Wide Web into
+	  your Qt application.
+
+	  Qt WebEngine provides C++ classes and QML types for rendering
+	  HTML, XHTML, and SVG documents, styled using Cascading Style
+	  Sheets (CSS) and scripted with JavaScript. HTML documents can
+	  be made fully editable by the user through the use of the
+	  contenteditable attribute on HTML elements.
+
+	  http://doc.qt.io/qt-5/qtwebengine-index.html
+
+if BR2_PACKAGE_QT5WEBENGINE
+
+config BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS
+	bool "proprietary codecs"
+	help
+	  Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format;
+	  which includes required proprietary audio and video codecs,
+	  such as H.264 and MPEG layer-3 (MP3).
+
+endif
diff --git a/package/qt5/qt5webengine/chromium.inc b/package/qt5/qt5webengine/chromium.inc
new file mode 100644
index 000000000..da709fd5a
--- /dev/null
+++ b/package/qt5/qt5webengine/chromium.inc
@@ -0,0 +1,310 @@
+CHROMIUM_LICENSE_FILES = \
+	src/3rdparty/chromium/base/third_party/dmg_fp/LICENSE \
+	src/3rdparty/chromium/base/third_party/dynamic_annotations/LICENSE \
+	src/3rdparty/chromium/base/third_party/icu/LICENSE \
+	src/3rdparty/chromium/base/third_party/libevent/LICENSE \
+	src/3rdparty/chromium/base/third_party/nspr/LICENSE \
+	src/3rdparty/chromium/base/third_party/superfasthash/LICENSE \
+	src/3rdparty/chromium/base/third_party/symbolize/LICENSE \
+	src/3rdparty/chromium/base/third_party/valgrind/LICENSE \
+	src/3rdparty/chromium/base/third_party/xdg_mime/LICENSE \
+	src/3rdparty/chromium/base/third_party/xdg_user_dirs/LICENSE \
+	src/3rdparty/chromium/buildtools/LICENSE \
+	src/3rdparty/chromium/buildtools/third_party/libc++abi/trunk/LICENSE.TXT \
+	src/3rdparty/chromium/buildtools/third_party/libc++/trunk/LICENSE.TXT \
+	src/3rdparty/chromium/chrome/third_party/chromevox/LICENSE \
+	src/3rdparty/chromium/chrome/third_party/chromevox/third_party/closure-library/LICENSE \
+	src/3rdparty/chromium/LICENSE \
+	src/3rdparty/chromium/LICENSE.chromium_os \
+	src/3rdparty/chromium/mojo/public/LICENSE \
+	src/3rdparty/chromium/net/third_party/mozilla_security_manager/LICENSE \
+	src/3rdparty/chromium/net/third_party/nss/LICENSE \
+	src/3rdparty/chromium/ppapi/LICENSE \
+	src/3rdparty/chromium/sdch/open-vcdiff/COPYING \
+	src/3rdparty/chromium/testing/gmock/LICENSE \
+	src/3rdparty/chromium/testing/gmock/scripts/generator/LICENSE \
+	src/3rdparty/chromium/testing/gtest/LICENSE \
+	src/3rdparty/chromium/third_party/accessibility_test_framework/LICENSE \
+	src/3rdparty/chromium/third_party/afl/src/docs/COPYING \
+	src/3rdparty/chromium/third_party/angle/LICENSE \
+	src/3rdparty/chromium/third_party/angle/src/third_party/compiler/LICENSE \
+	src/3rdparty/chromium/third_party/angle/src/third_party/libXNVCtrl/LICENSE \
+	src/3rdparty/chromium/third_party/angle/src/third_party/murmurhash/LICENSE \
+	src/3rdparty/chromium/third_party/apache-portable-runtime/LICENSE \
+	src/3rdparty/chromium/third_party/apache_velocity/LICENSE \
+	src/3rdparty/chromium/third_party/apple_apsl/LICENSE \
+	src/3rdparty/chromium/third_party/bintrees/LICENSE.txt \
+	src/3rdparty/chromium/third_party/blanketjs/LICENSE \
+	src/3rdparty/chromium/third_party/blimp_fonts/LICENSE \
+	src/3rdparty/chromium/third_party/blimp_fonts/LICENSE.Apache \
+	src/3rdparty/chromium/third_party/blimp_fonts/LICENSE.OFL \
+	src/3rdparty/chromium/third_party/boringssl/src/LICENSE \
+	src/3rdparty/chromium/third_party/boringssl/src/third_party/android-cmake/LICENSE \
+	src/3rdparty/chromium/third_party/bouncycastle/LICENSE \
+	src/3rdparty/chromium/third_party/brotli/LICENSE \
+	src/3rdparty/chromium/third_party/bspatch/LICENSE \
+	src/3rdparty/chromium/third_party/byte_buddy/LICENSE \
+	src/3rdparty/chromium/third_party/ced/LICENSE \
+	src/3rdparty/chromium/third_party/ced/src/LICENSE \
+	src/3rdparty/chromium/third_party/chaijs/LICENSE \
+	src/3rdparty/chromium/third_party/checkstyle/LICENSE \
+	src/3rdparty/chromium/third_party/checkstyle/LICENSE.apache20 \
+	src/3rdparty/chromium/third_party/cld_3/LICENSE \
+	src/3rdparty/chromium/third_party/cld_3/src/LICENSE \
+	src/3rdparty/chromium/third_party/cld/LICENSE \
+	src/3rdparty/chromium/third_party/closure_compiler/compiler/COPYING \
+	src/3rdparty/chromium/third_party/closure_compiler/LICENSE \
+	src/3rdparty/chromium/third_party/closure_linter/LICENSE \
+	src/3rdparty/chromium/third_party/crashpad/crashpad/LICENSE \
+	src/3rdparty/chromium/third_party/crashpad/crashpad/third_party/apple_cctools/cctools/APPLE_LICENSE \
+	src/3rdparty/chromium/third_party/crashpad/crashpad/third_party/apple_cf/APPLE_LICENSE \
+	src/3rdparty/chromium/third_party/crashpad/crashpad/third_party/getopt/LICENSE \
+	src/3rdparty/chromium/third_party/cros_system_api/LICENSE \
+	src/3rdparty/chromium/third_party/cros_system_api/MODULE_LICENSE_BSD \
+	src/3rdparty/chromium/third_party/custom_tabs_client/LICENSE \
+	src/3rdparty/chromium/third_party/d3/src/LICENSE \
+	src/3rdparty/chromium/third_party/decklink/LICENSE \
+	src/3rdparty/chromium/third_party/devscripts/COPYING \
+	src/3rdparty/chromium/third_party/dom_distiller_js/LICENSE \
+	src/3rdparty/chromium/third_party/dpkg-dev/LICENSE \
+	src/3rdparty/chromium/third_party/drmemory/LICENSE \
+	src/3rdparty/chromium/third_party/errorprone/LICENSE \
+	src/3rdparty/chromium/third_party/espresso/LICENSE \
+	src/3rdparty/chromium/third_party/expat/files/COPYING \
+	src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/license_texts/full_lgpl.txt \
+	src/3rdparty/chromium/third_party/ffmpeg/COPYING.GPLv2 \
+	src/3rdparty/chromium/third_party/ffmpeg/COPYING.GPLv3 \
+	src/3rdparty/chromium/third_party/ffmpeg/COPYING.LGPLv2.1 \
+	src/3rdparty/chromium/third_party/ffmpeg/COPYING.LGPLv3 \
+	src/3rdparty/chromium/third_party/ffmpeg/LICENSE.md \
+	src/3rdparty/chromium/third_party/fips181/COPYING \
+	src/3rdparty/chromium/third_party/flac/COPYING.FDL \
+	src/3rdparty/chromium/third_party/flac/COPYING.GPL \
+	src/3rdparty/chromium/third_party/flac/COPYING.LGPL \
+	src/3rdparty/chromium/third_party/flac/COPYING.Xiph \
+	src/3rdparty/chromium/third_party/flatbuffers/LICENSE \
+	src/3rdparty/chromium/third_party/flatbuffers/src/LICENSE.txt \
+	src/3rdparty/chromium/third_party/flot/LICENSE.txt \
+	src/3rdparty/chromium/third_party/fontconfig/LICENSE \
+	src/3rdparty/chromium/third_party/fontconfig/src/COPYING \
+	src/3rdparty/chromium/third_party/freetype2/src/docs/GPLv2.TXT \
+	src/3rdparty/chromium/third_party/freetype2/src/docs/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/gardiner_mod/LICENSE \
+	src/3rdparty/chromium/third_party/gif_player/LICENSE \
+	src/3rdparty/chromium/third_party/glslang/LICENSE \
+	src/3rdparty/chromium/third_party/grpc/LICENSE \
+	src/3rdparty/chromium/third_party/grpc/src/node/health_check/LICENSE \
+	src/3rdparty/chromium/third_party/grpc/src/php/ext/grpc/LICENSE \
+	src/3rdparty/chromium/third_party/grpc/third_party/nanopb/LICENSE.txt \
+	src/3rdparty/chromium/third_party/grpc/third_party/rake-compiler-dock/LICENSE.txt \
+	src/3rdparty/chromium/third_party/guava/LICENSE \
+	src/3rdparty/chromium/third_party/gvr-android-sdk/LICENSE \
+	src/3rdparty/chromium/third_party/haha/LICENSE \
+	src/3rdparty/chromium/third_party/hamcrest/LICENSE \
+	src/3rdparty/chromium/third_party/harfbuzz-ng/COPYING \
+	src/3rdparty/chromium/third_party/hunspell/COPYING \
+	src/3rdparty/chromium/third_party/hunspell/COPYING.LGPL \
+	src/3rdparty/chromium/third_party/hunspell/COPYING.MPL \
+	src/3rdparty/chromium/third_party/hunspell/src/hunspell/license.hunspell \
+	src/3rdparty/chromium/third_party/hunspell/src/hunspell/license.myspell \
+	src/3rdparty/chromium/third_party/hwcplus/LICENSE \
+	src/3rdparty/chromium/third_party/iaccessible2/LICENSE \
+	src/3rdparty/chromium/third_party/iccjpeg/LICENSE \
+	src/3rdparty/chromium/third_party/icu4j/LICENSE \
+	src/3rdparty/chromium/third_party/icu/LICENSE \
+	src/3rdparty/chromium/third_party/icu/license.html \
+	src/3rdparty/chromium/third_party/icu/scripts/LICENSE \
+	src/3rdparty/chromium/third_party/ijar/LICENSE \
+	src/3rdparty/chromium/third_party/inspector_protocol/LICENSE \
+	src/3rdparty/chromium/third_party/intellij/LICENSE \
+	src/3rdparty/chromium/third_party/isimpledom/LICENSE \
+	src/3rdparty/chromium/third_party/javax_inject/LICENSE \
+	src/3rdparty/chromium/third_party/jinja2/LICENSE \
+	src/3rdparty/chromium/third_party/jmake/LICENSE \
+	src/3rdparty/chromium/third_party/jsoncpp/LICENSE \
+	src/3rdparty/chromium/third_party/jstemplate/COPYING \
+	src/3rdparty/chromium/third_party/khronos/LICENSE \
+	src/3rdparty/chromium/third_party/leakcanary/LICENSE \
+	src/3rdparty/chromium/third_party/leveldatabase/src/LICENSE \
+	src/3rdparty/chromium/third_party/libaddressinput/LICENSE \
+	src/3rdparty/chromium/third_party/libaddressinput/src/cpp/LICENSE.chromium \
+	src/3rdparty/chromium/third_party/libaddressinput/src/LICENSE \
+	src/3rdparty/chromium/third_party/libFuzzer/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/libjpeg/LICENSE \
+	src/3rdparty/chromium/third_party/libjpeg_turbo/LICENSE.md \
+	src/3rdparty/chromium/third_party/libpng/LICENSE \
+	src/3rdparty/chromium/third_party/libsecret/LICENSE \
+	src/3rdparty/chromium/third_party/libsrtp/LICENSE \
+	src/3rdparty/chromium/third_party/libsync/LICENSE \
+	src/3rdparty/chromium/third_party/libudev/LICENSE \
+	src/3rdparty/chromium/third_party/libusb/src/COPYING \
+	src/3rdparty/chromium/third_party/libva/COPYING \
+	src/3rdparty/chromium/third_party/libvpx/source/libvpx/LICENSE \
+	src/3rdparty/chromium/third_party/libvpx/source/libvpx/third_party/googletest/src/LICENSE \
+	src/3rdparty/chromium/third_party/libvpx/source/libvpx/third_party/libwebm/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/libvpx/source/libvpx/third_party/x86inc/LICENSE \
+	src/3rdparty/chromium/third_party/libwebm/source/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/libwebp/LICENSE \
+	src/3rdparty/chromium/third_party/libxml/src/COPYING \
+	src/3rdparty/chromium/third_party/libXNVCtrl/LICENSE \
+	src/3rdparty/chromium/third_party/libxslt/linux/COPYING \
+	src/3rdparty/chromium/third_party/libyuv/LICENSE \
+	src/3rdparty/chromium/third_party/libyuv/LICENSE_THIRD_PARTY \
+	src/3rdparty/chromium/third_party/libyuv/third_party/gflags/LICENSE \
+	src/3rdparty/chromium/third_party/lzma_sdk/LICENSE \
+	src/3rdparty/chromium/third_party/mach_override/LICENSE \
+	src/3rdparty/chromium/third_party/markupsafe/LICENSE \
+	src/3rdparty/chromium/third_party/mesa/LICENSE \
+	src/3rdparty/chromium/third_party/mesa/src/docs/COPYING \
+	src/3rdparty/chromium/third_party/mesa/src/docs/license.html \
+	src/3rdparty/chromium/third_party/mesa/src/src/gallium/drivers/radeon/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/minigbm/LICENSE \
+	src/3rdparty/chromium/third_party/mocha/LICENSE \
+	src/3rdparty/chromium/third_party/mockito/LICENSE \
+	src/3rdparty/chromium/third_party/modp_b64/LICENSE \
+	src/3rdparty/chromium/third_party/molokocacao/LICENSE \
+	src/3rdparty/chromium/third_party/motemplate/LICENSE \
+	src/3rdparty/chromium/third_party/mozilla/LICENSE \
+	src/3rdparty/chromium/third_party/mt19937ar/LICENSE \
+	src/3rdparty/chromium/third_party/netty4/LICENSE \
+	src/3rdparty/chromium/third_party/netty-tcnative/LICENSE \
+	src/3rdparty/chromium/third_party/objenesis/LICENSE \
+	src/3rdparty/chromium/third_party/ocmock/License.txt \
+	src/3rdparty/chromium/third_party/openh264/src/LICENSE \
+	src/3rdparty/chromium/third_party/openmax_dl/LICENSE \
+	src/3rdparty/chromium/third_party/opus/src/COPYING \
+	src/3rdparty/chromium/third_party/ots/LICENSE \
+	src/3rdparty/chromium/third_party/ow2_asm/LICENSE \
+	src/3rdparty/chromium/third_party/pdfium/LICENSE \
+	src/3rdparty/chromium/third_party/pdfium/third_party/bigint/LICENSE \
+	src/3rdparty/chromium/third_party/pdfium/third_party/pymock/LICENSE.txt \
+	src/3rdparty/chromium/third_party/pexpect/LICENSE \
+	src/3rdparty/chromium/third_party/ply/LICENSE \
+	src/3rdparty/chromium/third_party/polymer/v1_0/components-chromium/polymer/LICENSE.txt \
+	src/3rdparty/chromium/third_party/proguard/LICENSE \
+	src/3rdparty/chromium/third_party/protobuf/LICENSE \
+	src/3rdparty/chromium/third_party/pycoverage/LICENSE \
+	src/3rdparty/chromium/third_party/pyelftools/elftools/construct/LICENSE \
+	src/3rdparty/chromium/third_party/pyelftools/LICENSE \
+	src/3rdparty/chromium/third_party/pyftpdlib/src/LICENSE \
+	src/3rdparty/chromium/third_party/pymock/LICENSE.txt \
+	src/3rdparty/chromium/third_party/python_gflags/COPYING \
+	src/3rdparty/chromium/third_party/Python-Markdown/LICENSE.md \
+	src/3rdparty/chromium/third_party/py_trace_event/src/LICENSE \
+	src/3rdparty/chromium/third_party/pywebsocket/src/LICENSE \
+	src/3rdparty/chromium/third_party/qcms/src/COPYING \
+	src/3rdparty/chromium/third_party/qunit/LICENSE \
+	src/3rdparty/chromium/third_party/re2/LICENSE \
+	src/3rdparty/chromium/third_party/re2/src/LICENSE \
+	src/3rdparty/chromium/third_party/requests/LICENSE \
+	src/3rdparty/chromium/third_party/robolectric/LICENSE \
+	src/3rdparty/chromium/third_party/robolectric/licenses/extreme.indiana.edu.license.txt \
+	src/3rdparty/chromium/third_party/robolectric/licenses/javolution.license.txt \
+	src/3rdparty/chromium/third_party/robolectric/licenses/pivotal.labs.license.txt \
+	src/3rdparty/chromium/third_party/sfntly/COPYING.txt \
+	src/3rdparty/chromium/third_party/sfntly/src/cpp/COPYING.txt \
+	src/3rdparty/chromium/third_party/sfntly/src/java/COPYING \
+	src/3rdparty/chromium/third_party/shaderc/LICENSE \
+	src/3rdparty/chromium/third_party/shaderc/src/LICENSE \
+	src/3rdparty/chromium/third_party/shaderc/src/third_party/LICENSE.glslang \
+	src/3rdparty/chromium/third_party/shaderc/src/third_party/LICENSE.spirv-tools \
+	src/3rdparty/chromium/third_party/simplejson/LICENSE.txt \
+	src/3rdparty/chromium/third_party/sinonjs/LICENSE \
+	src/3rdparty/chromium/third_party/skia/LICENSE \
+	src/3rdparty/chromium/third_party/skia/platform_tools/android/third_party/ashmem/LICENSE \
+	src/3rdparty/chromium/third_party/skia/third_party/etc1/LICENSE \
+	src/3rdparty/chromium/third_party/skia/third_party/gif/LICENSE \
+	src/3rdparty/chromium/third_party/skia/third_party/libpng/LICENSE \
+	src/3rdparty/chromium/third_party/smhasher/LICENSE \
+	src/3rdparty/chromium/third_party/snappy/src/COPYING \
+	src/3rdparty/chromium/third_party/SPIRV-Tools/LICENSE \
+	src/3rdparty/chromium/third_party/SPIRV-Tools/src/LICENSE \
+	src/3rdparty/chromium/third_party/sqlite4java/LICENSE \
+	src/3rdparty/chromium/third_party/sqlite/LICENSE \
+	src/3rdparty/chromium/third_party/sqlite/sqlite-src-3100200/autoconf/tea/license.terms \
+	src/3rdparty/chromium/third_party/sqlite/src/autoconf/tea/license.terms \
+	src/3rdparty/chromium/third_party/sudden_motion_sensor/LICENSE \
+	src/3rdparty/chromium/third_party/swiftshader/LICENSE.txt \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/LLVM/autoconf/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/LLVM/include/llvm/Support/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/LLVM/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/LLVM/projects/sample/autoconf/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-subzero/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/LLVM/utils/unittest/googletest/LICENSE.TXT \
+	src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/License.txt \
+	src/3rdparty/chromium/third_party/tcmalloc/LICENSE \
+	src/3rdparty/chromium/third_party/tcmalloc/vendor/COPYING \
+	src/3rdparty/chromium/third_party/tlslite/LICENSE \
+	src/3rdparty/chromium/third_party/typ/LICENSE \
+	src/3rdparty/chromium/third_party/ub-uiautomator/LICENSE \
+	src/3rdparty/chromium/third_party/usb_ids/LICENSE \
+	src/3rdparty/chromium/third_party/usrsctp/LICENSE \
+	src/3rdparty/chromium/third_party/usrsctp/usrsctplib/LICENSE.md \
+	src/3rdparty/chromium/third_party/v4l2capture/LICENSE \
+	src/3rdparty/chromium/third_party/v4l-utils/COPYING.libv4l \
+	src/3rdparty/chromium/third_party/visualmetrics/src/LICENSE \
+	src/3rdparty/chromium/third_party/vulkan/LICENSE \
+	src/3rdparty/chromium/third_party/wayland/LICENSE \
+	src/3rdparty/chromium/third_party/wayland-protocols/LICENSE \
+	src/3rdparty/chromium/third_party/wayland-protocols/src/COPYING \
+	src/3rdparty/chromium/third_party/wayland/src/COPYING \
+	src/3rdparty/chromium/third_party/wds/LICENSE \
+	src/3rdparty/chromium/third_party/wds/src/COPYING \
+	src/3rdparty/chromium/third_party/web-animations-js/LICENSE \
+	src/3rdparty/chromium/third_party/web-animations-js/sources/COPYING \
+	src/3rdparty/chromium/third_party/webdriver/COPYING \
+	src/3rdparty/chromium/third_party/webdriver/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/LICENSE_FOR_ABOUT_CREDITS \
+	src/3rdparty/chromium/third_party/WebKit/Source/core/LICENSE-APPLE \
+	src/3rdparty/chromium/third_party/WebKit/Source/core/LICENSE-LGPL-2 \
+	src/3rdparty/chromium/third_party/WebKit/Source/core/LICENSE-LGPL-2.1 \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/audits2_worker/lighthouse/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/cm/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/cm/LICENSE_python \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/cm_modes/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/formatter_worker/acorn/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/gonzales/MIT-LICENSE.txt \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/front_end/terminal/xterm.js/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Source/devtools/scripts/closure/COPYING \
+	src/3rdparty/chromium/third_party/WebKit/Source/wtf/dtoa/COPYING \
+	src/3rdparty/chromium/third_party/WebKit/Source/wtf/dtoa/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/COPYING \
+	src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/six/LICENSE \
+	src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/LICENSE \
+	src/3rdparty/chromium/third_party/webpagereplay/COPYING \
+	src/3rdparty/chromium/third_party/webpagereplay/third_party/dns/LICENSE \
+	src/3rdparty/chromium/third_party/webpagereplay/third_party/ipaddr/COPYING \
+	src/3rdparty/chromium/third_party/webpagereplay/third_party/ipfw_win32/LICENSE \
+	src/3rdparty/chromium/third_party/webpagereplay/third_party/jsmin/LICENSE.txt \
+	src/3rdparty/chromium/third_party/webrtc/examples/androidapp/third_party/autobanh/LICENSE \
+	src/3rdparty/chromium/third_party/webrtc/examples/androidapp/third_party/autobanh/LICENSE.md \
+	src/3rdparty/chromium/third_party/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/LICENSE \
+	src/3rdparty/chromium/third_party/webrtc/LICENSE \
+	src/3rdparty/chromium/third_party/webrtc/LICENSE_THIRD_PARTY \
+	src/3rdparty/chromium/third_party/webtreemap/src/COPYING \
+	src/3rdparty/chromium/third_party/woff2/LICENSE \
+	src/3rdparty/chromium/third_party/x86inc/LICENSE \
+	src/3rdparty/chromium/third_party/xdg-utils/LICENSE \
+	src/3rdparty/chromium/third_party/yasm/source/patched-yasm/COPYING \
+	src/3rdparty/chromium/third_party/yasm/source/patched-yasm/GNU_GPL-2.0 \
+	src/3rdparty/chromium/third_party/yasm/source/patched-yasm/GNU_LGPL-2.0 \
+	src/3rdparty/chromium/third_party/zlib/LICENSE \
+	src/3rdparty/chromium/tools/gn/out/Release/obj/third_party/widevine/cdm/widevine_test_license_server.ninja \
+	src/3rdparty/chromium/tools/gyp/LICENSE \
+	src/3rdparty/chromium/tools/origin_trials/third_party/ed25519/LICENSE \
+	src/3rdparty/chromium/tools/page_cycler/acid3/LICENSE \
+	src/3rdparty/chromium/tools/symsrc/COPYING-pefile \
+	src/3rdparty/chromium/tools/win/ChromeDebug/ChromeDebug/LICENSE \
+	src/3rdparty/chromium/url/third_party/mozilla/LICENSE.txt \
+	src/3rdparty/chromium/v8/LICENSE \
+	src/3rdparty/chromium/v8/LICENSE.fdlibm \
+	src/3rdparty/chromium/v8/LICENSE.strongtalk \
+	src/3rdparty/chromium/v8/LICENSE.v8 \
+	src/3rdparty/chromium/v8/LICENSE.valgrind \
+	src/3rdparty/chromium/v8/src/third_party/valgrind/LICENSE \
+	src/3rdparty/chromium/v8/src/third_party/vtune/LICENSE \
+	src/3rdparty/chromium/v8/third_party/inspector_protocol/LICENSE \
+
diff --git a/package/qt5/qt5webengine/qt5webengine.hash b/package/qt5/qt5webengine/qt5webengine.hash
new file mode 100644
index 000000000..d45500c44
--- /dev/null
+++ b/package/qt5/qt5webengine/qt5webengine.hash
@@ -0,0 +1,2 @@
+# Hash from: http://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtwebengine-opensource-src-5.9.1.tar.xz.mirrorlist
+sha256 f6a37eeb9188474a16d29ede498fce959396ab80329a0a83eaeb925251686401  qtwebengine-opensource-src-5.9.1.tar.xz
diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
new file mode 100644
index 000000000..cc229d252
--- /dev/null
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -0,0 +1,80 @@
+################################################################################
+#
+# qt5webengine
+#
+################################################################################
+
+QT5WEBENGINE_VERSION = $(QT5_VERSION)
+QT5WEBENGINE_SITE = $(QT5_SITE)
+QT5WEBENGINE_SOURCE = qtwebengine-opensource-src-$(QT5WEBENGINE_VERSION).tar.xz
+QT5WEBENGINE_DEPENDENCIES = qt5base ffmpeg libglib2 libvpx opus webp \
+	qt5declarative qt5webchannel host-bison host-flex host-gperf \
+	host-pkgconf host-python
+QT5WEBENGINE_INSTALL_STAGING = YES
+
+include package/qt5/qt5webengine/chromium.inc
+QT5WEBENGINE_LICENSE = GPL-2.0 or LGPL-3.0 or GPL-3.0 or GPL-3.0 with exception
+QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT \
+	LICENSE.GPLv3 LICENSE.LGPL3 $(CHROMIUM_LICENSE_FILES)
+
+ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
+QT5WEBENGINE_DEPENDENCIES += xlib_libXScrnSaver xlib_libXcomposite \
+	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst
+endif
+
+QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_system_ffmpeg
+
+ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
+QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_proprietary_codecs
+endif
+
+# QtWebengine's build system uses python, but only supports python2. We work
+# around this by forcing python2 early in the PATH, via a python->python2
+# symlink.
+QT5WEBENGINE_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
+define QT5WEBENGINE_PYTHON2_SYMLINK
+	mkdir -p $(@D)/host-bin
+	ln -sf $(HOST_DIR)/bin/python2 $(@D)/host-bin/python
+endef
+QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_PYTHON2_SYMLINK
+
+define QT5WEBENGINE_CONFIGURE_CMDS
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(HOST_DIR)/usr/bin/qmake $(QT5WEBENGINE_QMAKEFLAGS))
+endef
+
+define QT5WEBENGINE_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D)
+endef
+
+define QT5WEBENGINE_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D) install
+	$(QT5_LA_PRL_FILES_FIXUP)
+endef
+
+define QT5WEBENGINE_INSTALL_TARGET_QMLS
+	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebEngine $(TARGET_DIR)/usr/qml/
+endef
+
+ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
+define QT5WEBENGINE_INSTALL_TARGET_EXAMPLES
+	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webengine* $(TARGET_DIR)/usr/lib/qt/examples/
+endef
+endif
+
+ifneq ($(BR2_STATIC_LIBS),y)
+define QT5WEBENGINE_INSTALL_TARGET_LIBS
+	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebEngine*.so.* $(TARGET_DIR)/usr/lib
+	cp -dpf $(STAGING_DIR)/usr/libexec/QtWebEngineProcess $(TARGET_DIR)/usr/libexec/
+	cp -dpfr $(STAGING_DIR)/usr/resources/ $(TARGET_DIR)/usr/
+	mkdir -p $(TARGET_DIR)/usr/translations/qtwebengine_locales/
+	cp -dpfr $(STAGING_DIR)/usr/translations/qtwebengine_locales $(TARGET_DIR)/usr/translations/qtwebengine_locales/
+endef
+endif
+
+define QT5WEBENGINE_INSTALL_TARGET_CMDS
+	$(QT5WEBENGINE_INSTALL_TARGET_LIBS)
+	$(QT5WEBENGINE_INSTALL_TARGET_QMLS)
+	$(QT5WEBENGINE_INSTALL_TARGET_EXAMPLES)
+endef
+
+$(eval $(generic-package))
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 3/3] configs: new raspberrypi3 qt5 config
  2017-08-13 13:56 [Buildroot] [PATCH v7 0/3] Qt WebEngine support Gaël PORTAY
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks Gaël PORTAY
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 2/3] qt5webengine: new package Gaël PORTAY
@ 2017-08-13 13:56 ` Gaël PORTAY
  2017-08-13 14:01 ` [Buildroot] [PATCH v7 0/3] Qt WebEngine support Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Gaël PORTAY @ 2017-08-13 13:56 UTC (permalink / raw)
  To: buildroot

This config sets Qt WebEngine for raspberrypi 3.

Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
---
 configs/raspberrypi3_qt5_defconfig | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 configs/raspberrypi3_qt5_defconfig

diff --git a/configs/raspberrypi3_qt5_defconfig b/configs/raspberrypi3_qt5_defconfig
new file mode 100644
index 000000000..7cc850d09
--- /dev/null
+++ b/configs/raspberrypi3_qt5_defconfig
@@ -0,0 +1,48 @@
+BR2_arm=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_NEON_VFPV4=y
+
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+BR2_SYSTEM_DHCP="eth0"
+
+# Linux headers same as kernel, a 4.9 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="5e4ee836560d4c0371e109bf469e1ad808ae7a44"
+BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
+
+# Build the DTB from the kernel sources
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-cm3"
+
+# Build Qt5 WebEngine
+BR2_PACKAGE_LIBERATION=y
+BR2_PACKAGE_QT5=y
+BR2_PACKAGE_QT5BASE_EXAMPLES=y
+BR2_PACKAGE_QT5QUICKCONTROLS=y
+BR2_PACKAGE_QT5WEBENGINE=y
+BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y
+BR2_PACKAGE_RPI_FIRMWARE=y
+BR2_PACKAGE_RPI_USERLAND=y
+BR2_PACKAGE_CA_CERTIFICATES=y
+BR2_PACKAGE_NTP=y
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="360000"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 0/3] Qt WebEngine support
  2017-08-13 13:56 [Buildroot] [PATCH v7 0/3] Qt WebEngine support Gaël PORTAY
                   ` (2 preceding siblings ...)
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 3/3] configs: new raspberrypi3 qt5 config Gaël PORTAY
@ 2017-08-13 14:01 ` Thomas Petazzoni
  2017-08-13 14:46   ` Gaël PORTAY
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2017-08-13 14:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 13 Aug 2017 09:56:47 -0400, Ga?l PORTAY wrote:

> The last patch is a special defconfig that provides a Qt WebEngine setup on
> raspberrypi3.
> 
> With this patchset, one can run the Qt quicknanobrowser sample on a rpi3 with
> the following options:
>   - BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc" and
>     BR2_TOOLCHAIN_BUILDROOT_CXX=y (Qt 5 needs a toolchain w/ wchar, NPTL, C++,
>     dynamic library)
>   - BR2_PACKAGE_LIBERATION (Qt 5.8 requires a least one font)
>   - BR2_PACKAGE_RPI_USERLAND (to enable OpenGL backend)
>   - BR2_PACKAGE_QT5BASE_EXAMPLES (to install quicknanobrowser sample)
>   - BR2_PACKAGE_QT5QUICKCONTROLS (needed by quicknanobrowser)
>   - BR2_PACKAGE_QT5WEBENGINE (because it is what we want :))
> 
> To browse for HTTPS websites, please consider adding the following options as
> well:
>   - BR2_PACKAGE_CA_CERT (for certificates)
>   - BR2_PACKAGE_NTPD (to sync date)
> 
> To run quicknanobrowser:
> 	# cd /usr/lib/qt/examples/webengine/quicknanobrowser/
> 	# ./quicknanobrowser

These details would be good to have in the commit log of the
qtwebengine package.

> Note: For now, quicknanobrowser will just display the qt website without any
> input backend.
> 
> Note 2: Since bump to 5.9.1, the chromium's copy of opus fails with neon [7].
> BR2_PACKAGE_QT5WEBENGINE_SYSTEM_FFMPEG option allows one to use buildroot copy
> (which compiles fine).
> 
> 	In file included from ../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c:31:0:
> 	/home/gportay/src/buildroot/output-rpi3-qt5.9/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include/arm_neon.h:8997:1: error: inlining failed in call to always_inline ?vld1q_s32?: target specific option mismatch
> 	 vld1q_s32 (const int32_t * __a)
> 	 ^~~~~~~~~
> 	../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c:40:15: note: called from here
> 	     int32x4_t coef0 = vld1q_s32(coef32);
> 		       ^~~~~
> 	../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c: At top level:
> 	cc1: warning: unrecognized command line option ?-Wno-#pragma-messages?

Those notes too.

> 
> Note 3: Since bump to 5.9.1, chromium requires udev.
> 
> Note 4: Tested against:
>         - GCC 6.x and binutils 2.27 on rpi 3.
>         - GCC 7.x and binutils 2.28 on rpi 3.
> 
> Note 5: Version 5.6.2 causes a build issue while building chromium. I disabled
>         the build against this version and am waiting for the release 5.6.3.

This note too.

> Changes since v6:
>  - rpi-userland commit message:
>    fix output of ls -l snippet
>    update url to link to qtwe-5.9.1
>    add upstream-status
>  - qtwe:
>    add missing host-bison, host-flex and host-pkgconf dependencies
>    select BR2_HOSTARCH_NEEDS_IA32_COMPILER for 32-bit targets

BR2_HOSTARCH_NEEDS_IA32_COMPILER has nothing to do with 32-bit targets.
It has to do with the fact that qtwebengine builds programs for the
*host* (and not the target) using -m32. Therefore, on x86-64 machines,
it requires multilib support, in order to build (and run) 32 bits
programs.

Or, do you have some evidence/explanation that qtwebengine builds its
host programs 32 bits when the target is 32 bits, and builds its host
programs 64 bits when the target is 64 bits ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 0/3] Qt WebEngine support
  2017-08-13 14:01 ` [Buildroot] [PATCH v7 0/3] Qt WebEngine support Thomas Petazzoni
@ 2017-08-13 14:46   ` Gaël PORTAY
  0 siblings, 0 replies; 8+ messages in thread
From: Gaël PORTAY @ 2017-08-13 14:46 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Sun, Aug 13, 2017 at 04:01:57PM +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Sun, 13 Aug 2017 09:56:47 -0400, Ga?l PORTAY wrote:
> 
> > The last patch is a special defconfig that provides a Qt WebEngine setup on
> > raspberrypi3.
> > 
> > With this patchset, one can run the Qt quicknanobrowser sample on a rpi3 with
> > the following options:
> >   - BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc" and
> >     BR2_TOOLCHAIN_BUILDROOT_CXX=y (Qt 5 needs a toolchain w/ wchar, NPTL, C++,
> >     dynamic library)
> >   - BR2_PACKAGE_LIBERATION (Qt 5.8 requires a least one font)
> >   - BR2_PACKAGE_RPI_USERLAND (to enable OpenGL backend)
> >   - BR2_PACKAGE_QT5BASE_EXAMPLES (to install quicknanobrowser sample)
> >   - BR2_PACKAGE_QT5QUICKCONTROLS (needed by quicknanobrowser)
> >   - BR2_PACKAGE_QT5WEBENGINE (because it is what we want :))
> > 
> > To browse for HTTPS websites, please consider adding the following options as
> > well:
> >   - BR2_PACKAGE_CA_CERT (for certificates)
> >   - BR2_PACKAGE_NTPD (to sync date)
> > 
> > To run quicknanobrowser:
> > 	# cd /usr/lib/qt/examples/webengine/quicknanobrowser/
> > 	# ./quicknanobrowser
> 
> These details would be good to have in the commit log of the
> qtwebengine package.
> 
> > Note: For now, quicknanobrowser will just display the qt website without any
> > input backend.
> > 
> > Note 2: Since bump to 5.9.1, the chromium's copy of opus fails with neon [7].
> > BR2_PACKAGE_QT5WEBENGINE_SYSTEM_FFMPEG option allows one to use buildroot copy
> > (which compiles fine).
> > 
> > 	In file included from ../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c:31:0:
> > 	/home/gportay/src/buildroot/output-rpi3-qt5.9/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include/arm_neon.h:8997:1: error: inlining failed in call to always_inline ?vld1q_s32?: target specific option mismatch
> > 	 vld1q_s32 (const int32_t * __a)
> > 	 ^~~~~~~~~
> > 	../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c:40:15: note: called from here
> > 	     int32x4_t coef0 = vld1q_s32(coef32);
> > 		       ^~~~~
> > 	../../3rdparty/chromium/third_party/opus/src/silk/arm/NSQ_neon.c: At top level:
> > 	cc1: warning: unrecognized command line option ?-Wno-#pragma-messages?
> 
> Those notes too.
> 
> > 
> > Note 3: Since bump to 5.9.1, chromium requires udev.
> > 
> > Note 4: Tested against:
> >         - GCC 6.x and binutils 2.27 on rpi 3.
> >         - GCC 7.x and binutils 2.28 on rpi 3.
> > 
> > Note 5: Version 5.6.2 causes a build issue while building chromium. I disabled
> >         the build against this version and am waiting for the release 5.6.3.
> 
> This note too.
> 

Indeed, I will reword the commit message.

> > Changes since v6:
> >  - rpi-userland commit message:
> >    fix output of ls -l snippet
> >    update url to link to qtwe-5.9.1
> >    add upstream-status
> >  - qtwe:
> >    add missing host-bison, host-flex and host-pkgconf dependencies
> >    select BR2_HOSTARCH_NEEDS_IA32_COMPILER for 32-bit targets
> 
> BR2_HOSTARCH_NEEDS_IA32_COMPILER has nothing to do with 32-bit targets.
> It has to do with the fact that qtwebengine builds programs for the
> *host* (and not the target) using -m32. Therefore, on x86-64 machines,
> it requires multilib support, in order to build (and run) 32 bits
> programs.
> 
> Or, do you have some evidence/explanation that qtwebengine builds its
> host programs 32 bits when the target is 32 bits, and builds its host
> programs 64 bits when the target is 64 bits ?
> 

Sorry if the changelog was not clear enough.

Does the comment I added in the Config.in is more clear?

	# For 32-bits targets, v8 (a chromium 3rd-party) adds -m32 flag to build
	# internal host-tools.
	# https://github.com/v8/v8/blob/5.6.326.55/gypfiles/toolchain.gypi#L1036-L1037

I had a quick look to where v8 adds the -m32 flag and I found this [1].

My understanding is that v8 adds this flag when target is 32-bits and when host
compiler is biarch:

      ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
         or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
        (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
         v8_target_arch=="x87" or v8_target_arch=="mips" or \
         v8_target_arch=="mipsel" or v8_target_arch=="ppc" or \
         v8_target_arch=="s390")', {
        'target_conditions': [
          ['_toolset=="host"', {
            'conditions': [
              ['host_cxx_is_biarch==1', {
                'conditions': [
                  ['host_arch=="s390" or host_arch=="s390x"', {
                    'cflags': [ '-m31' ],
                    'ldflags': [ '-m31' ]
                  },{
                   'cflags': [ '-m32' ],
                   'ldflags': [ '-m32' ]
                  }],
                ],
              }],
            ],
            'xcode_settings': {
              'ARCHS': [ 'i386' ],
            },
           ...
      }],

biarch is set when host is x86[-64], PPC[64] or s390[x] (see [2]).

    ['host_arch=="ia32" or host_arch=="x64" or \
      host_arch=="ppc" or host_arch=="ppc64" or \
      host_arch=="s390" or host_arch=="s390x" or \
      clang==1', {
      'variables': {
        'host_cxx_is_biarch%': 1,
       },
     }, {
      'variables': {
        'host_cxx_is_biarch%': 0,
      },
    }],

So v8 seems to add -m32 flag to build its host-tools if host is intel/ppc/s390
(32/64-bits) and the target is 32-bits.

Also, it seems to apply the -m64 flag for 64-bits targets [3].

      ['(OS=="linux" or OS=="android") and \
        (v8_target_arch=="x64" or v8_target_arch=="arm64" or \
         v8_target_arch=="ppc64" or v8_target_arch=="s390x")', {
        'target_conditions': [
          ['_toolset=="host"', {
            'conditions': [
              ['host_cxx_is_biarch==1', {
                'cflags': [ '-m64' ],
                'ldflags': [ '-m64' ]
              }],
             ],
           }],
           ...,
         ],
      }],

[1] https://github.com/v8/v8/blob/5.6.326.55/gypfiles/toolchain.gypi#L1021-L1045
[2] https://github.com/v8/v8/blob/5.6.326.55/gypfiles/toolchain.gypi#L138-L150
[3] https://github.com/v8/v8/blob/5.6.326.55/gypfiles/toolchain.gypi#L1066-L1087

Best regards,
Gael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks
  2017-08-13 13:56 ` [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks Gaël PORTAY
@ 2017-08-14 21:47   ` Yann E. MORIN
  2017-08-14 22:37     ` Gaël PORTAY
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2017-08-14 21:47 UTC (permalink / raw)
  To: buildroot

Ga?l, All,

On 2017-08-13 09:56 -0400, Ga?l PORTAY spake thusly:
> The Qt WebEngine module loads libEGL.so.1 and libGLESv2.so.2 libraries.
> Paths are hard-coded [1].

But now they no longer do that:

    https://github.com/qt/qtwebengine/commit/d4c621f6a6b87f2a86069fa393b9f7c4f9e7b9ad

> This patch sets up cmake to create those library links.
> 
> 	$ ls -l output/target/usr/lib/libEGL* output/target/usr/lib/libGLESv2*
> 	-rwxr-xr-x 1 buildroot buildroot 130032 Aug 10 21:17 output/target/usr/lib/libEGL.so
> 	lrwxrwxrwx 1 buildroot buildroot      9 Aug  9 12:30 output/target/usr/lib/libEGL.so.1 -> libEGL.so
> 	-rwxr-xr-x 1 buildroot buildroot  71088 Aug 10 21:16 output/target/usr/lib/libGLESv2.so
> 	lrwxrwxrwx 1 buildroot buildroot     12 Aug  9 12:30 output/target/usr/lib/libGLESv2.so.2 -> libGLESv2.so
> 
> A pull request is pending [2].
> 
> [1] https://github.com/qt/qtwebengine/blob/5.9.1/src/core/surface_factory_qt.cpp#L76-L86
> [2] https://github.com/raspberrypi/userland/pull/379

Upstream was not too happy with your MR... :-(

So, do you think you could look at backporting the Qt patch instead?

Regards,
Yann E. MORIN.

> Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
> ---
>  .../0007-Add-OpenGL-library-versioning.patch       | 41 ++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 package/rpi-userland/0007-Add-OpenGL-library-versioning.patch
> 
> diff --git a/package/rpi-userland/0007-Add-OpenGL-library-versioning.patch b/package/rpi-userland/0007-Add-OpenGL-library-versioning.patch
> new file mode 100644
> index 000000000..9a22a66d2
> --- /dev/null
> +++ b/package/rpi-userland/0007-Add-OpenGL-library-versioning.patch
> @@ -0,0 +1,41 @@
> +From a6abc80168512993f390cfdb40531c50829af6da Mon Sep 17 00:00:00 2001
> +From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= <gael.portay@savoirfairelinux.com>
> +Date: Fri, 3 Mar 2017 17:28:41 -0500
> +Subject: [PATCH] Add OpenGL library versioning
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=utf-8
> +Content-Transfer-Encoding: 8bit
> +
> +Some applications like QtWebEngine dynamically load libraries using
> +dlopen. The library name is hardcoded, and it includes the library
> +version [1].
> +
> +This patch creates symlinks for EGL and GLES libraries.
> +
> +	libEGL.so.1 -> libEGL.so
> +	libGLESv2.so.2 -> libGLESv2.so
> +
> +[1] https://github.com/qt/qtwebengine/blob/v5.9.1/src/core/surface_factory_qt.cpp#L76-L86
> +
> +Upstream-Status: https://github.com/raspberrypi/userland/pull/379
> +Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
> +---
> + host_applications/android/apps/vidtex/CMakeLists.txt | 5 +++++
> + 1 file changed, 5 insertions(+)
> +
> +diff --git a/host_applications/android/apps/vidtex/CMakeLists.txt b/host_applications/android/apps/vidtex/CMakeLists.txt
> +index 1f705ef..d68ae5f 100644
> +--- a/host_applications/android/apps/vidtex/CMakeLists.txt
> ++++ b/host_applications/android/apps/vidtex/CMakeLists.txt
> +@@ -10,3 +10,8 @@ set (VIDTEX_SOURCES
> +    vidtex.c)
> + add_executable(vidtex ${VIDTEX_SOURCES})
> + target_link_libraries(vidtex GLESv2 EGL m bcm_host mmal_core mmal_components mmal_util mmal_vc_client vcos)
> ++
> ++set(DESTDIR \$ENV{DESTDIR})
> ++include(GNUInstallDirs)
> ++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink libEGL.so ${DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libEGL.so.1)")
> ++install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink libGLESv2.so ${DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libGLESv2.so.2)")
> +-- 
> +2.13.2
> +
> -- 
> 2.13.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks
  2017-08-14 21:47   ` Yann E. MORIN
@ 2017-08-14 22:37     ` Gaël PORTAY
  0 siblings, 0 replies; 8+ messages in thread
From: Gaël PORTAY @ 2017-08-14 22:37 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Mon, Aug 14, 2017 at 11:47:24PM +0200, Yann E. MORIN wrote:
> Ga?l, All,
> 
> On 2017-08-13 09:56 -0400, Ga?l PORTAY spake thusly:
> > The Qt WebEngine module loads libEGL.so.1 and libGLESv2.so.2 libraries.
> > Paths are hard-coded [1].
> 
> But now they no longer do that:
> 
>     https://github.com/qt/qtwebengine/commit/d4c621f6a6b87f2a86069fa393b9f7c4f9e7b9ad
> 

Good catch!

> > This patch sets up cmake to create those library links.
> > 
> > 	$ ls -l output/target/usr/lib/libEGL* output/target/usr/lib/libGLESv2*
> > 	-rwxr-xr-x 1 buildroot buildroot 130032 Aug 10 21:17 output/target/usr/lib/libEGL.so
> > 	lrwxrwxrwx 1 buildroot buildroot      9 Aug  9 12:30 output/target/usr/lib/libEGL.so.1 -> libEGL.so
> > 	-rwxr-xr-x 1 buildroot buildroot  71088 Aug 10 21:16 output/target/usr/lib/libGLESv2.so
> > 	lrwxrwxrwx 1 buildroot buildroot     12 Aug  9 12:30 output/target/usr/lib/libGLESv2.so.2 -> libGLESv2.so
> > 
> > A pull request is pending [2].
> > 
> > [1] https://github.com/qt/qtwebengine/blob/5.9.1/src/core/surface_factory_qt.cpp#L76-L86
> > [2] https://github.com/raspberrypi/userland/pull/379
> 
> Upstream was not too happy with your MR... :-(
> 
> So, do you think you could look at backporting the Qt patch instead?
> 

For sure, I will restart a build with this commit and without my patch.

Regards,
Gael

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-14 22:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-13 13:56 [Buildroot] [PATCH v7 0/3] Qt WebEngine support Gaël PORTAY
2017-08-13 13:56 ` [Buildroot] [PATCH v7 1/3] rpi-userland: fix opengl library symlinks Gaël PORTAY
2017-08-14 21:47   ` Yann E. MORIN
2017-08-14 22:37     ` Gaël PORTAY
2017-08-13 13:56 ` [Buildroot] [PATCH v7 2/3] qt5webengine: new package Gaël PORTAY
2017-08-13 13:56 ` [Buildroot] [PATCH v7 3/3] configs: new raspberrypi3 qt5 config Gaël PORTAY
2017-08-13 14:01 ` [Buildroot] [PATCH v7 0/3] Qt WebEngine support Thomas Petazzoni
2017-08-13 14:46   ` Gaël PORTAY

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.