All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5
@ 2019-11-15 12:49 unixmania at gmail.com
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package unixmania at gmail.com
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: unixmania at gmail.com @ 2019-11-15 12:49 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <unixmania@gmail.com>

Fix some issues in Lothar's initial patch.
Add a patch dropping the custom post-image script.
Fix errors detected by check-package and Yann E. Morin.
Additional improvements.

Carlos Santos (1):
  configs/beaglebone_qt5: don't use custom post-image script

Lothar Felten (4):
  package/ti-sgx-libgbm: new package
  package/ti-sgx-{km,um,demos}: bump to latest TI version
  package/qt5/qt5base: support ti-sgx-libgbm
  configs/beaglebone_qt5: bump kernel and U-Boot, add weston

 DEVELOPERS                                    |  1 +
 ...ux-4.1-sgx.fragment => linux-sgx.fragment} |  1 +
 board/beaglebone/post-image.sh                | 29 ---------
 configs/beaglebone_qt5_defconfig              | 27 ++++----
 package/Config.in                             |  1 +
 package/qt5/qt5base/qt5base.mk                |  5 +-
 package/ti-sgx-demos/Config.in                |  2 +-
 package/ti-sgx-demos/ti-sgx-demos.hash        |  3 +-
 package/ti-sgx-demos/ti-sgx-demos.mk          |  9 +--
 package/ti-sgx-km/Config.in                   | 40 +-----------
 package/ti-sgx-km/ti-sgx-km.hash              |  3 +-
 package/ti-sgx-km/ti-sgx-km.mk                | 27 +++-----
 ...-Add-missing-sys-sysmacros.h-include.patch | 25 ++++++++
 package/ti-sgx-libgbm/Config.in               |  6 ++
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash      |  3 +
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk        | 40 ++++++++++++
 ...-Makefile-do-not-install-init-script.patch | 39 +++++++++++
 package/ti-sgx-um/Config.in                   |  5 +-
 package/ti-sgx-um/S80ti-sgx                   | 64 +++++++++++++++----
 package/ti-sgx-um/powervr.ini                 |  6 --
 package/ti-sgx-um/ti-sgx-um.hash              |  3 +-
 package/ti-sgx-um/ti-sgx-um.mk                | 24 ++++---
 22 files changed, 228 insertions(+), 135 deletions(-)
 rename board/beaglebone/{linux-4.1-sgx.fragment => linux-sgx.fragment} (92%)
 delete mode 100755 board/beaglebone/post-image.sh
 create mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 create mode 100644 package/ti-sgx-libgbm/Config.in
 create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
 create mode 100644 package/ti-sgx-um/0001-Makefile-do-not-install-init-script.patch
 delete mode 100644 package/ti-sgx-um/powervr.ini

-- 
2.18.1

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

