Skip to contentSkip to conversation

package/ti-stgx: tentative bump (branch yem/ti-sgx-stuff)

PATCH New Yann E. MORIN 2 participants 10 messages Dec 10, 2020 – Dec 12, 2020

lore
Share & tools
lore
#0 lore raw

cover package/ti-stgx: tentative bump (branch yem/ti-sgx-stuff)

Hello All!

This series is a respin based on the initial patch from Adam:

    https://patchwork.ozlabs.org/project/buildroot/patch/20200702201125.3639873-1-aduskett at gmail.com/

That patch did help some people (see the replies), but unfortunately it still has a few shortcomings that I have tried to address, mostly unsuccessfully.

The most prominent issue was that the removing of ti-sgx-libgbm was not properly propagated to qt5base, and thus the build of qt5base would succeed becasue it avoided a problematic code path. Fixing that causes qt5base to no longer build, hitting the upstream issue:

    https://bugreports.qt.io/browse/QTBUG-72567

That has not yet been fixed upstream, and of the proposed patches, or
various suggestions in various Qt-related forums, none do fix the issue
either:
- patches in the PR itself
- https://codereview.qt-project.org/c/qt/qtbase/+/248270
- https://forum.qt.io/topic/88588/qtbase-compilation-error-with-device-linux-rasp-pi3-g-qeglfskmsgbmwindow-cpp/8
- https://forum.qt.io/topic/91596/raspberry-pi-3-compiling-qt-5-11-0-problem/6

So, I am at a loss at how to actually fix that further...

Still, here is a repsin with at least the changes I deemed necessary to reduce the problem-space. Any feedback or further guidance would be highly appreciated.

Regards,
Yann E. MORIN.

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Adam Duskett (3):
configs/beaglebone_qt5: switch to using KMS instead of wayland+weston package/ti-sgx-demos: use KMS-based demos package/ti-sgx-{km, um}: bump to SDK 06.01.00.08 versions

 Config.in.legacy                                   |  7 +++++
 board/beaglebone/readme.txt                        | 12 +++++++-
 .../rootfs_overlay/etc/qt5/eglfs_kms_cfg.json      | 15 ++++++++++
 configs/beaglebone_qt5_defconfig                   |  5 +---
 package/Config.in                                  |  1 -
 package/qt5/qt5base/qt5base.mk                     |  4 +--
 package/ti-sgx-demos/ti-sgx-demos.mk               |  2 +-
 package/ti-sgx-km/ti-sgx-km.hash                   |  4 +--
 package/ti-sgx-km/ti-sgx-km.mk                     |  4 +--
 .../0001-Add-missing-sys-sysmacros.h-include.patch | 25 -----------------
 package/ti-sgx-libgbm/Config.in                    | 12 --------
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash           |  3 --
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk             | 32 ----------------------
 package/ti-sgx-um/Config.in                        |  1 -
 package/ti-sgx-um/ti-sgx-um.hash                   |  4 +--
 package/ti-sgx-um/ti-sgx-um.mk                     |  4 +--
 16 files changed, 45 insertions(+), 90 deletions(-)
 create mode 100644 board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
 delete mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 delete mode 100644 package/ti-sgx-libgbm/Config.in
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/3 configs/beaglebone_qt5: switch to using KMS instead of wayland+weston

From: Adam Duskett <[email protected]>

weston does not work on the ti-sgx SDK, so switch to using KMS directly, and drop the wayland-related config options.

[yann.morin.1998 at free.fr: split into its own patch]
---
 board/beaglebone/readme.txt                       | 12 +++++++++++-
 .../rootfs_overlay/etc/qt5/eglfs_kms_cfg.json     | 15 +++++++++++++++
 configs/beaglebone_qt5_defconfig                  |  5 +----
 3 files changed, 27 insertions(+), 5 deletions(-)
 create mode 100644 board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
board/beaglebone/readme.txt +11 -1
index e6647dad2a..231e977a89 100644
@@ -7,7 +7,7 @@ Description
 This configuration will build a complete image for the beaglebone and
 the TI AM335x-EVM, the board type is identified by the on-board
 EEPROM. The configuration is based on the
-ti-processor-sdk-02.00.00.00. Device tree blobs for beaglebone
+ti-processor-sdk-06.01.00.08. Device tree blobs for beaglebone
 variants and the evm-sk are built too.
 
 For Qt5 support support use the beaglebone_qt5_defconfig.
@@ -43,10 +43,20 @@ output/images/
 To copy the image file to the sdcard use dd:
 $ dd if=output/images/sdcard.img of=/dev/XXX
 
+
+Running Qt5 hellowindow opengl demo:
+===================
+# export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
+# export QT_QPA_PLATFORM=eglfs
+# export QT_QPA_EGLFS_INTEGRATION=none
+# /usr/lib/qt/examples/opengl/hellowindow/hellowindow
+
+
 Tested hardware
 ===============
 am335x-evm (rev. 1.1A)
 beagleboneblack (rev. A5A)
 beaglebone (rev. A6)
 
+2020, Adam Duskett <[email protected]>
 2016, Lothar Felten <[email protected]>
board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json new file +15 -0
new file mode 100644
index 0000000000..76f5e7d379
@@ -0,0 +1,15 @@
+{
+  "device": "/dev/dri/card0",
+  "hwcursor": false,
+  "pbuffers": true,
+  "outputs": [
+    {
+      "name": "VGA1",
+      "mode": "off"
+    },
+    {
+      "name": "HDMI1",
+      "mode": "1024x768"
+    }
+  ]
+}
configs/beaglebone_qt5_defconfig +1 -4
index 5f7b911e5d..6e0371a7d3 100644
@@ -20,11 +20,8 @@ BR2_PACKAGE_FBV=y
 BR2_PACKAGE_QT5=y
 BR2_PACKAGE_QT5BASE_EXAMPLES=y
 BR2_PACKAGE_QT5BASE_EGLFS=y