* [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package
  2019-11-15 12:49 [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5 unixmania at gmail.com
@ 2019-11-15 12:49 ` unixmania at gmail.com
  2019-11-15 13:29   ` Yegor Yefremov
  2019-12-30 14:01   ` Thomas Petazzoni
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 2/5] package/ti-sgx-{km, um, demos}: bump to latest TI version unixmania at gmail.com
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: unixmania at gmail.com @ 2019-11-15 12:49 UTC (permalink / raw)
  To: buildroot

From: Lothar Felten <lothar.felten@gmail.com>

A custom ti version of libgbm for SGX graphics accelerator, required by
the binary libraries of the ti-sgx-um package.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
Changes v1->v2
- Fix SDK version (comment in ti-sgx-libgbm.mk)
- Remove duplicate package in package/ti-sgx/ti-sgx-libgbm
Changes v2->v3
- Add DEVELOPERS entry
- Re-generate patch to include sys/sysmacros.h using git format-patch
- Fix indentation and remove stray empty lines
- Extract license from gbm.h header instead of distributing the whole
  file. This is safe because if the terms change in the header the
  sha256 hash will stop matching.
- Use HTTP to clone the Git repository (works with an HTTP proxy, which
  is better when building behind a firewall that blocks the git port).
- Use AUTORECONF=YES instead of the running autogen.sh script.
- Use INSTALL_{STAGING,TARGET}_OPTS instead of custom install commands.
- Add home page to Config.in
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...-Add-missing-sys-sysmacros.h-include.patch | 25 ++++++++++++
 package/ti-sgx-libgbm/Config.in               |  6 +++
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash      |  3 ++
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk        | 40 +++++++++++++++++++
 6 files changed, 76 insertions(+)
 create mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
 create mode 100644 package/ti-sgx-libgbm/Config.in
 create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index c0863aabc6..f1f55e7bc5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1387,6 +1387,7 @@ N:	Lothar Felten <lothar.felten@gmail.com>
 F:	board/bananapi/bananapi-m2-ultra/
 F:	configs/bananapi_m2_ultra_defconfig
 F:	package/ti-sgx-demos/
+F:	package/ti-sgx-libgbm/
 F:	package/ti-sgx-km/
 F:	package/ti-sgx-um/
 
diff --git a/package/Config.in b/package/Config.in
index f72c77b416..0a0499421c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -541,6 +541,7 @@ endmenu
 	source "package/ti-sgx-demos/Config.in"
 	source "package/ti-sgx-km/Config.in"
 	source "package/ti-sgx-um/Config.in"
+	source "package/ti-sgx-libgbm/Config.in"
 	source "package/ti-uim/Config.in"
 	source "package/ti-utils/Config.in"
 	source "package/triggerhappy/Config.in"
diff --git a/package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch b/package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
new file mode 100644
index 0000000000..2863c93bed
--- /dev/null
+++ b/package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
@@ -0,0 +1,25 @@
+From e3a3f3655956265eb4f3b866d445a9d19e613594 Mon Sep 17 00:00:00 2001
+From: Lothar Felten <lothar.felten@gmail.com>
+Date: Thu, 14 Nov 2019 23:37:07 -0300
+Subject: [PATCH] Add missing sys/sysmacros.h include
+
+Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
+---
+ 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
+
diff --git a/package/ti-sgx-libgbm/Config.in b/package/ti-sgx-libgbm/Config.in
new file mode 100644
index 0000000000..33014b2ed3
--- /dev/null
+++ b/package/ti-sgx-libgbm/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+	bool "ti-sgx-libgbm"
+	help
+	  TI SGX libgbm variant
+
+	  https://git.ti.com/cgit/glsdk/libgbm
diff --git a/package/ti-sgx-libgbm/ti-sgx-libgbm.hash b/package/ti-sgx-libgbm/ti-sgx-libgbm.hash
new file mode 100644
index 0000000000..352e7583ab
--- /dev/null
+++ b/package/ti-sgx-libgbm/ti-sgx-libgbm.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 85e3eafcd06caccd8c4cea3081b1406ae51c07e19541ac19b9c33a5b41fec82d  ti-sgx-libgbm-c5ddc6a37bb78ac753b317b17d890d1f7338dea6.tar.gz
+sha256 3bda4bde25397a5329f9b9d9b138fc5aad165015d6cd62665ed372518903c7c7  license.txt
diff --git a/package/ti-sgx-libgbm/ti-sgx-libgbm.mk b/package/ti-sgx-libgbm/ti-sgx-libgbm.mk
new file mode 100644
index 0000000000..622aaa595f
--- /dev/null
+++ b/package/ti-sgx-libgbm/ti-sgx-libgbm.mk
@@ -0,0 +1,40 @@
+################################################################################
+#
+# 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 License
+TI_SGX_LIBGBM_LICENSE_FILES = license.txt
+TI_SGX_LIBGBM_INSTALL_STAGING = YES
+TI_SGX_LIBGBM_AUTORECONF = YES
+
+TI_SGX_LIBGBM_DEPENDENCIES = libdrm udev
+
+# Extract the license from the gbm.h header instead of distributing the whole
+# file. This is safe because if the terms change in the header the sha256 hash
+# will stop matching.
+define TI_SGX_LIBGBM_EXTRACT_LICENSE
+	head -n 26 $(@D)/gbm.h > $(@D)/license.txt
+endef
+TI_SGX_LIBGBM_POST_EXTRACT_HOOKS += TI_SGX_LIBGBM_EXTRACT_LICENSE
+
+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))
-- 
2.18.1

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

* [Buildroot] [PATCH/next v3 2/5] package/ti-sgx-{km, um, demos}: bump to latest TI version
  2019-11-15 12:49 [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5 unixmania at gmail.com
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package unixmania at gmail.com
@ 2019-11-15 12:49 ` unixmania at gmail.com
  2019-12-30 14:01   ` Thomas Petazzoni
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 3/5] package/qt5/qt5base: support ti-sgx-libgbm unixmania at gmail.com
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: unixmania at gmail.com @ 2019-11-15 12:49 UTC (permalink / raw)
  To: buildroot

From: Lothar Felten <lothar.felten@gmail.com>

ti-sgx-um

- Bump the version that matches TI SDK 06.00.00.07 plus one pull request
  that updates the EGL/GLES headers required to build qt5base.
- Rewrite the init script, following the current template and using the
  pvrsrvctl command (pvrsrvinit does not exit anymore).
- Remove powervr.ini, no longer used in the TI SDK.
- Select and add a dependency on wayland, or else packages that link to
  libEGL (e.g. cairo) fail to link due to a missing libwayland-server.
- Update license file name.

ti-sgx-demos

- Bump the version that matches TI SDK 06.00.00.07 plus one pull request
  (matching ti-sgx-um).

ti-sgx-km

- Bump the version that matches TI SDK 06.00.00.07.
- Remove stray empty lines.
- Fix license file path.

All packages

- Use HTTP to clone Git repositories.
- Update URL in Config.in files, pointing to cgit and using HTTPS.
- Add hashes for all license files.

The buildroot package only supports the target am335x. Support for other
boards can be added by adding menu entries to select the correct target
product.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
Changes v1->v2:
- Do not install the init script provided by TI.
- Bump ti-sgx-um for EGL/GLES headers for qt5base, or else it breaks:
  qeglfskmsgbmintegration.cpp: In member function ?virtual void* QEglFSKmsGbmIntegration::createDisplay(EGLNativeDisplayType)?:
  qeglfskmsgbmintegration.cpp:85:60: error: invalid conversion from ?EGLNativeDisplayType? {aka ?int?} to ?void*? [-fpermissive]
           display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr);
- Bump ti-sgx-demos to match ti-sgx-um
- Select/depend on wayland (or else packages depending on ti-sgx-um fail
  to build due to missing libwayland-server).
- Update the init script
- Update commit message
Changes v2->v3:
  - Use HTTP to clone Git repositories
  - Update URL in Config.in
  - Add hashes for all license files
  package/ti-sgx-km
  - Remove stray empty lines
  - Fix license file path
  package/ti-sgx-um
  - Update license file name
---
 package/ti-sgx-demos/Config.in                |  2 +-
 package/ti-sgx-demos/ti-sgx-demos.hash        |  3 +-
 package/ti-sgx-demos/ti-sgx-demos.mk          |  9 +--
 package/ti-sgx-km/Config.in                   | 40 +-----------
 package/ti-sgx-km/ti-sgx-km.hash              |  3 +-
 package/ti-sgx-km/ti-sgx-km.mk                | 27 +++-----
 ...-Makefile-do-not-install-init-script.patch | 39 +++++++++++
 package/ti-sgx-um/Config.in                   |  5 +-
 package/ti-sgx-um/S80ti-sgx                   | 64 +++++++++++++++----
 package/ti-sgx-um/powervr.ini                 |  6 --
 package/ti-sgx-um/ti-sgx-um.hash              |  3 +-
 package/ti-sgx-um/ti-sgx-um.mk                | 24 ++++---
 12 files changed, 131 insertions(+), 94 deletions(-)
 create mode 100644 package/ti-sgx-um/0001-Makefile-do-not-install-init-script.patch
 delete mode 100644 package/ti-sgx-um/powervr.ini

diff --git a/package/ti-sgx-demos/Config.in b/package/ti-sgx-demos/Config.in
index ea06fdb3ad..ec7b8e6038 100644
--- a/package/ti-sgx-demos/Config.in
+++ b/package/ti-sgx-demos/Config.in
@@ -6,4 +6,4 @@ config BR2_PACKAGE_TI_SGX_DEMOS
 	  Technologies are availabe as binaries only.  The binaries
 	  are compiled for the TI SGX implementation.
 
-	  http://git.ti.com/graphics/img-pvr-sdk
+	  https://git.ti.com/cgit/graphics/img-pvr-sdk
diff --git a/package/ti-sgx-demos/ti-sgx-demos.hash b/package/ti-sgx-demos/ti-sgx-demos.hash
index 43acf9102a..31044e9e3f 100644
--- a/package/ti-sgx-demos/ti-sgx-demos.hash
+++ b/package/ti-sgx-demos/ti-sgx-demos.hash
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256 9d1d4da2c2b35303e239f99eb4003b8b206078a682aa083d5fb831ee4197f3bf ti-sgx-demos-f24650bc8243b25c23d6a0a502ed79fc472ac424.tar.gz
+sha256 1324115da376bc8108923c596a3c4d8df24a968395461df11e0b715764a942d4  ti-sgx-demos-bb8b74cdd1323e76697b3eb2258f863b15fee287.tar.gz
+sha256 052741ea66a4a48e0ef8cab259d2dc136e7cf52fda694af8d1fe9bd28abe333b  LegalNotice.txt
diff --git a/package/ti-sgx-demos/ti-sgx-demos.mk b/package/ti-sgx-demos/ti-sgx-demos.mk
index 80af79b983..8599e88e9b 100644
--- a/package/ti-sgx-demos/ti-sgx-demos.mk
+++ b/package/ti-sgx-demos/ti-sgx-demos.mk
@@ -4,14 +4,15 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 02.00.00.00
-TI_SGX_DEMOS_VERSION = f24650bc8243b25c23d6a0a502ed79fc472ac424
-TI_SGX_DEMOS_SITE = git://git.ti.com/graphics/img-pvr-sdk.git
+# This correpsonds to SDK 06.00.00.07 plus one pull request
+TI_SGX_DEMOS_VERSION = bb8b74cdd1323e76697b3eb2258f863b15fee287
+TI_SGX_DEMOS_SITE = http://git.ti.com/git/graphics/img-pvr-sdk.git
+TI_SGX_DEMOS_SITE_METHOD = git
 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/Examples/Advanced/OGLES* \
+	cp -dpfr $(@D)/targetfs/arm/Examples/Advanced/Wayland/OGLES* \
 		$(TARGET_DIR)/usr/bin/
 endef
 
diff --git a/package/ti-sgx-km/Config.in b/package/ti-sgx-km/Config.in
index 348efdeb82..964889ff40 100644
--- a/package/ti-sgx-km/Config.in
+++ b/package/ti-sgx-km/Config.in
@@ -8,46 +8,10 @@ config BR2_PACKAGE_TI_SGX_KM
 	select BR2_LINUX_NEEDS_MODULES
 	help
 	  Kernel modules for TI CPUs with SGX GPU.
-	  This package supports AM335x, AM437x, AM4430 and AM5430.
+	  This package supports AM335x only.
 	  It builds the kernel module and the user space binaries.
 	  For older CPUs or kernels use the ti-gfx package.
 
 	  Note: it needs a TI specific kernel to build properly.
 
-	  http://git.ti.com/graphics/omap5-sgx-ddk-linux
-
-if BR2_PACKAGE_TI_SGX_KM
-
-choice
-	prompt "Target"
-	default BR2_PACKAGE_TI_SGX_KM_AM335X if BR2_PACKAGE_TI_SGX_AM335X # legacy
-	default BR2_PACKAGE_TI_SGX_KM_AM437X if BR2_PACKAGE_TI_SGX_AM437X # legacy
-	default BR2_PACKAGE_TI_SGX_KM_AM4430 if BR2_PACKAGE_TI_SGX_AM4430 # legacy
-	default BR2_PACKAGE_TI_SGX_KM_AM5430 if BR2_PACKAGE_TI_SGX_AM5430 # legacy
-	default BR2_PACKAGE_TI_SGX_KM_AM335X
-	help
-	  Select the SOC for which you would like to install drivers.
-
-config BR2_PACKAGE_TI_SGX_KM_AM335X
-	bool "AM335x"
-	help
-	  AM335x CPU
-
-config BR2_PACKAGE_TI_SGX_KM_AM437X
-	bool "AM437x"
-	help
-	  AM437x CPU
-
-config BR2_PACKAGE_TI_SGX_KM_AM4430
-	bool "AM4430"
-	help
-	  AM4430 CPU
-
-config BR2_PACKAGE_TI_SGX_KM_AM5430
-	bool "AM5430"
-	help
-	  AM5430 CPU
-
-endchoice
-
-endif
+	  https://git.ti.com/cgit/graphics/omap5-sgx-ddk-linux
diff --git a/package/ti-sgx-km/ti-sgx-km.hash b/package/ti-sgx-km/ti-sgx-km.hash
index 7f7e0acd4d..1fd07d7467 100644
--- a/package/ti-sgx-km/ti-sgx-km.hash
+++ b/package/ti-sgx-km/ti-sgx-km.hash
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256 47728ff8fc48827116cc042efa777a22a83dd4bd17c494e2a53b8c204ca59624 ti-sgx-km-2b7523d07a13ab704a24a7664749551f4a13ed32.tar.gz
+sha256 f1505f38f9e82f958673bb1755e65090bdbc513a68d41640561d9d491bc4b0e3  ti-sgx-km-4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d.tar.gz
+sha256 e9d660547691b2a9232850fd43aac16d40fd063023166fd27162020c30dc2bd4  eurasia_km/GPL-COPYING
diff --git a/package/ti-sgx-km/ti-sgx-km.mk b/package/ti-sgx-km/ti-sgx-km.mk
index 0e1bc33902..ae294c300a 100644
--- a/package/ti-sgx-km/ti-sgx-km.mk
+++ b/package/ti-sgx-km/ti-sgx-km.mk
@@ -4,30 +4,23 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 02.00.00.00
-TI_SGX_KM_VERSION = 2b7523d07a13ab704a24a7664749551f4a13ed32
-TI_SGX_KM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-linux.git
+# This correpsonds to SDK 06.00.00.07
+TI_SGX_KM_VERSION = 4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d
+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
-TI_SGX_KM_LICENSE_FILES = GPL-COPYING
+TI_SGX_KM_LICENSE_FILES = eurasia_km/GPL-COPYING
 
 TI_SGX_KM_DEPENDENCIES = linux
 
 TI_SGX_KM_MAKE_OPTS = \
 	$(LINUX_MAKE_FLAGS) \
 	KERNELDIR=$(LINUX_DIR) \
-	PVR_NULLDRM=1
-
-ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM335X),y)
-TI_SGX_KM_PLATFORM_NAME = omap335x
-else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM437X),y)
-TI_SGX_KM_PLATFORM_NAME = omap437x
-else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM4430),y)
-TI_SGX_KM_PLATFORM_NAME = omap4430
-else ifeq ($(BR2_PACKAGE_TI_SGX_KM_5430),y)
-TI_SGX_KM_PLATFORM_NAME = omap5430
-endif
-
-TI_SGX_KM_SUBDIR = eurasia_km/eurasiacon/build/linux2/$(TI_SGX_KM_PLATFORM_NAME)_linux
+	TARGET_PRODUCT=$(TI_SGX_KM_PLATFORM_NAME)
+
+TI_SGX_KM_PLATFORM_NAME = ti335x
+
+TI_SGX_KM_SUBDIR = eurasia_km/eurasiacon/build/linux2/omap_linux
 
 define TI_SGX_KM_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
diff --git a/package/ti-sgx-um/0001-Makefile-do-not-install-init-script.patch b/package/ti-sgx-um/0001-Makefile-do-not-install-init-script.patch
new file mode 100644
index 0000000000..7509d4ef9d
--- /dev/null
+++ b/package/ti-sgx-um/0001-Makefile-do-not-install-init-script.patch
@@ -0,0 +1,39 @@
+From afb92e4b1cd05388f519868215d0e8a4672ebb0e Mon Sep 17 00:00:00 2001
+From: Carlos Santos <unixmania@gmail.com>
+Date: Sun, 10 Nov 2019 22:44:44 -0300
+Subject: [PATCH] Makefile: do not install init script
+
+Use a custom one, made for Buildroot, instead.
+
+Signed-off-by: Carlos Santos <unixmania@gmail.com>
+---
+ Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 649111a..19016f3 100755
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,6 @@ TARGET_PRODUCT ?= jacinto6evm
+ SRCDIR = ./targetfs/${TARGET_PRODUCT}
+ 
+ prefix = /usr
+-etcdir = /etc
+ bindir = ${prefix}/bin
+ incdir = ${prefix}/include
+ libdir = ${prefix}/lib
+@@ -11,11 +10,9 @@ libdir = ${prefix}/lib
+ all:
+ 
+ install: 
+-	mkdir -p ${DESTDIR}${etcdir}
+ 	mkdir -p ${DESTDIR}${bindir}
+ 	mkdir -p ${DESTDIR}${incdir}
+ 	mkdir -p ${DESTDIR}${libdir}
+-	cp -ar ${SRCDIR}/etc/* ${DESTDIR}${etcdir}
+ 	cp -ar ${SRCDIR}/bin/* ${DESTDIR}${bindir}
+ 	cp -ar ${SRCDIR}/include/* ${DESTDIR}${incdir}
+ 	cp -ar ${SRCDIR}/lib/* ${DESTDIR}${libdir}
+-- 
+2.18.1
+
diff --git a/package/ti-sgx-um/Config.in b/package/ti-sgx-um/Config.in
index 8e1e4fb270..2da3f5f019 100644
--- a/package/ti-sgx-um/Config.in
+++ b/package/ti-sgx-um/Config.in
@@ -15,12 +15,15 @@ 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
 	  Graphics libraries for TI CPUs with SGX5xx GPU.
 	  This package supports AM335x, AM437x, AM4430 and AM5430.
 	  For older CPUs or kernels use the ti-gfx package.
 
-	  http://git.ti.com/graphics/omap5-sgx-ddk-um-linux
+	  https://git.ti.com/cgit/graphics/omap5-sgx-ddk-um-linux
 
 if BR2_PACKAGE_TI_SGX_UM
 
diff --git a/package/ti-sgx-um/S80ti-sgx b/package/ti-sgx-um/S80ti-sgx
index 8cae52fd6e..2630a0576a 100644
--- a/package/ti-sgx-um/S80ti-sgx
+++ b/package/ti-sgx-um/S80ti-sgx
@@ -1,14 +1,56 @@
 #!/bin/sh
+
+pvrsrvkm_ko="/lib/modules/$(/bin/uname -r)/extra/pvrsrvkm.ko"
+
+pvr_loaded() {
+	/sbin/lsmod | /bin/grep -q '^\<pvrsrvkm\>'
+}
+
+pvr_load() {
+	/sbin/insmod "$pvrsrvkm_ko" > /dev/null 2>&1
+}
+
+start() {
+	printf 'Loading pvrsrvkm module: '
+	pvr_loaded || pvr_load
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		printf 'Starting PowerVR services: '
+		/usr/bin/pvrsrvctl --start --no-module > /dev/null 2>&1
+		status=$?
+	fi
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+	printf 'Starting PowerVR services: '
+	/usr/bin/pvrsrvctl --stop > /dev/null 2>&1
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+restart() {
+	stop
+	sleep 1
+	start
+}
+
 case "$1" in
-  start)
-	printf "Initializing SGX graphics driver "
-	/usr/bin/pvrsrvinit
-	[ $? = 0 ] && echo "OK" || echo "FAIL"
-  ;;
-  stop)
-  ;;
-  *)
-    echo "Usage: $0 {start|stop}"
-    exit 1
-  ;;
+	start|stop|restart)
+		"$1";;
+	reload)
+		restart;;
+	*)
+		echo "Usage: $0 {start|stop|restart|reload}"
+		exit 1
 esac
diff --git a/package/ti-sgx-um/powervr.ini b/package/ti-sgx-um/powervr.ini
deleted file mode 100644
index fc92d45d50..0000000000
--- a/package/ti-sgx-um/powervr.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[default]
-#defaul library without double buffering:
-WindowSystem=libpvrDRMWSEGL_FRONT.so
-#alternative library, slower but with double buffering
-#WindowSystem=libpvrDRMWSEGL.so
-DisableHWTQTextureUpload=1
diff --git a/package/ti-sgx-um/ti-sgx-um.hash b/package/ti-sgx-um/ti-sgx-um.hash
index a6a0566469..ff54ecbd6d 100644
--- a/package/ti-sgx-um/ti-sgx-um.hash
+++ b/package/ti-sgx-um/ti-sgx-um.hash
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256 c17f23d255cff8fe72fc3f5cae3d7550e387af07d036954b4f08e573379406d0 ti-sgx-um-e15f1543bab4de9e8927a2c4934addf3fd16ffcb.tar.gz
+sha256 cb1373a6335af3d3741c6b11cf217afc8bdbe182642229df359c38e3ccfc5866  ti-sgx-um-2a2e5bb090ced870d73ed4edbc54793e952cc6d8.tar.gz
+sha256 368c306246c9130b5c90a6fef2f80085f70b6225b3f552654a288c0f39fc1531  TI-Linux-Graphics-DDK-UM-Manifest.doc
diff --git a/package/ti-sgx-um/ti-sgx-um.mk b/package/ti-sgx-um/ti-sgx-um.mk
index d5c50a0166..0e26d057c1 100644
--- a/package/ti-sgx-um/ti-sgx-um.mk
+++ b/package/ti-sgx-um/ti-sgx-um.mk
@@ -4,28 +4,26 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 02.00.00.00
-TI_SGX_UM_VERSION = e15f1543bab4de9e8927a2c4934addf3fd16ffcb
-TI_SGX_UM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git
+# This correpsonds to SDK 06.00.00.07 plus one pull request
+TI_SGX_UM_VERSION = 2a2e5bb090ced870d73ed4edbc54793e952cc6d8
+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
-TI_SGX_UM_LICENSE_FILES = OMAP5-Linux-Graphics-DDK-UM-Manifest.doc
+TI_SGX_UM_LICENSE_FILES = TI-Linux-Graphics-DDK-UM-Manifest.doc
 TI_SGX_UM_INSTALL_STAGING = YES
+TI_SGX_UM_TARGET=ti335x
 
 # ti-sgx-um is a egl/gles provider only if libdrm is installed
-TI_SGX_UM_DEPENDENCIES = libdrm
+TI_SGX_UM_DEPENDENCIES = libdrm wayland
 
 define TI_SGX_UM_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(STAGING_DIR) install
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(STAGING_DIR) \
+		TARGET_PRODUCT=$(TI_SGX_UM_TARGET) install
 endef
 
 define TI_SGX_UM_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(TARGET_DIR) install
-endef
-
-# libs use the following file for configuration
-define TI_SGX_UM_INSTALL_CONF
-	$(INSTALL) -D -m 0644 package/ti-sgx-um/powervr.ini \
-		$(TARGET_DIR)/etc/powervr.ini
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(TARGET_DIR) \
+		TARGET_PRODUCT=$(TI_SGX_UM_TARGET) install
 endef
 
 TI_SGX_UM_POST_INSTALL_TARGET_HOOKS += TI_SGX_UM_INSTALL_CONF
-- 
2.18.1

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

* [Buildroot] [PATCH/next v3 3/5] package/qt5/qt5base: support ti-sgx-libgbm
  2019-11-15 12:49 [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5 unixmania at gmail.com
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package unixmania at gmail.com
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 2/5] package/ti-sgx-{km, um, demos}: bump to latest TI version unixmania at gmail.com
@ 2019-11-15 12:49 ` unixmania at gmail.com
  2019-12-30 14:01   ` Thomas Petazzoni
  2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 4/5] configs/beaglebone_qt5: bump kernel and U-Boot, add weston unixmania at gmail.com
  2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 5/5] configs/beaglebone_qt5: don't use custom post-image script unixmania at gmail.com
  4 siblings, 1 reply; 13+ messages in thread
From: unixmania at gmail.com @ 2019-11-15 12:49 UTC (permalink / raw)
  To: buildroot

From: Lothar Felten <lothar.felten@gmail.com>

qt5 configure options: add ti-sgx-libgbm as GBM backend

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/qt5/qt5base/qt5base.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 15c9650391..6b89358521 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -74,10 +74,13 @@ else
 QT5BASE_CONFIGURE_OPTS += -no-kms
 endif
 
-# Uses libgbm from mesa3d
+# Uses libgbm from mesa3d or ti-sgx-libgbm
 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
 QT5BASE_CONFIGURE_OPTS += -gbm
 QT5BASE_DEPENDENCIES += mesa3d
+else ifeq ($(BR2_PACKAGE_TI_SGX_LIBGBM),y)
+QT5BASE_CONFIGURE_OPTS += -gbm
+QT5BASE_DEPENDENCIES += ti-sgx-libgbm
 else
 QT5BASE_CONFIGURE_OPTS += -no-gbm
 endif
-- 
2.18.1

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

* [Buildroot] [PATCH/next v3 4/5] configs/beaglebone_qt5: bump kernel and U-Boot, add weston
  2019-11-15 12:49 [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5 unixmania at gmail.com
                   ` (2 preceding siblings ...)
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 3/5] package/qt5/qt5base: support ti-sgx-libgbm unixmania at gmail.com
@ 2019-11-15 12:50 ` unixmania at gmail.com
  2019-12-30 14:01   ` Thomas Petazzoni
  2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 5/5] configs/beaglebone_qt5: don't use custom post-image script unixmania at gmail.com
  4 siblings, 1 reply; 13+ messages in thread