-BR2_PACKAGE_QT5BASE_DEFAULT_QPA="wayland"
+BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
 BR2_PACKAGE_QT5QUICKCONTROLS=y
-BR2_PACKAGE_QT5WAYLAND=y
-BR2_PACKAGE_QT5WAYLAND_COMPOSITOR=y
-BR2_PACKAGE_WESTON=y
 BR2_PACKAGE_TI_SGX_DEMOS=y
 BR2_PACKAGE_TI_SGX_KM=y
 BR2_PACKAGE_TI_SGX_UM=y
Signature · 1 line
2.25.1
#2 lore raw

PATCH 1/3 configs/beaglebone_qt5: switch to using KMS instead of wayland+weston

Quoted 91 lines · Yann E. MORIN

From: Adam Duskett <[email protected]>

weston does not work on the ti-sgx SDK, so switch to using KMS directly, and drop the wayland-related config options.

[yann.morin.1998 at free.fr: split into its own patch]
---
 board/beaglebone/readme.txt                       | 12 +++++++++++-
 .../rootfs_overlay/etc/qt5/eglfs_kms_cfg.json     | 15 +++++++++++++++
 configs/beaglebone_qt5_defconfig                  |  5 +----
 3 files changed, 27 insertions(+), 5 deletions(-)
 create mode 100644 board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
board/beaglebone/readme.txt +11 -1
index e6647dad2a..231e977a89 100644
@@ -7,7 +7,7 @@ Description
 This configuration will build a complete image for the beaglebone and
 the TI AM335x-EVM, the board type is identified by the on-board
 EEPROM. The configuration is based on the
-ti-processor-sdk-02.00.00.00. Device tree blobs for beaglebone
+ti-processor-sdk-06.01.00.08. Device tree blobs for beaglebone
 variants and the evm-sk are built too.
 
 For Qt5 support support use the beaglebone_qt5_defconfig.
@@ -43,10 +43,20 @@ output/images/
 To copy the image file to the sdcard use dd:
 $ dd if=output/images/sdcard.img of=/dev/XXX
 
+
+Running Qt5 hellowindow opengl demo:
+===================
+# export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
+# export QT_QPA_PLATFORM=eglfs
+# export QT_QPA_EGLFS_INTEGRATION=none
+# /usr/lib/qt/examples/opengl/hellowindow/hellowindow
+
+
 Tested hardware
 ===============
 am335x-evm (rev. 1.1A)
 beagleboneblack (rev. A5A)
 beaglebone (rev. A6)
 
+2020, Adam Duskett <[email protected]>
 2016, Lothar Felten <[email protected]>
board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json new file +15 -0
new file mode 100644
index 0000000000..76f5e7d379
@@ -0,0 +1,15 @@
+{
+  "device": "/dev/dri/card0",
+  "hwcursor": false,
+  "pbuffers": true,
+  "outputs": [
+    {
+      "name": "VGA1",
+      "mode": "off"
+    },
+    {
+      "name": "HDMI1",
+      "mode": "1024x768"
+    }
+  ]
+}
configs/beaglebone_qt5_defconfig +1 -5
index 5f7b911e5d..6e0371a7d3 100644
@@ -20,11 +20,8 @@ BR2_PACKAGE_FBV=y
 BR2_PACKAGE_QT5=y
 BR2_PACKAGE_QT5BASE_EXAMPLES=y
 BR2_PACKAGE_QT5BASE_EGLFS=y
-BR2_PACKAGE_QT5BASE_DEFAULT_QPA="wayland"
+BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
 BR2_PACKAGE_QT5QUICKCONTROLS=y
-BR2_PACKAGE_QT5WAYLAND=y
-BR2_PACKAGE_QT5WAYLAND_COMPOSITOR=y
-BR2_PACKAGE_WESTON=y
 BR2_PACKAGE_TI_SGX_DEMOS=y
 BR2_PACKAGE_TI_SGX_KM=y
 BR2_PACKAGE_TI_SGX_UM=y
--

2.25.1

#3 lore raw

PATCH 2/3 package/ti-sgx-demos: use KMS-based demos

In reply to Yann E. MORIN

From: Adam Duskett <[email protected]>

Weston does not work with the ti-sgx SDK, so switch to using the KMS-based demos.

[yann.morin.1998 at free.fr: split off into its own patch]
---
 package/ti-sgx-demos/ti-sgx-demos.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ti-sgx-demos/ti-sgx-demos.mk +1 -1
index 8599e88e9b..ea6c6c6b08 100644
@@ -12,7 +12,7 @@ TI_SGX_DEMOS_LICENSE = Imagination Technologies License Agreement
 TI_SGX_DEMOS_LICENSE_FILES = LegalNotice.txt
 
 define TI_SGX_DEMOS_INSTALL_TARGET_CMDS
-	cp -dpfr $(@D)/targetfs/arm/Examples/Advanced/Wayland/OGLES* \
+	cp -dpfr $(@D)/targetfs/arm/Examples/Advanced/NullWS/OGLES* \
 		$(TARGET_DIR)/usr/bin/
 endef
 
Signature · 1 line
2.25.1
#4 lore raw

PATCH 2/3 package/ti-sgx-demos: use KMS-based demos

Quoted 29 lines · Yann E. MORIN

From: Adam Duskett <[email protected]>

Weston does not work with the ti-sgx SDK, so switch to using the KMS-based demos.

[yann.morin.1998 at free.fr: split off into its own patch]
---
 package/ti-sgx-demos/ti-sgx-demos.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ti-sgx-demos/ti-sgx-demos.mk +1 -2
index 8599e88e9b..ea6c6c6b08 100644
@@ -12,7 +12,7 @@ TI_SGX_DEMOS_LICENSE = Imagination Technologies License Agreement
 TI_SGX_DEMOS_LICENSE_FILES = LegalNotice.txt
 
 define TI_SGX_DEMOS_INSTALL_TARGET_CMDS
-       cp -dpfr $(@D)/targetfs/arm/Examples/Advanced/Wayland/OGLES* \
+       cp -dpfr $(@D)/targetfs/arm/Examples/Advanced/NullWS/OGLES* \
                $(TARGET_DIR)/usr/bin/
 endef
 
--

2.25.1

#5 lore raw

PATCH 3/3 package/ti-sgx-{km, um}: bump to SDK 06.01.00.08 versions

In reply to Yann E. MORIN

From: Adam Duskett <[email protected]>

Currently, the ti-sgx packages and the beaglebone_qt5_defconfig do not work with KMS nor Weston. What's worse, is the latest SDK version 06.03.00.106 (as of this commit) of these packages is broken and does not correctly support KMS, and attempting to run KMS applications results in eglfs initialization failures. As such, bumping these packages to the version before 06.03.00.106 is the best option.

Because of the above problems, several packages must change at the same time to ensure this patch does not break any other packages:

- ti-sgx-libgbm
- dropped, merged into ti-sgx-um, see below

- ti-sgx-um:
- bump the version that matches TI SDK 06.01.00.08.
- demove select BR2_PACKAGE_TI_SGX_LIBGBM in Config.in, as the libgbm package merges ti-sgx-libgbm with this package.

- ti-sgx-km:
- bump the version that matches TI SDK 06.01.00.08.

[yann.morin.1998 at free.fr:
- actually switch qt5base to use ti-sgx-um
- split the beaglebone config changes to their own patch
- split the ti-sgx-demos changes to their own patch
]

---
 Config.in.legacy                              |  7 ++++
 package/Config.in                             |  1 -
 package/qt5/qt5base/qt5base.mk                |  4 +--
 package/ti-sgx-km/ti-sgx-km.hash              |  4 +--
 package/ti-sgx-km/ti-sgx-km.mk                |  4 +--
 ...-Add-missing-sys-sysmacros.h-include.patch | 25 ---------------
 package/ti-sgx-libgbm/Config.in               | 12 -------
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash      |  3 --
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk        | 32 -------------------
 package/ti-sgx-um/Config.in                   |  1 -
 package/ti-sgx-um/ti-sgx-um.hash              |  4 +--
 package/ti-sgx-um/ti-sgx-um.mk                |  4 +--
 12 files changed, 17 insertions(+), 84 deletions(-)
 delete mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 delete mode 100644 package/ti-sgx-libgbm/Config.in
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
Config.in.legacy +7 -0
index 91689291c9..6d8acadf9c 100644
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2021.02"
 
+config BR2_PACKAGE_TI_SGX_LIBGBM
+	bool "ti-sgx-libgbm support removed"
+	select BR2_LEGACY
+	help
+	  TI has merged the ti-sgx-libgbm package with the ti-sgx-um
+	  package
+
 config BR2_PACKAGE_IPSEC_TOOLS
 	bool "ipsec-tools package was removed"
 	select BR2_LEGACY
package/Config.in +0 -1
index 39c91645ad..dc7139a49a 100644
@@ -554,7 +554,6 @@ endmenu
 	source "package/ti-gfx/Config.in"
 	source "package/ti-sgx-demos/Config.in"
 	source "package/ti-sgx-km/Config.in"
-	source "package/ti-sgx-libgbm/Config.in"
 	source "package/ti-sgx-um/Config.in"
 	source "package/ti-uim/Config.in"
 	source "package/ti-utils/Config.in"
package/qt5/qt5base/qt5base.mk +2 -2
index 4cd5980f0b..e2015c3432 100644
@@ -76,9 +76,9 @@ QT5BASE_DEPENDENCIES += mesa3d
 else ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
 QT5BASE_DEPENDENCIES += gcnano-binaries