From: unixmania at gmail.com @ 2019-11-15 12:50 UTC (permalink / raw)
  To: buildroot

From: Lothar Felten <lothar.felten@gmail.com>

- Use the same kernel repository and version as configs/beaglebone
- Rename kernel fragment file
- Update U-Boot to 2019.07
- Select weston and qt5wayland
- Select host-uboot-tools with FIT support, required to create the
  images.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
Changes v1->v2:
- Switch kernel source URL to BeagleBoard repository
- Select host-uboot-tools
- Update commit message
---
 ...ux-4.1-sgx.fragment => linux-sgx.fragment} |  1 +
 configs/beaglebone_qt5_defconfig              | 23 +++++++++++--------
 2 files changed, 14 insertions(+), 10 deletions(-)
 rename board/beaglebone/{linux-4.1-sgx.fragment => linux-sgx.fragment} (92%)

diff --git a/board/beaglebone/linux-4.1-sgx.fragment b/board/beaglebone/linux-sgx.fragment
similarity index 92%
rename from board/beaglebone/linux-4.1-sgx.fragment
rename to board/beaglebone/linux-sgx.fragment
index c0d2e7b28a..58d46f588b 100644
--- a/board/beaglebone/linux-4.1-sgx.fragment
+++ b/board/beaglebone/linux-sgx.fragment
@@ -10,3 +10,4 @@ CONFIG_DRM_OMAP_WB_M2M=y
 CONFIG_DRM_TILCDC=y
 CONFIG_DRM_I2C_NXP_TDA998X=y
 CONFIG_DRM=y
+CONFIG_DRM_LEGACY=y
diff --git a/configs/beaglebone_qt5_defconfig b/configs/beaglebone_qt5_defconfig
index fb61bf54df..4a558c9ad4 100644
--- a/configs/beaglebone_qt5_defconfig
+++ b/configs/beaglebone_qt5_defconfig
@@ -1,36 +1,37 @@
 BR2_arm=y
 BR2_cortex_a8=y
 BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y
 BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
-BR2_GCC_VERSION_5_X=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
 BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="52c4aa7cdb93d61f8008f380135beaf7b8fa6593"
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,4.19.79-ti-r30)/linux-4.19.79-ti-r30.tar.gz"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/linux-4.1-sgx.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/linux-sgx.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-evmsk"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk am335x-boneblue"
 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_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
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
-BR2_TARGET_ROOTFS_EXT2_SIZE="124M"
+BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
@@ -42,3 +43,5 @@ BR2_TARGET_UBOOT_SPL_NAME="MLO"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
-- 
2.18.1

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

* [Buildroot] [PATCH/next v3 5/5] configs/beaglebone_qt5: don't use custom post-image script
  2019-11-15 12:49 [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5 unixmania at gmail.com
                   ` (3 preceding siblings ...)
  2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 4/5] configs/beaglebone_qt5: bump kernel and U-Boot, add weston unixmania at gmail.com
@ 2019-11-15 12:50 ` unixmania at gmail.com
  2019-12-30 14:01   ` Thomas Petazzoni
  4 siblings, 1 reply; 13+ messages in thread
From: unixmania at gmail.com @ 2019-11-15 12:50 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <unixmania@gmail.com>

Use support/scripts/genimage.sh, instead, which prevents duplicating
TARGET_DIR under ${BUILD_DIR}/genimage.tmp/root.

Use a post-build script to copy uEnv.txt to BINARIES_DIR, as made for
beaglebone.

Drop the post-image script.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
 board/beaglebone/post-image.sh   | 29 -----------------------------
 configs/beaglebone_qt5_defconfig |  4 +++-
 2 files changed, 3 insertions(+), 30 deletions(-)
 delete mode 100755 board/beaglebone/post-image.sh

diff --git a/board/beaglebone/post-image.sh b/board/beaglebone/post-image.sh
deleted file mode 100755
index 68fe0896c6..0000000000
--- a/board/beaglebone/post-image.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# post-image.sh for CircuitCo BeagleBone and TI am335x-evm
-# 2014, Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
-# 2016, Lothar Felten <lothar.felten@gmail.com>
-
-BOARD_DIR="$(dirname $0)"
-
-# copy the uEnv.txt to the output/images directory
-cp board/beaglebone/uEnv.txt $BINARIES_DIR/uEnv.txt
-
-# the 4.1 kernel does not provide a dtb for beaglebone green, so we
-# use a different genimage config if am335x-bonegreen.dtb is not
-# built:
-if [ -e ${BINARIES_DIR}/am335x-bonegreen.dtb ] ; then
-	GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-else
-	GENIMAGE_CFG="${BOARD_DIR}/genimage_linux41.cfg"
-fi
-
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-    --rootpath "${TARGET_DIR}" \
-    --tmppath "${GENIMAGE_TMP}" \
-    --inputpath "${BINARIES_DIR}" \
-    --outputpath "${BINARIES_DIR}" \
-    --config "${GENIMAGE_CFG}"
diff --git a/configs/beaglebone_qt5_defconfig b/configs/beaglebone_qt5_defconfig
index 4a558c9ad4..99355e855c 100644
--- a/configs/beaglebone_qt5_defconfig
+++ b/configs/beaglebone_qt5_defconfig
@@ -5,7 +5,9 @@ BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/beaglebone/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beaglebone/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,4.19.79-ti-r30)/linux-4.19.79-ti-r30.tar.gz"
-- 
2.18.1

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

* [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package unixmania at gmail.com
@ 2019-11-15 13:29   ` Yegor Yefremov
  2019-12-30 14:01   ` Thomas Petazzoni
  1 sibling, 0 replies; 13+ messages in thread
From: Yegor Yefremov @ 2019-11-15 13:29 UTC (permalink / raw)
  To: buildroot

Hi Carlos,

On Fri, Nov 15, 2019 at 1:51 PM <unixmania@gmail.com> wrote:
>
> From: Lothar Felten <lothar.felten@gmail.com>
>
> A custom ti version of libgbm for SGX graphics accelerator, required by
> the binary libraries of the ti-sgx-um package.
>
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
> Changes v1->v2
> - Fix SDK version (comment in ti-sgx-libgbm.mk)
> - Remove duplicate package in package/ti-sgx/ti-sgx-libgbm
> Changes v2->v3
> - Add DEVELOPERS entry
> - Re-generate patch to include sys/sysmacros.h using git format-patch
> - Fix indentation and remove stray empty lines
> - Extract license from gbm.h header instead of distributing the whole
>   file. This is safe because if the terms change in the header the
>   sha256 hash will stop matching.
> - Use HTTP to clone the Git repository (works with an HTTP proxy, which
>   is better when building behind a firewall that blocks the git port).
> - Use AUTORECONF=YES instead of the running autogen.sh script.
> - Use INSTALL_{STAGING,TARGET}_OPTS instead of custom install commands.
> - Add home page to Config.in
> ---
>  DEVELOPERS                                    |  1 +
>  package/Config.in                             |  1 +
>  ...-Add-missing-sys-sysmacros.h-include.patch | 25 ++++++++++++
>  package/ti-sgx-libgbm/Config.in               |  6 +++
>  package/ti-sgx-libgbm/ti-sgx-libgbm.hash      |  3 ++
>  package/ti-sgx-libgbm/ti-sgx-libgbm.mk        | 40 +++++++++++++++++++
>  6 files changed, 76 insertions(+)
>  create mode 100644 package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
>  create mode 100644 package/ti-sgx-libgbm/Config.in
>  create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
>  create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index c0863aabc6..f1f55e7bc5 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1387,6 +1387,7 @@ N:        Lothar Felten <lothar.felten@gmail.com>
>  F:     board/bananapi/bananapi-m2-ultra/
>  F:     configs/bananapi_m2_ultra_defconfig
>  F:     package/ti-sgx-demos/
> +F:     package/ti-sgx-libgbm/
>  F:     package/ti-sgx-km/
>  F:     package/ti-sgx-um/
>
> diff --git a/package/Config.in b/package/Config.in
> index f72c77b416..0a0499421c 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -541,6 +541,7 @@ endmenu
>         source "package/ti-sgx-demos/Config.in"
>         source "package/ti-sgx-km/Config.in"
>         source "package/ti-sgx-um/Config.in"
> +       source "package/ti-sgx-libgbm/Config.in"
>         source "package/ti-uim/Config.in"
>         source "package/ti-utils/Config.in"
>         source "package/triggerhappy/Config.in"
> diff --git a/package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch b/package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
> new file mode 100644
> index 0000000000..2863c93bed
> --- /dev/null
> +++ b/package/ti-sgx-libgbm/0001-Add-missing-sys-sysmacros.h-include.patch
> @@ -0,0 +1,25 @@
> +From e3a3f3655956265eb4f3b866d445a9d19e613594 Mon Sep 17 00:00:00 2001
> +From: Lothar Felten <lothar.felten@gmail.com>
> +Date: Thu, 14 Nov 2019 23:37:07 -0300
> +Subject: [PATCH] Add missing sys/sysmacros.h include
> +
> +Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
> +---
> + 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
> +
> diff --git a/package/ti-sgx-libgbm/Config.in b/package/ti-sgx-libgbm/Config.in
> new file mode 100644
> index 0000000000..33014b2ed3
> --- /dev/null
> +++ b/package/ti-sgx-libgbm/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_TI_SGX_LIBGBM
> +       bool "ti-sgx-libgbm"
> +       help
> +         TI SGX libgbm variant

'.' is missing at the end of the package description.

> +
> +         https://git.ti.com/cgit/glsdk/libgbm
> diff --git a/package/ti-sgx-libgbm/ti-sgx-libgbm.hash b/package/ti-sgx-libgbm/ti-sgx-libgbm.hash
> new file mode 100644
> index 0000000000..352e7583ab
> --- /dev/null
> +++ b/package/ti-sgx-libgbm/ti-sgx-libgbm.hash
> @@ -0,0 +1,3 @@
> +# Locally computed:
> +sha256 85e3eafcd06caccd8c4cea3081b1406ae51c07e19541ac19b9c33a5b41fec82d  ti-sgx-libgbm-c5ddc6a37bb78ac753b317b17d890d1f7338dea6.tar.gz
> +sha256 3bda4bde25397a5329f9b9d9b138fc5aad165015d6cd62665ed372518903c7c7  license.txt
> diff --git a/package/ti-sgx-libgbm/ti-sgx-libgbm.mk b/package/ti-sgx-libgbm/ti-sgx-libgbm.mk
> new file mode 100644
> index 0000000000..622aaa595f
> --- /dev/null
> +++ b/package/ti-sgx-libgbm/ti-sgx-libgbm.mk
> @@ -0,0 +1,40 @@
> +################################################################################
> +#
> +# 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 License

s/MIT License/MIT

Yegor

> +TI_SGX_LIBGBM_LICENSE_FILES = license.txt
> +TI_SGX_LIBGBM_INSTALL_STAGING = YES
> +TI_SGX_LIBGBM_AUTORECONF = YES
> +
> +TI_SGX_LIBGBM_DEPENDENCIES = libdrm udev
> +
> +# Extract the license from the gbm.h header instead of distributing the whole
> +# file. This is safe because if the terms change in the header the sha256 hash
> +# will stop matching.
> +define TI_SGX_LIBGBM_EXTRACT_LICENSE
> +       head -n 26 $(@D)/gbm.h > $(@D)/license.txt
> +endef
> +TI_SGX_LIBGBM_POST_EXTRACT_HOOKS += TI_SGX_LIBGBM_EXTRACT_LICENSE
> +
> +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))
> --
> 2.18.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package unixmania at gmail.com
  2019-11-15 13:29   ` Yegor Yefremov
@ 2019-12-30 14:01   ` Thomas Petazzoni
  2020-01-21 12:07     ` Einar Jón
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-30 14:01 UTC (permalink / raw)
  To: buildroot

On Fri, 15 Nov 2019 09:49:57 -0300
unixmania at gmail.com wrote:

> diff --git a/package/Config.in b/package/Config.in
> index f72c77b416..0a0499421c 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -541,6 +541,7 @@ endmenu
>  	source "package/ti-sgx-demos/Config.in"
>  	source "package/ti-sgx-km/Config.in"
>  	source "package/ti-sgx-um/Config.in"
> +	source "package/ti-sgx-libgbm/Config.in"

Alphabetic ordering here was not good (reported by check-package).

> diff --git a/package/ti-sgx-libgbm/Config.in b/package/ti-sgx-libgbm/Config.in
> new file mode 100644
> index 0000000000..33014b2ed3
> --- /dev/null
> +++ b/package/ti-sgx-libgbm/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_TI_SGX_LIBGBM
> +	bool "ti-sgx-libgbm"

Missing:

        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on BR2_PACKAGE_HAS_UDEV
        select BR2_PACKAGE_LIBDRM

to follow the dependencies of the .mk file.

> +# Extract the license from the gbm.h header instead of distributing the whole
> +# file. This is safe because if the terms change in the header the sha256 hash
> +# will stop matching.
> +define TI_SGX_LIBGBM_EXTRACT_LICENSE
> +	head -n 26 $(@D)/gbm.h > $(@D)/license.txt
> +endef
> +TI_SGX_LIBGBM_POST_EXTRACT_HOOKS += TI_SGX_LIBGBM_EXTRACT_LICENSE

I've used the complete gbm.h as license file. We already use full
source files as license files in other packages, it's simple enough,
and this gbm.h is unlikely to ever change anyway.

I've also taken into account the comments from Yegor, and applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH/next v3 2/5] package/ti-sgx-{km, um, demos}: bump to latest TI version
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 2/5] package/ti-sgx-{km, um, demos}: bump to latest TI version unixmania at gmail.com
@ 2019-12-30 14:01   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-30 14:01 UTC (permalink / raw)
  To: buildroot