-else ifeq ($(BR2_PACKAGE_TI_SGX_LIBGBM),y)
+else ifeq ($(BR2_PACKAGE_TI_SGX_UM),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
-QT5BASE_DEPENDENCIES += ti-sgx-libgbm
+QT5BASE_DEPENDENCIES += ti-sgx-um
 else ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
 QT5BASE_DEPENDENCIES += imx-gpu-viv
package/ti-sgx-km/ti-sgx-km.hash +2 -2
index 1fd07d7467..2fd3b56b1e 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256 f1505f38f9e82f958673bb1755e65090bdbc513a68d41640561d9d491bc4b0e3  ti-sgx-km-4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d.tar.gz
-sha256 e9d660547691b2a9232850fd43aac16d40fd063023166fd27162020c30dc2bd4  eurasia_km/GPL-COPYING
+sha256  ea70356dd0fd7f904f6d6046c4090c7d6d0126e13039db746c75bb6e666864d8  ti-sgx-km-cf7f48cb30abfd5df7a60c9bf4bbb1dde0d496d9.tar.gz
+sha256  e9d660547691b2a9232850fd43aac16d40fd063023166fd27162020c30dc2bd4  eurasia_km/GPL-COPYING
package/ti-sgx-km/ti-sgx-km.mk +2 -2
index ae294c300a..25f1f83ca7 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 06.00.00.07
-TI_SGX_KM_VERSION = 4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d
+# This correpsonds to SDK 06.01.00.08
+TI_SGX_KM_VERSION = cf7f48cb30abfd5df7a60c9bf4bbb1dde0d496d9
 TI_SGX_KM_SITE = http://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git
 TI_SGX_KM_SITE_METHOD = git
 TI_SGX_KM_LICENSE = GPL-2.0
package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch deleted +0 -25
deleted file mode 100644
index 2863c93bed..0000000000
@@ -1,25 +0,0 @@
-From e3a3f3655956265eb4f3b866d445a9d19e613594 Mon Sep 17 00:00:00 2001
-From: Lothar Felten <[email protected]>
-Date: Thu, 14 Nov 2019 23:37:07 -0300
-Subject: [PATCH] Add missing sys/sysmacros.h include
-
-Signed-off-by: Lothar Felten <[email protected]>
----
- gbm.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gbm.c b/gbm.c
-index 7bc5880..e360da7 100644
---- a/gbm.c
-+++ b/gbm.c
-@@ -36,6 +36,7 @@
- 
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/sysmacros.h>
- #include <unistd.h>
- #include <errno.h>
- 
--- 
-2.18.1
-
package/ti-sgx-libgbm/Config.in deleted +0 -12
deleted file mode 100644
index 2c679e2046..0000000000
@@ -1,12 +0,0 @@
-config BR2_PACKAGE_TI_SGX_LIBGBM
-	bool "ti-sgx-libgbm"
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_PACKAGE_HAS_UDEV
-	select BR2_PACKAGE_LIBDRM
-	help
-	  TI SGX libgbm variant.
-
-	  https://git.ti.com/cgit/glsdk/libgbm
-
-comment "ti-sgx-libgbm needs udev and a toolchain w/ threads"
-	depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
package/ti-sgx-libgbm/ti-sgx-libgbm.hash deleted +0 -3
deleted file mode 100644
index 32af5ad5ae..0000000000
@@ -1,3 +0,0 @@
-# Locally computed:
-sha256 85e3eafcd06caccd8c4cea3081b1406ae51c07e19541ac19b9c33a5b41fec82d  ti-sgx-libgbm-c5ddc6a37bb78ac753b317b17d890d1f7338dea6.tar.gz
-sha256 58fe00de76ae5d533e1c562950e1848682c03155a653d76870cf0a3c59be8b4c  gbm.h
package/ti-sgx-libgbm/ti-sgx-libgbm.mk deleted +0 -32
deleted file mode 100644
index 00a0716e21..0000000000
@@ -1,32 +0,0 @@
-################################################################################
-#
-# ti-sgx-libgbm
-#
-################################################################################
-
-# This correpsonds to SDK 06.00.00.07
-TI_SGX_LIBGBM_VERSION = c5ddc6a37bb78ac753b317b17d890d1f7338dea6
-TI_SGX_LIBGBM_SITE = http://git.ti.com/git/glsdk/libgbm.git
-TI_SGX_LIBGBM_SITE_METHOD = git
-TI_SGX_LIBGBM_LICENSE = MIT
-TI_SGX_LIBGBM_LICENSE_FILES = gbm.h
-TI_SGX_LIBGBM_INSTALL_STAGING = YES
-TI_SGX_LIBGBM_AUTORECONF = YES
-
-TI_SGX_LIBGBM_DEPENDENCIES = libdrm udev
-
-define TI_SGX_LIBGBM_INSTALL_TARGET_OPTS
-	PREFIX=/usr \
-	STRIP=/bin/true \
-	DESTDIR=$(TARGET_DIR) \
-	install
-endef
-
-define TI_SGX_LIBGBM_INSTALL_STAGING_OPTS
-	PREFIX=/usr \
-	STRIP=/bin/true \
-	DESTDIR=$(STAGING_DIR) \
-	install
-endef
-
-$(eval $(autotools-package))
package/ti-sgx-um/Config.in +0 -1
index ee87d46aa4..6a8b7e87e3 100644
@@ -17,7 +17,6 @@ config BR2_PACKAGE_TI_SGX_UM
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_POWERVR
-	select BR2_PACKAGE_TI_SGX_LIBGBM
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_WAYLAND
 	help
package/ti-sgx-um/ti-sgx-um.hash +2 -2
index ff54ecbd6d..8e8c5ff328 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256 cb1373a6335af3d3741c6b11cf217afc8bdbe182642229df359c38e3ccfc5866  ti-sgx-um-2a2e5bb090ced870d73ed4edbc54793e952cc6d8.tar.gz
-sha256 368c306246c9130b5c90a6fef2f80085f70b6225b3f552654a288c0f39fc1531  TI-Linux-Graphics-DDK-UM-Manifest.doc
+sha256  4d293a4170e2fd28852680830dacd8f575b12037f3e15bcf599232f6ccbf6deb  ti-sgx-um-909e237baf47d0bde006ff25552f5403fd7e359d.tar.gz
+sha256  368c306246c9130b5c90a6fef2f80085f70b6225b3f552654a288c0f39fc1531  TI-Linux-Graphics-DDK-UM-Manifest.doc
package/ti-sgx-um/ti-sgx-um.mk +2 -2
index 0e26d057c1..30d1ef81f0 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 06.00.00.07 plus one pull request
-TI_SGX_UM_VERSION = 2a2e5bb090ced870d73ed4edbc54793e952cc6d8
+# This correpsonds to SDK 06.01.00.08
+TI_SGX_UM_VERSION = 909e237baf47d0bde006ff25552f5403fd7e359d
 TI_SGX_UM_SITE = http://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git
 TI_SGX_UM_SITE_METHOD = git
 TI_SGX_UM_LICENSE = TI TSPA License
Signature · 1 line
2.25.1
#6 lore raw

PATCH 3/3 package/ti-sgx-{km, um}: bump to SDK 06.01.00.08 versions

Quoted 258 lines · Yann E. MORIN

From: Adam Duskett <[email protected]>

Currently, the ti-sgx packages and the beaglebone_qt5_defconfig do not work with KMS nor Weston. What's worse, is the latest SDK version 06.03.00.106 (as of this commit) of these packages is broken and does not correctly support KMS, and attempting to run KMS applications results in eglfs initialization failures. As such, bumping these packages to the version before 06.03.00.106 is the best option.

Because of the above problems, several packages must change at the same time to ensure this patch does not break any other packages:

- ti-sgx-libgbm
- dropped, merged into ti-sgx-um, see below

- ti-sgx-um:
- bump the version that matches TI SDK 06.01.00.08.
- demove select BR2_PACKAGE_TI_SGX_LIBGBM in Config.in, as the libgbm package merges ti-sgx-libgbm with this package.

- ti-sgx-km:
- bump the version that matches TI SDK 06.01.00.08.

[yann.morin.1998 at free.fr:
- actually switch qt5base to use ti-sgx-um
- split the beaglebone config changes to their own patch
- split the ti-sgx-demos changes to their own patch
]

---
 Config.in.legacy                              |  7 ++++
 package/Config.in                             |  1 -
 package/qt5/qt5base/qt5base.mk                |  4 +--
 package/ti-sgx-km/ti-sgx-km.hash              |  4 +--
 package/ti-sgx-km/ti-sgx-km.mk                |  4 +--
 ...-Add-missing-sys-sysmacros.h-include.patch | 25 ---------------
 package/ti-sgx-libgbm/Config.in               | 12 -------
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash      |  3 --
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk        | 32 -------------------
 package/ti-sgx-um/Config.in                   |  1 -
 package/ti-sgx-um/ti-sgx-um.hash              |  4 +--
 package/ti-sgx-um/ti-sgx-um.mk                |  4 +--
 12 files changed, 17 insertions(+), 84 deletions(-)
 delete mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 delete mode 100644 package/ti-sgx-libgbm/Config.in
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
Config.in.legacy +7 -0
index 91689291c9..6d8acadf9c 100644
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2021.02"
 
+config BR2_PACKAGE_TI_SGX_LIBGBM
+       bool "ti-sgx-libgbm support removed"
+       select BR2_LEGACY
+       help
+         TI has merged the ti-sgx-libgbm package with the ti-sgx-um
+         package
+
 config BR2_PACKAGE_IPSEC_TOOLS
        bool "ipsec-tools package was removed"
        select BR2_LEGACY
package/Config.in +0 -1
index 39c91645ad..dc7139a49a 100644
@@ -554,7 +554,6 @@ endmenu
        source "package/ti-gfx/Config.in"
        source "package/ti-sgx-demos/Config.in"
        source "package/ti-sgx-km/Config.in"
-       source "package/ti-sgx-libgbm/Config.in"
        source "package/ti-sgx-um/Config.in"
        source "package/ti-uim/Config.in"
        source "package/ti-utils/Config.in"
package/qt5/qt5base/qt5base.mk +2 -2
index 4cd5980f0b..e2015c3432 100644
@@ -76,9 +76,9 @@ QT5BASE_DEPENDENCIES += mesa3d
 else ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
 QT5BASE_DEPENDENCIES += gcnano-binaries
-else ifeq ($(BR2_PACKAGE_TI_SGX_LIBGBM),y)
+else ifeq ($(BR2_PACKAGE_TI_SGX_UM),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
-QT5BASE_DEPENDENCIES += ti-sgx-libgbm
+QT5BASE_DEPENDENCIES += ti-sgx-um
 else ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
 QT5BASE_DEPENDENCIES += imx-gpu-viv
package/ti-sgx-km/ti-sgx-km.hash +2 -2
index 1fd07d7467..2fd3b56b1e 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256 f1505f38f9e82f958673bb1755e65090bdbc513a68d41640561d9d491bc4b0e3  ti-sgx-km-4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d.tar.gz
-sha256 e9d660547691b2a9232850fd43aac16d40fd063023166fd27162020c30dc2bd4  eurasia_km/GPL-COPYING
+sha256  ea70356dd0fd7f904f6d6046c4090c7d6d0126e13039db746c75bb6e666864d8  ti-sgx-km-cf7f48cb30abfd5df7a60c9bf4bbb1dde0d496d9.tar.gz
+sha256  e9d660547691b2a9232850fd43aac16d40fd063023166fd27162020c30dc2bd4  eurasia_km/GPL-COPYING
package/ti-sgx-km/ti-sgx-km.mk +2 -2
index ae294c300a..25f1f83ca7 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 06.00.00.07
-TI_SGX_KM_VERSION = 4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d
+# This correpsonds to SDK 06.01.00.08
+TI_SGX_KM_VERSION = cf7f48cb30abfd5df7a60c9bf4bbb1dde0d496d9
 TI_SGX_KM_SITE = http://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git
 TI_SGX_KM_SITE_METHOD = git
 TI_SGX_KM_LICENSE = GPL-2.0
package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch deleted +0 -25
deleted file mode 100644
index 2863c93bed..0000000000
@@ -1,25 +0,0 @@
-From e3a3f3655956265eb4f3b866d445a9d19e613594 Mon Sep 17 00:00:00 2001
-From: Lothar Felten <[email protected]>
-Date: Thu, 14 Nov 2019 23:37:07 -0300
-Subject: [PATCH] Add missing sys/sysmacros.h include
-
-Signed-off-by: Lothar Felten <[email protected]>
----
- gbm.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gbm.c b/gbm.c
-index 7bc5880..e360da7 100644
---- a/gbm.c
-+++ b/gbm.c
-@@ -36,6 +36,7 @@
-
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/sysmacros.h>
- #include <unistd.h>
- #include <errno.h>
-
---
-2.18.1
-
package/ti-sgx-libgbm/Config.in deleted +0 -12
deleted file mode 100644
index 2c679e2046..0000000000
@@ -1,12 +0,0 @@
-config BR2_PACKAGE_TI_SGX_LIBGBM
-       bool "ti-sgx-libgbm"
-       depends on BR2_TOOLCHAIN_HAS_THREADS
-       depends on BR2_PACKAGE_HAS_UDEV
-       select BR2_PACKAGE_LIBDRM
-       help
-         TI SGX libgbm variant.
-
-         https://git.ti.com/cgit/glsdk/libgbm
-
-comment "ti-sgx-libgbm needs udev and a toolchain w/ threads"
-       depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
package/ti-sgx-libgbm/ti-sgx-libgbm.hash deleted +0 -3
deleted file mode 100644
index 32af5ad5ae..0000000000
@@ -1,3 +0,0 @@
-# Locally computed:
-sha256 85e3eafcd06caccd8c4cea3081b1406ae51c07e19541ac19b9c33a5b41fec82d  ti-sgx-libgbm-c5ddc6a37bb78ac753b317b17d890d1f7338dea6.tar.gz
-sha256 58fe00de76ae5d533e1c562950e1848682c03155a653d76870cf0a3c59be8b4c  gbm.h
package/ti-sgx-libgbm/ti-sgx-libgbm.mk deleted +0 -32
deleted file mode 100644
index 00a0716e21..0000000000
@@ -1,32 +0,0 @@
-################################################################################
-#
-# ti-sgx-libgbm
-#
-################################################################################
-
-# This correpsonds to SDK 06.00.00.07
-TI_SGX_LIBGBM_VERSION = c5ddc6a37bb78ac753b317b17d890d1f7338dea6
-TI_SGX_LIBGBM_SITE = http://git.ti.com/git/glsdk/libgbm.git
-TI_SGX_LIBGBM_SITE_METHOD = git
-TI_SGX_LIBGBM_LICENSE = MIT
-TI_SGX_LIBGBM_LICENSE_FILES = gbm.h
-TI_SGX_LIBGBM_INSTALL_STAGING = YES
-TI_SGX_LIBGBM_AUTORECONF = YES
-
-TI_SGX_LIBGBM_DEPENDENCIES = libdrm udev
-
-define TI_SGX_LIBGBM_INSTALL_TARGET_OPTS
-       PREFIX=/usr \
-       STRIP=/bin/true \
-       DESTDIR=$(TARGET_DIR) \
-       install
-endef
-
-define TI_SGX_LIBGBM_INSTALL_STAGING_OPTS
-       PREFIX=/usr \
-       STRIP=/bin/true \
-       DESTDIR=$(STAGING_DIR) \
-       install
-endef
-
-$(eval $(autotools-package))
package/ti-sgx-um/Config.in +0 -1
index ee87d46aa4..6a8b7e87e3 100644
@@ -17,7 +17,6 @@ config BR2_PACKAGE_TI_SGX_UM
        select BR2_PACKAGE_HAS_LIBEGL
        select BR2_PACKAGE_HAS_LIBGLES
        select BR2_PACKAGE_HAS_POWERVR
-       select BR2_PACKAGE_TI_SGX_LIBGBM
        select BR2_PACKAGE_LIBFFI
        select BR2_PACKAGE_WAYLAND
        help
package/ti-sgx-um/ti-sgx-um.hash +2 -2
index ff54ecbd6d..8e8c5ff328 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256 cb1373a6335af3d3741c6b11cf217afc8bdbe182642229df359c38e3ccfc5866  ti-sgx-um-2a2e5bb090ced870d73ed4edbc54793e952cc6d8.tar.gz
-sha256 368c306246c9130b5c90a6fef2f80085f70b6225b3f552654a288c0f39fc1531  TI-Linux-Graphics-DDK-UM-Manifest.doc
+sha256  4d293a4170e2fd28852680830dacd8f575b12037f3e15bcf599232f6ccbf6deb  ti-sgx-um-909e237baf47d0bde006ff25552f5403fd7e359d.tar.gz
+sha256  368c306246c9130b5c90a6fef2f80085f70b6225b3f552654a288c0f39fc1531  TI-Linux-Graphics-DDK-UM-Manifest.doc
package/ti-sgx-um/ti-sgx-um.mk +2 -3
index 0e26d057c1..30d1ef81f0 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 06.00.00.07 plus one pull request
-TI_SGX_UM_VERSION = 2a2e5bb090ced870d73ed4edbc54793e952cc6d8
+# This correpsonds to SDK 06.01.00.08
+TI_SGX_UM_VERSION = 909e237baf47d0bde006ff25552f5403fd7e359d
 TI_SGX_UM_SITE = http://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git
 TI_SGX_UM_SITE_METHOD = git
 TI_SGX_UM_LICENSE = TI TSPA License
--

2.25.1

#7 lore raw

cover package/ti-stgx: tentative bump (branch yem/ti-sgx-stuff)

In reply to Yann E. MORIN

All;

I tested the series on an existing build I am using and everything
compiled fine. However, I did not realize that
I already have Markus Zehnder's patch from
https://patchwork.ozlabs.org/project/buildroot/patch/20200702201125.3639873-1-aduskett at gmail.com/ which allows QT5 to build fine.

As such, please disregard the aforementioned "tested-by's."

Yann, you will have to either include Markus' patch or find a different solution.

Adam

Quoted 73 lines · Yann E. MORIN

Hello All!

This series is a respin based on the initial patch from Adam:

    https://patchwork.ozlabs.org/project/buildroot/patch/20200702201125.3639873-1-aduskett at gmail.com/

That patch did help some people (see the replies), but unfortunately it still has a few shortcomings that I have tried to address, mostly unsuccessfully.

The most prominent issue was that the removing of ti-sgx-libgbm was not properly propagated to qt5base, and thus the build of qt5base would succeed becasue it avoided a problematic code path. Fixing that causes qt5base to no longer build, hitting the upstream issue:

    https://bugreports.qt.io/browse/QTBUG-72567

That has not yet been fixed upstream, and of the proposed patches, or
various suggestions in various Qt-related forums, none do fix the issue
either:
- patches in the PR itself
- https://codereview.qt-project.org/c/qt/qtbase/+/248270
- https://forum.qt.io/topic/88588/qtbase-compilation-error-with-device-linux-rasp-pi3-g-qeglfskmsgbmwindow-cpp/8
- https://forum.qt.io/topic/91596/raspberry-pi-3-compiling-qt-5-11-0-problem/6

So, I am at a loss at how to actually fix that further...

Still, here is a repsin with at least the changes I deemed necessary to reduce the problem-space. Any feedback or further guidance would be highly appreciated.

Regards,
Yann E. MORIN.

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Adam Duskett (3):
configs/beaglebone_qt5: switch to using KMS instead of wayland+weston package/ti-sgx-demos: use KMS-based demos package/ti-sgx-{km, um}: bump to SDK 06.01.00.08 versions

 Config.in.legacy                                   |  7 +++++
 board/beaglebone/readme.txt                        | 12 +++++++-
 .../rootfs_overlay/etc/qt5/eglfs_kms_cfg.json      | 15 ++++++++++
 configs/beaglebone_qt5_defconfig                   |  5 +---
 package/Config.in                                  |  1 -
 package/qt5/qt5base/qt5base.mk                     |  4 +--
 package/ti-sgx-demos/ti-sgx-demos.mk               |  2 +-
 package/ti-sgx-km/ti-sgx-km.hash                   |  4 +--
 package/ti-sgx-km/ti-sgx-km.mk                     |  4 +--
 .../0001-Add-missing-sys-sysmacros.h-include.patch | 25 -----------------
 package/ti-sgx-libgbm/Config.in                    | 12 --------
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash           |  3 --
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk             | 32 ----------------------
 package/ti-sgx-um/Config.in                        |  1 -
 package/ti-sgx-um/ti-sgx-um.hash                   |  4 +--
 package/ti-sgx-um/ti-sgx-um.mk                     |  4 +--
 16 files changed, 45 insertions(+), 90 deletions(-)
 create mode 100644 board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
 delete mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 delete mode 100644 package/ti-sgx-libgbm/Config.in
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#8 lore raw

cover package/ti-stgx: tentative bump (branch yem/ti-sgx-stuff)

Adam, All,

On 2020-12-11 12:19 -0800, Adam Duskett spake thusly:

Quoted 2 lines

I tested the series on an existing build I am using and everything compiled fine. However, I did not realize that

Thanks for the heads-up on this.

Quoted 5 lines

I already have Markus Zehnder's patch from
https://patchwork.ozlabs.org/project/buildroot/patch/20200702201125.3639873-1-aduskett at gmail.com/ which allows QT5 to build fine.

As such, please disregard the aforementioned "tested-by's."

Well, do the first two patches still make sense on their own, without the subsequent bump in this patch?

Quoted 2 lines

Yann, you will have to either include Markus' patch or find a different solution.

Ah, right, I did not test that patch because it looked suspiciously like the one from https://codereview.qt-project.org/c/qt/qtbase/+/248270 which has not been applied upstream.

But when one look closer at Markus' patch, we can see indeed that there is a very slight difference, which I believe makes it very incorrect.

For reference, here's the upstream PR patch snippet (without comments or context):

    -        display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr);
    +        quintptr nativeDisplayPtr = reinterpret_cast<quintptr>(nativeDisplay);
    +        display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, reinterpret_cast<void *>(nativeDisplayPtr), nullptr);