On Fri, 15 Nov 2019 09:49:58 -0300
unixmania at gmail.com wrote:

> From: Lothar Felten <lothar.felten@gmail.com>
> 
> ti-sgx-um
> 
> - Bump the version that matches TI SDK 06.00.00.07 plus one pull request
>   that updates the EGL/GLES headers required to build qt5base.
> - Rewrite the init script, following the current template and using the
>   pvrsrvctl command (pvrsrvinit does not exit anymore).
> - Remove powervr.ini, no longer used in the TI SDK.
> - Select and add a dependency on wayland, or else packages that link to
>   libEGL (e.g. cairo) fail to link due to a missing libwayland-server.
> - Update license file name.
> 
> ti-sgx-demos
> 
> - Bump the version that matches TI SDK 06.00.00.07 plus one pull request
>   (matching ti-sgx-um).
> 
> ti-sgx-km
> 
> - Bump the version that matches TI SDK 06.00.00.07.
> - Remove stray empty lines.
> - Fix license file path.
> 
> All packages
> 
> - Use HTTP to clone Git repositories.
> - Update URL in Config.in files, pointing to cgit and using HTTPS.
> - Add hashes for all license files.
> 
> The buildroot package only supports the target am335x. Support for other
> boards can be added by adding menu entries to select the correct target
> product.
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>

I had to propagate the udev dependency from ti-sgx-libgbm, and then
applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH/next v3 3/5] package/qt5/qt5base: support ti-sgx-libgbm
  2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 3/5] package/qt5/qt5base: support ti-sgx-libgbm unixmania at gmail.com
@ 2019-12-30 14:01   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-30 14:01 UTC (permalink / raw)
  To: buildroot

On Fri, 15 Nov 2019 09:49:59 -0300
unixmania at gmail.com wrote:

> From: Lothar Felten <lothar.felten@gmail.com>
> 
> qt5 configure options: add ti-sgx-libgbm as GBM backend
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
> ---
>  package/qt5/qt5base/qt5base.mk | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH/next v3 4/5] configs/beaglebone_qt5: bump kernel and U-Boot, add weston
  2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 4/5] configs/beaglebone_qt5: bump kernel and U-Boot, add weston unixmania at gmail.com
@ 2019-12-30 14:01   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-30 14:01 UTC (permalink / raw)
  To: buildroot

On Fri, 15 Nov 2019 09:50:00 -0300
unixmania at gmail.com wrote:

> From: Lothar Felten <lothar.felten@gmail.com>
> 
> - Use the same kernel repository and version as configs/beaglebone
> - Rename kernel fragment file
> - Update U-Boot to 2019.07
> - Select weston and qt5wayland
> - Select host-uboot-tools with FIT support, required to create the
>   images.
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
> Changes v1->v2:
> - Switch kernel source URL to BeagleBoard repository
> - Select host-uboot-tools
> - Update commit message
> ---
>  ...ux-4.1-sgx.fragment => linux-sgx.fragment} |  1 +
>  configs/beaglebone_qt5_defconfig              | 23 +++++++++++--------
>  2 files changed, 14 insertions(+), 10 deletions(-)
>  rename board/beaglebone/{linux-4.1-sgx.fragment => linux-sgx.fragment} (92%)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH/next v3 5/5] configs/beaglebone_qt5: don't use custom post-image script
  2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 5/5] configs/beaglebone_qt5: don't use custom post-image script unixmania at gmail.com