and here's Markus patch snipppet:

    -        display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr);
    +        qintptr nativeDisplayPtr = reinterpret_cast<qintptr>(nativeDisplay);
    +        display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, reinterpret_cast<void *>(&nativeDisplayPtr), nullptr);

There is a very slight difference in there that I initially did not spot.

Indeed, when one look closer, we can see that the original code would use nativeDisplay, which is "something", which happens to match the pointer expected by getPlatformDisplay(), the function to call the eglGetPlatformDisplayEXT extension.

But with Markus' patch, we're basically mow passing a "pointer to something that is interpreted as somestuff", so essentially, we're passing a "pointer to something" instead of "something": note the '&' in front of the re-interpreted nativeDisplayPtr, which is missing in the patch from the upstream PR.

So yes, this makes the build succeed with ti-sgx, because we now pass a pointer. And I suspect that also does not break at runtime either, because that code path is never hit, as explained with a comment in the upstream patch:

    // EGLNativeDisplayType may be int on some platforms but those
    // won't hit this path. Have to keep it compiling nonetheless.

So, for ti-sgx, this patch makes the stuff not break, indeed (at least the build of beaglebone_qt5_defconfig does succeed, but I have no BBB, so can't test).

However, I suspect this patch is very incorrect for anything else that does have the eglGetPlatformDisplayEXT extension, like most other GL implmentations such as mesa...

Of course, I am not a C++ expert, and I am no GL or Qt expert either, so I may have missed some subtleties...

So, I still don't see how we would solve that issue, except maybe not allow that combination to begin with, maybe...

Regards,
Yann E. MORIN.

Quoted 80 lines

Adam

Quoted 66 lines · Yann E. MORIN

Hello All!

This series is a respin based on the initial patch from Adam:

    https://patchwork.ozlabs.org/project/buildroot/patch/20200702201125.3639873-1-aduskett at gmail.com/

That patch did help some people (see the replies), but unfortunately it still has a few shortcomings that I have tried to address, mostly unsuccessfully.

The most prominent issue was that the removing of ti-sgx-libgbm was not properly propagated to qt5base, and thus the build of qt5base would succeed becasue it avoided a problematic code path. Fixing that causes qt5base to no longer build, hitting the upstream issue:

    https://bugreports.qt.io/browse/QTBUG-72567

That has not yet been fixed upstream, and of the proposed patches, or
various suggestions in various Qt-related forums, none do fix the issue
either:
- patches in the PR itself
- https://codereview.qt-project.org/c/qt/qtbase/+/248270
- https://forum.qt.io/topic/88588/qtbase-compilation-error-with-device-linux-rasp-pi3-g-qeglfskmsgbmwindow-cpp/8
- https://forum.qt.io/topic/91596/raspberry-pi-3-compiling-qt-5-11-0-problem/6

So, I am at a loss at how to actually fix that further...

Still, here is a repsin with at least the changes I deemed necessary to reduce the problem-space. Any feedback or further guidance would be highly appreciated.

Regards,
Yann E. MORIN.

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Adam Duskett (3):
configs/beaglebone_qt5: switch to using KMS instead of wayland+weston package/ti-sgx-demos: use KMS-based demos package/ti-sgx-{km, um}: bump to SDK 06.01.00.08 versions

 Config.in.legacy                                   |  7 +++++
 board/beaglebone/readme.txt                        | 12 +++++++-
 .../rootfs_overlay/etc/qt5/eglfs_kms_cfg.json      | 15 ++++++++++
 configs/beaglebone_qt5_defconfig                   |  5 +---
 package/Config.in                                  |  1 -
 package/qt5/qt5base/qt5base.mk                     |  4 +--
 package/ti-sgx-demos/ti-sgx-demos.mk               |  2 +-
 package/ti-sgx-km/ti-sgx-km.hash                   |  4 +--
 package/ti-sgx-km/ti-sgx-km.mk                     |  4 +--
 .../0001-Add-missing-sys-sysmacros.h-include.patch | 25 -----------------
 package/ti-sgx-libgbm/Config.in                    | 12 --------
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash           |  3 --
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk             | 32 ----------------------
 package/ti-sgx-um/Config.in                        |  1 -
 package/ti-sgx-um/ti-sgx-um.hash                   |  4 +--
 package/ti-sgx-um/ti-sgx-um.mk                     |  4 +--
 16 files changed, 45 insertions(+), 90 deletions(-)
 create mode 100644 board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
 delete mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 delete mode 100644 package/ti-sgx-libgbm/Config.in
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 delete mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
Quoted 7 lines

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

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

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

cover package/ti-stgx: tentative bump (branch yem/ti-sgx-stuff)

Adam, All,

On 2020-12-12 11:06 +0100, Yann E. MORIN spake thusly:

Quoted 1 line

On 2020-12-11 12:19 -0800, Adam Duskett spake thusly:

[--SNIP--]

Quoted 2 lines
Quoted 2 lines

Yann, you will have to either include Markus' patch or find a different solution.

[--SNIP--]

Quoted 3 lines

However, I suspect this patch is very incorrect for anything else that does have the eglGetPlatformDisplayEXT extension, like most other GL implmentations such as mesa...

OK, so after another day hacking around this issue, I think I eventually nailed the reason why the upstream patch does not work. It is trying to cast the nativeDisplay (an int) into a quintptr (an unsigned int). And of course, this causes quite some grief to the compiler.

So, I have now two options:

1. tweak the upstream patch to use a qintptr (not a quintptr) so that it now reads something like:

- display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr);
+ qintptr nativeDisplayPtr = reinterpret_cast<qintptr>(nativeDisplay);
+ display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, reinterpret_cast<void *>(nativeDisplayPtr), nullptr);

2. take an even more direct and expeditious solution, to siply cast into a void*, like:

- display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr);
+ display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, reinterpret_cast<void *>(nativeDisplay), nullptr);

After all, nativeDisplay is just an opaque type; getPlatformDisplay() is just expected to pass that value to the lower-level layers that actually talk to the GL implementation. nativeDisplay is thus either a pointer already (which can be cast to a void* as the existing code already does), or it is an integer of some sort, which is supposed to also fit into a pointer.

Yeah, I know this is probably not true for some ABis, like x32, where pointers are 32-bit but ints are 64-bit. But Buildroot does not support x32 or the likes. Furthermore, getPlatformDisplay() anyway expects a void*, so it would never be able to accomodate such situations.

So, I would be highly tempted to go for solution 2: it is easy, works always, and it is no much more "meh" than the alternative...

Unless again I still missed something...

Regards,
Yann E. MORIN.

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