@ 2019-12-30 14:01   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2019-12-30 14:01 UTC (permalink / raw)
  To: buildroot

On Fri, 15 Nov 2019 09:50:01 -0300
unixmania at gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
> 
> Use support/scripts/genimage.sh, instead, which prevents duplicating
> TARGET_DIR under ${BUILD_DIR}/genimage.tmp/root.
> 
> Use a post-build script to copy uEnv.txt to BINARIES_DIR, as made for
> beaglebone.
> 
> Drop the post-image script.
> 
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
>  board/beaglebone/post-image.sh   | 29 -----------------------------
>  configs/beaglebone_qt5_defconfig |  4 +++-
>  2 files changed, 3 insertions(+), 30 deletions(-)
>  delete mode 100755 board/beaglebone/post-image.sh

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package
  2019-12-30 14:01   ` Thomas Petazzoni
@ 2020-01-21 12:07     ` Einar Jón
  0 siblings, 0 replies; 13+ messages in thread
From: Einar Jón @ 2020-01-21 12:07 UTC (permalink / raw)
  To: buildroot

Hello Lothar

Sorry for the late reply.

The ti-sgx-{km, um, demos} update is great, but why do you need the libgbm
repo?
The  ti-sgx-um repo has had it's own libgbm internally for a while (binary
file
build/ti-sgx-um-2a2e5bb090ced870d73ed4edbc54793e952cc6d8/targetfs/ti335x/lib/libgbm.so.1.0.0).
This repo is a year and a half old.

Can't we drop this one and replace BR2_PACKAGE_TI_SGX_LIBGBM
with BR2_PACKAGE_TI_SGX_UM
where it is referenced?

Best regards,
Einar J?n

On Mon, 30 Dec 2019 at 15:01, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
wrote:

> On Fri, 15 Nov 2019 09:49:57 -0300
> unixmania at gmail.com wrote:
>
> > diff --git a/package/Config.in b/package/Config.in
> > index f72c77b416..0a0499421c 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -541,6 +541,7 @@ endmenu
> >       source "package/ti-sgx-demos/Config.in"
> >       source "package/ti-sgx-km/Config.in"
> >       source "package/ti-sgx-um/Config.in"
> > +     source "package/ti-sgx-libgbm/Config.in"
>
> Alphabetic ordering here was not good (reported by check-package).
>
> > diff --git a/package/ti-sgx-libgbm/Config.in
> b/package/ti-sgx-libgbm/Config.in
> > new file mode 100644
> > index 0000000000..33014b2ed3
> > --- /dev/null
> > +++ b/package/ti-sgx-libgbm/Config.in
> > @@ -0,0 +1,6 @@
> > +config BR2_PACKAGE_TI_SGX_LIBGBM
> > +     bool "ti-sgx-libgbm"
>
> Missing:
>
>         depends on BR2_TOOLCHAIN_HAS_THREADS
>         depends on BR2_PACKAGE_HAS_UDEV
>         select BR2_PACKAGE_LIBDRM
>
> to follow the dependencies of the .mk file.
>
> > +# Extract the license from the gbm.h header instead of distributing the
> whole
> > +# file. This is safe because if the terms change in the header the
> sha256 hash
> > +# will stop matching.
> > +define TI_SGX_LIBGBM_EXTRACT_LICENSE
> > +     head -n 26 $(@D)/gbm.h > $(@D)/license.txt
> > +endef
> > +TI_SGX_LIBGBM_POST_EXTRACT_HOOKS += TI_SGX_LIBGBM_EXTRACT_LICENSE
>
> I've used the complete gbm.h as license file. We already use full
> source files as license files in other packages, it's simple enough,
> and this gbm.h is unlikely to ever change anyway.
>
> I've also taken into account the comments from Yegor, and applied. Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200121/263583f7/attachment.html>

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

end of thread, other threads:[~2020-01-21 12:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 12:49 [Buildroot] [PATCH/next v3 0/5] fix beaglebone_qt5 unixmania at gmail.com
2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 1/5] package/ti-sgx-libgbm: new package unixmania at gmail.com
2019-11-15 13:29   ` Yegor Yefremov
2019-12-30 14:01   ` Thomas Petazzoni
2020-01-21 12:07     ` Einar Jón
2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 2/5] package/ti-sgx-{km, um, demos}: bump to latest TI version unixmania at gmail.com
2019-12-30 14:01   ` Thomas Petazzoni
2019-11-15 12:49 ` [Buildroot] [PATCH/next v3 3/5] package/qt5/qt5base: support ti-sgx-libgbm unixmania at gmail.com
2019-12-30 14:01   ` Thomas Petazzoni
2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 4/5] configs/beaglebone_qt5: bump kernel and U-Boot, add weston unixmania at gmail.com
2019-12-30 14:01   ` Thomas Petazzoni
2019-11-15 12:50 ` [Buildroot] [PATCH/next v3 5/5] configs/beaglebone_qt5: don't use custom post-image script unixmania at gmail.com
2019-12-30 14:01   ` Thomas Petazzoni

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.