All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs
@ 2016-07-12  8:26 Lothar Felten
  2016-07-12  8:26 ` [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors Lothar Felten
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

This patch adds support for SGX graphics acceleration for Texas Instuments SoCs
It's an alternative for the existing ti-gfx package but suppports newer
Linux 4.1 kernels and addtional processors (AM4xxx/AM5xxx).
The ti-gfx package is not obsolete as it supports older CPUs/kernels.
This patch is based on the ti-processor-sdk-02.00.00.00 and includes some
binary demos for testing.

Lothar Felten (7):
  ti-gfx: config help text: list supported processors
  new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator
  new package: ti-sgx/ti-sgx-um binary libraries SGX graphics
    accelerator
  new package: ti-sgx/ti-sgx-libgbm libgbm for SGX graphics accelerator
  new package: ti-sgx/ti-sgx-demos SGX binary demos
  new package: ti-sgx top level package for SGX graphics accelerator
  add ti-sgx package to menu

 package/Config.in                               |  1 +
 package/ti-gfx/Config.in                        |  4 +-
 package/ti-sgx/Config.in                        | 71 +++++++++++++++++++++++++
 package/ti-sgx/ti-sgx-demos/Config.in           |  4 ++
 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash   |  2 +
 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk     | 20 +++++++
 package/ti-sgx/ti-sgx-km/Config.in              |  4 ++
 package/ti-sgx/ti-sgx-km/ti-sgx-km.hash         |  2 +
 package/ti-sgx/ti-sgx-km/ti-sgx-km.mk           | 48 +++++++++++++++++
 package/ti-sgx/ti-sgx-libgbm/Config.in          |  5 ++
 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash |  2 +
 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk   | 41 ++++++++++++++
 package/ti-sgx/ti-sgx-um/Config.in              |  4 ++
 package/ti-sgx/ti-sgx-um/S80ti-sgx              | 16 ++++++
 package/ti-sgx/ti-sgx-um/powervr.ini            |  5 ++
 package/ti-sgx/ti-sgx-um/ti-sgx-um.hash         |  2 +
 package/ti-sgx/ti-sgx-um/ti-sgx-um.mk           | 49 +++++++++++++++++
 package/ti-sgx/ti-sgx.mk                        |  8 +++
 18 files changed, 287 insertions(+), 1 deletion(-)
 create mode 100644 package/ti-sgx/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-demos/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash
 create mode 100644 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk
 create mode 100644 package/ti-sgx/ti-sgx-km/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-km/ti-sgx-km.hash
 create mode 100644 package/ti-sgx/ti-sgx-km/ti-sgx-km.mk
 create mode 100644 package/ti-sgx/ti-sgx-libgbm/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash
 create mode 100644 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk
 create mode 100644 package/ti-sgx/ti-sgx-um/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-um/S80ti-sgx
 create mode 100644 package/ti-sgx/ti-sgx-um/powervr.ini
 create mode 100644 package/ti-sgx/ti-sgx-um/ti-sgx-um.hash
 create mode 100644 package/ti-sgx/ti-sgx-um/ti-sgx-um.mk
 create mode 100644 package/ti-sgx/ti-sgx.mk

-- 
1.9.1

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

* [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  2016-07-12 14:35   ` Thomas Petazzoni
  2016-07-12  8:26 ` [Buildroot] [PATCH 2/7] new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator Lothar Felten
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

The ti-gfx package supports a set of SGX implementations which are used in
some TI SoCs, newer parts are not supported by this package.
This patch adds a list of supported TI SoCs.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/ti-gfx/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in
index 39b0a93..e4a102f 100644
--- a/package/ti-gfx/Config.in
+++ b/package/ti-gfx/Config.in
@@ -8,7 +8,9 @@ config BR2_PACKAGE_TI_GFX
 	select BR2_PACKAGE_FBSET if !BR2_PACKAGE_BUSYBOX # Runtime dependency only
 	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
 	help
-	  Graphics libraries for TI boards.
+	  Graphics libraries for TI boards using SGX acceleration.
+	  Supports OMAP35xx, DM37xx/AM37xx, DM816x, DM814x, AM335x and AM43xx.
+	  For newer CPUs or kernels use the ti-sgx package.
 
 	  http://downloads.ti.com/dsps/dsps_public_sw/gfxsdk/
 
-- 
1.9.1

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

* [Buildroot] [PATCH 2/7] new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
  2016-07-12  8:26 ` [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  2016-07-12 14:41   ` Thomas Petazzoni
  2016-07-12  8:26 ` [Buildroot] [PATCH 3/7] new package: ti-sgx/ti-sgx-um binary libraries " Lothar Felten
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

This package adds the kernel module for the SGX graphics accelerator of the
following parts: AM335x, AM437x, AM4430, AM5430

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/ti-sgx/ti-sgx-km/Config.in      |  4 +++
 package/ti-sgx/ti-sgx-km/ti-sgx-km.hash |  2 ++
 package/ti-sgx/ti-sgx-km/ti-sgx-km.mk   | 48 +++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 package/ti-sgx/ti-sgx-km/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-km/ti-sgx-km.hash
 create mode 100644 package/ti-sgx/ti-sgx-km/ti-sgx-km.mk

diff --git a/package/ti-sgx/ti-sgx-km/Config.in b/package/ti-sgx/ti-sgx-km/Config.in
new file mode 100644
index 0000000..3e3b991
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-km/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_TI_SGX_KM
+	bool "kernel module"
+	help
+	  TI SGX kernel module
diff --git a/package/ti-sgx/ti-sgx-km/ti-sgx-km.hash b/package/ti-sgx/ti-sgx-km/ti-sgx-km.hash
new file mode 100644
index 0000000..7f7e0ac
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-km/ti-sgx-km.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 47728ff8fc48827116cc042efa777a22a83dd4bd17c494e2a53b8c204ca59624 ti-sgx-km-2b7523d07a13ab704a24a7664749551f4a13ed32.tar.gz
diff --git a/package/ti-sgx/ti-sgx-km/ti-sgx-km.mk b/package/ti-sgx/ti-sgx-km/ti-sgx-km.mk
new file mode 100644
index 0000000..b738d40
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-km/ti-sgx-km.mk
@@ -0,0 +1,48 @@
+################################################################################
+#
+# ti-sgx-km
+#
+################################################################################
+
+# 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
+TI_SGX_KM_LICENSE = MIT / GPL License
+TI_SGX_KM_LICENSE_FILES = GPL-COPYING MIT-COPYING
+TI_SGX_KM_INSTALL_STAGING = YES
+
+TI_SGX_KM_DEPENDENCIES = linux
+
+TI_SGX_KM_MAKE_OPTS = \
+	$(LINUX_MAKE_FLAGS) \
+	ARCH=arm \
+	KERNELDIR=$(LINUX_DIR) \
+	DISCIMAGE=$(TARGET_DIR) \
+	PVR_NULLDRM=1
+
+ifeq ($(BR2_PACKAGE_TI_SGX_AM335X),y)
+TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap335x_linux
+endif
+
+ifeq ($(BR2_PACKAGE_TI_SGX_AM437X),y)
+TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap437x_linux
+endif
+
+ifeq ($(BR2_PACKAGE_TI_SGX_AM4430),y)
+TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap4430_linux
+endif
+
+ifeq ($(BR2_PACKAGE_TI_SGX_AM5430),y)
+TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap5430_linux
+endif
+
+define TI_SGX_KM_BUILD_CMDS
+	$(MAKE) $(TI_SGX_KM_MAKE_OPTS) -C $(@D)/$(TI_SGX_KM_SUBDIRECTORY)
+endef
+
+define TI_SGX_KM_INSTALL_TARGET_CMDS
+	$(MAKE) $(TI_SGX_KM_MAKE_OPTS) kbuild_install \
+		-C $(@D)/$(TI_SGX_KM_SUBDIRECTORY)
+endef
+
+$(eval $(generic-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 3/7] new package: ti-sgx/ti-sgx-um binary libraries SGX graphics accelerator
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
  2016-07-12  8:26 ` [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors Lothar Felten
  2016-07-12  8:26 ` [Buildroot] [PATCH 2/7] new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  2016-07-12 14:46   ` Thomas Petazzoni
  2016-07-12  8:26 ` [Buildroot] [PATCH 4/7] new package: ti-sgx/ti-sgx-libgbm libgbm for " Lothar Felten
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

This package adds the binary libraries required to use the SGX graphics
accelerator. It corresponds to the ti-sgx/ti-sgx-km kernel module package.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/ti-sgx/ti-sgx-um/Config.in      |  4 +++
 package/ti-sgx/ti-sgx-um/S80ti-sgx      | 16 +++++++++++
 package/ti-sgx/ti-sgx-um/powervr.ini    |  5 ++++
 package/ti-sgx/ti-sgx-um/ti-sgx-um.hash |  2 ++
 package/ti-sgx/ti-sgx-um/ti-sgx-um.mk   | 49 +++++++++++++++++++++++++++++++++
 5 files changed, 76 insertions(+)
 create mode 100644 package/ti-sgx/ti-sgx-um/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-um/S80ti-sgx
 create mode 100644 package/ti-sgx/ti-sgx-um/powervr.ini
 create mode 100644 package/ti-sgx/ti-sgx-um/ti-sgx-um.hash
 create mode 100644 package/ti-sgx/ti-sgx-um/ti-sgx-um.mk

diff --git a/package/ti-sgx/ti-sgx-um/Config.in b/package/ti-sgx/ti-sgx-um/Config.in
new file mode 100644
index 0000000..b6d81bd
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-um/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_TI_SGX_UM
+	bool "userspace libraries"
+	help
+	  TI SGX userspace libraries
diff --git a/package/ti-sgx/ti-sgx-um/S80ti-sgx b/package/ti-sgx/ti-sgx-um/S80ti-sgx
new file mode 100644
index 0000000..8eb497e
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-um/S80ti-sgx
@@ -0,0 +1,16 @@
+#!/bin/sh
+case "$1" in
+  start)
+
+	echo "Initializing SGX graphics driver"
+	/usr/bin/pvrsrvinit
+	echo " OK"
+
+  ;;
+  stop)
+  ;;
+  *)
+    echo "Usage: $0 {start|stop}"
+    exit 1
+  ;;
+esac
diff --git a/package/ti-sgx/ti-sgx-um/powervr.ini b/package/ti-sgx/ti-sgx-um/powervr.ini
new file mode 100644
index 0000000..1d0c5e9
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-um/powervr.ini
@@ -0,0 +1,5 @@
+[default]
+WindowSystem=libpvrDRMWSEGL_FRONT.so
+#WindowSystem=libpvrDRMWSEGL.so
+DisableHWTQTextureUpload=1
+
diff --git a/package/ti-sgx/ti-sgx-um/ti-sgx-um.hash b/package/ti-sgx/ti-sgx-um/ti-sgx-um.hash
new file mode 100644
index 0000000..a6a0566
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-um/ti-sgx-um.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 c17f23d255cff8fe72fc3f5cae3d7550e387af07d036954b4f08e573379406d0 ti-sgx-um-e15f1543bab4de9e8927a2c4934addf3fd16ffcb.tar.gz
diff --git a/package/ti-sgx/ti-sgx-um/ti-sgx-um.mk b/package/ti-sgx/ti-sgx-um/ti-sgx-um.mk
new file mode 100644
index 0000000..c1b5f9f
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-um/ti-sgx-um.mk
@@ -0,0 +1,49 @@
+################################################################################
+#
+# ti-sgx-um
+#
+################################################################################
+
+# 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
+TI_SGX_UM_LICENSE = TI TSPA License
+TI_SGX_UM_LICENSE_FILES = OMAP5-Linux-Graphics-DDK-UM-Manifest.doc
+TI_SGX_UM_INSTALL_STAGING = YES
+
+TI_SGX_UM_DEPENDENCIES = linux ti-sgx-km ti-sgx-libgbm
+
+TI_SGX_UM_MAKE_STAGING_OPTS = \
+	$(LINUX_MAKE_FLAGS) \
+	DISCIMAGE=$(STAGING_DIR) 
+
+TI_SGX_UM_MAKE_OPTS = \
+	$(LINUX_MAKE_FLAGS) \
+	DISCIMAGE=$(TARGET_DIR) 
+
+define TI_SGX_UM_BUILD_CMDS
+	$(MAKE) $(TI_SGX_UM_MAKE_OPTS) -C $(@D)
+endef
+
+define TI_SGX_UM_INSTALL_STAGING_CMDS
+	$(MAKE) $(TI_SGX_UM_MAKE_STAGING_OPTS) install -C $(@D)
+endef
+
+define TI_SGX_UM_INSTALL_TARGET_CMDS
+	$(MAKE) $(TI_SGX_UM_MAKE_OPTS) install -C $(@D)
+endef
+
+define TI_SGX_UM_INSTALL_CONF_CMDS
+        # libs use the following file for configuration.
+        $(INSTALL) -D -m 0644 package/ti-sgx/ti-sgx-um/powervr.ini \
+                $(TARGET_DIR)/etc/powervr.ini
+endef
+
+define TI_SGX_UM_INSTALL_INIT_SYSV
+        $(INSTALL) -D -m 0755 package/ti-sgx/ti-sgx-um/S80ti-sgx \
+                $(TARGET_DIR)/etc/init.d/S80ti-sgx
+        $(INSTALL) -D -m 0755 package/ti-sgx/ti-sgx-um/powervr.ini \
+                $(TARGET_DIR)/etc/powervr.ini
+endef
+
+$(eval $(generic-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 4/7] new package: ti-sgx/ti-sgx-libgbm libgbm for SGX graphics accelerator
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
                   ` (2 preceding siblings ...)
  2016-07-12  8:26 ` [Buildroot] [PATCH 3/7] new package: ti-sgx/ti-sgx-um binary libraries " Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  2016-07-12 14:51   ` Thomas Petazzoni
  2016-07-12  8:26 ` [Buildroot] [PATCH 5/7] new package: ti-sgx/ti-sgx-demos SGX binary demos Lothar Felten
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

This package adds a custom ti version of libgbm required by the binary
libraries of the ti-sgx/ti-sgx-um package.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/ti-sgx/ti-sgx-libgbm/Config.in          |  5 +++
 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash |  2 ++
 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk   | 41 +++++++++++++++++++++++++
 3 files changed, 48 insertions(+)
 create mode 100644 package/ti-sgx/ti-sgx-libgbm/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash
 create mode 100644 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk

diff --git a/package/ti-sgx/ti-sgx-libgbm/Config.in b/package/ti-sgx/ti-sgx-libgbm/Config.in
new file mode 100644
index 0000000..24427c8
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-libgbm/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+        bool "libgbm, ti variant"
+        help
+	  TI SGX libgbm variant
+
diff --git a/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash b/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash
new file mode 100644
index 0000000..de4f442
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 ecf9848a5cdc46249b3bb6d1119118ab62e926e4826a1dcac6d927c247a26b57 ti-sgx-libgbm-cb86a2f2cecd41023bf1bf12fbcf11be11220f31.tar.gz
diff --git a/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk b/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk
new file mode 100644
index 0000000..c92c8dc
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk
@@ -0,0 +1,41 @@
+################################################################################
+#
+# ti-sgx-libgbm
+#
+################################################################################
+
+# This correpsonds to SDK 02.00.00.00
+TI_SGX_LIBGBM_VERSION = cb86a2f2cecd41023bf1bf12fbcf11be11220f31
+TI_SGX_LIBGBM_SITE = git://git.ti.com/glsdk/libgbm.git
+TI_SGX_LIBGBM_LICENSE = MIT License
+TI_SGX_LIBGBM_LICENSE_FILES = gbm.h
+TI_SGX_LIBGBM_INSTALL_STAGING = YES
+
+TI_SGX_LIBGBM_DEPENDENCIES = linux
+
+# This package uses autoconf, but not automake, so we need to call
+# their special autogen.sh script, and have custom target and staging
+# installation commands.
+
+define TI_SGX_LIBGBM_RUN_AUTOGEN
+        cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+TI_SGX_LIBGBM_PRE_CONFIGURE_HOOKS += TI_SGX_LIBGBM_RUN_AUTOGEN
+
+define TI_SGX_LIBGBM_INSTALL_TARGET_CMDS
+        $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+                PREFIX=/usr \
+                STRIP=/bin/true \
+                DESTDIR=$(TARGET_DIR) \
+                install
+endef
+
+define TI_SGX_LIBGBM_INSTALL_STAGING_CMDS
+        $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+                PREFIX=/usr \
+                STRIP=/bin/true \
+                DESTDIR=$(STAGING_DIR) \
+                install
+endef
+
+$(eval $(autotools-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 5/7] new package: ti-sgx/ti-sgx-demos SGX binary demos
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
                   ` (3 preceding siblings ...)
  2016-07-12  8:26 ` [Buildroot] [PATCH 4/7] new package: ti-sgx/ti-sgx-libgbm libgbm for " Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  2016-07-12 14:55   ` Thomas Petazzoni
  2016-07-12  8:26 ` [Buildroot] [PATCH 6/7] new package: ti-sgx top level package for SGX graphics accelerator Lothar Felten
  2016-07-12  8:26 ` [Buildroot] [PATCH 7/7] add ti-sgx package to menu Lothar Felten
  6 siblings, 1 reply; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

This package adds the SGX demos from Imagination Technologies.
The demos are available as binaries only.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/ti-sgx/ti-sgx-demos/Config.in         |  4 ++++
 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash |  2 ++
 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk   | 20 ++++++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 package/ti-sgx/ti-sgx-demos/Config.in
 create mode 100644 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash
 create mode 100644 package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk

diff --git a/package/ti-sgx/ti-sgx-demos/Config.in b/package/ti-sgx/ti-sgx-demos/Config.in
new file mode 100644
index 0000000..e4d4321
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-demos/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_TI_SGX_DEMOS
+	bool "sgx powervr demo binaries"
+	help
+	  TI SGX powervr demos
diff --git a/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash b/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash
new file mode 100644
index 0000000..43acf91
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 9d1d4da2c2b35303e239f99eb4003b8b206078a682aa083d5fb831ee4197f3bf ti-sgx-demos-f24650bc8243b25c23d6a0a502ed79fc472ac424.tar.gz
diff --git a/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk b/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk
new file mode 100644
index 0000000..04389f1
--- /dev/null
+++ b/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# ti-sgx-demos
+#
+################################################################################
+
+# 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
+TI_SGX_DEMOS_LICENSE = Imagination Technogolies License Agreement 
+TI_SGX_DEMOS_LICENSE_FILES = LegalNotice.txt
+
+TI_SGX_DEMOS_DEPENDENCIES =  ti-sgx-km ti-sgx-um 
+
+define TI_SGX_DEMOS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0555 -t $(TARGET_DIR)/usr/bin \
+                $(@D)/targetfs/Examples/Advanced/OGLES* 
+endef
+
+$(eval $(generic-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 6/7] new package: ti-sgx top level package for SGX graphics accelerator
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
                   ` (4 preceding siblings ...)
  2016-07-12  8:26 ` [Buildroot] [PATCH 5/7] new package: ti-sgx/ti-sgx-demos SGX binary demos Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  2016-07-12 14:57   ` Thomas Petazzoni
  2016-07-12  8:26 ` [Buildroot] [PATCH 7/7] add ti-sgx package to menu Lothar Felten
  6 siblings, 1 reply; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

This is a virtual package that selects the packages required for SGX support:
ti-sgx-km, ti-sgx-um, ti-sgx-libgbm and optionally ti-sgx-demos.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/ti-sgx/Config.in | 71 ++++++++++++++++++++++++++++++++++++++++++++++++
 package/ti-sgx/ti-sgx.mk |  8 ++++++
 2 files changed, 79 insertions(+)
 create mode 100644 package/ti-sgx/Config.in
 create mode 100644 package/ti-sgx/ti-sgx.mk

diff --git a/package/ti-sgx/Config.in b/package/ti-sgx/Config.in
new file mode 100644
index 0000000..199618a
--- /dev/null
+++ b/package/ti-sgx/Config.in
@@ -0,0 +1,71 @@
+config BR2_PACKAGE_TI_SGX
+	bool "ti-sgx"
+	depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm && \
+		BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_HAS_LIBEGL
+	select BR2_PACKAGE_HAS_LIBGLES
+	select BR2_PACKAGE_HAS_POWERVR
+	select BR2_PACKAGE_TI_SGX_KM
+	select BR2_PACKAGE_TI_SGX_UM
+	select BR2_PACKAGE_TI_SGX_LIBGBM
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBDRM_OMAP
+	select BR2_PACKAGE_FBSET if !BR2_PACKAGE_BUSYBOX # Runtime dependency only
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  Graphics libraries for TI CPUs with SGX5xx GPU.
+	  This package supports AM335x, AM437x, AM4430 and AM5430.
+	  It builds the kernel module and the user space binaries.
+	  For older CPUs or kernels use the ti-gfx package.
+
+if BR2_PACKAGE_TI_SGX
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+	default "ti-sgx-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+	default "ti-sgx-um"
+
+config BR2_PACKAGE_PROVIDES_POWERVR
+	default "ti-sgx-um"
+
+choice
+	prompt "Target"
+	default BR2_PACKAGE_TI_SGX_AM335X
+	help
+	  Select the SOC for which you would like to install drivers. 
+
+config BR2_PACKAGE_TI_SGX_AM335X
+	bool "AM335x"
+	help
+	  AM335x CPU
+
+config BR2_PACKAGE_TI_SGX_AM437X
+	bool "AM437x"
+	help
+	  AM437x CPU
+
+config BR2_PACKAGE_TI_SGX_AM4430
+	bool "AM4430"
+	help
+	  AM4430 CPU
+
+config BR2_PACKAGE_TI_SGX_AM5430
+	bool "AM5430"
+	help
+	  AM5430 CPU
+
+endchoice
+
+source "package/ti-sgx/ti-sgx-um/Config.in"
+source "package/ti-sgx/ti-sgx-km/Config.in"
+source "package/ti-sgx/ti-sgx-libgbm/Config.in"
+source "package/ti-sgx/ti-sgx-demos/Config.in"
+
+endif
+
+comment "ti-sgx needs an (e)glibc toolchain, udev and a Linux kernel to be built"
+	depends on BR2_arm
+	depends on BR2_PACKAGE_HAS_UDEV
+	depends on BR2_LINUX_KERNEL
+	depends on BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/ti-sgx/ti-sgx.mk b/package/ti-sgx/ti-sgx.mk
new file mode 100644
index 0000000..9cec178
--- /dev/null
+++ b/package/ti-sgx/ti-sgx.mk
@@ -0,0 +1,8 @@
+################################################################################
+#
+# ti-sgx (virtual)
+#
+################################################################################
+include $(sort $(wildcard package/ti-sgx/*/*.mk))
+#$(eval $(virtual-package))
+#$(eval $(generic-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 7/7] add ti-sgx package to menu
  2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
                   ` (5 preceding siblings ...)
  2016-07-12  8:26 ` [Buildroot] [PATCH 6/7] new package: ti-sgx top level package for SGX graphics accelerator Lothar Felten
@ 2016-07-12  8:26 ` Lothar Felten
  6 siblings, 0 replies; 14+ messages in thread
From: Lothar Felten @ 2016-07-12  8:26 UTC (permalink / raw)
  To: buildroot

Add the ti-sgx package to the Target Packages / Hardware handling menu

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 package/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/Config.in b/package/Config.in
index 7d6924c..c412c6e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -451,6 +451,7 @@ endmenu
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
+	source "package/ti-sgx/Config.in"
 	source "package/ti-uim/Config.in"
 	source "package/ti-utils/Config.in"
 	source "package/triggerhappy/Config.in"
-- 
1.9.1

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

* [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors
  2016-07-12  8:26 ` [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors Lothar Felten
@ 2016-07-12 14:35   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2016-07-12 14:35 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:26:22 +0200, Lothar Felten wrote:
> The ti-gfx package supports a set of SGX implementations which are used in
> some TI SoCs, newer parts are not supported by this package.
> This patch adds a list of supported TI SoCs.
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
> ---
>  package/ti-gfx/Config.in | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

However, it cannot be merged until we merge your ti-sgx package, since
your proposed Config.in help text references that package.

Best regards,

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

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

* [Buildroot] [PATCH 2/7] new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator
  2016-07-12  8:26 ` [Buildroot] [PATCH 2/7] new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator Lothar Felten
@ 2016-07-12 14:41   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2016-07-12 14:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:26:23 +0200, Lothar Felten wrote:
> This package adds the kernel module for the SGX graphics accelerator of the
> following parts: AM335x, AM437x, AM4430, AM5430
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>

The title should be:

	ti-sgx-km: new package

>  package/ti-sgx/ti-sgx-km/Config.in      |  4 +++
>  package/ti-sgx/ti-sgx-km/ti-sgx-km.hash |  2 ++
>  package/ti-sgx/ti-sgx-km/ti-sgx-km.mk   | 48 +++++++++++++++++++++++++++++++++

I don't see the point of this directory hierarchy, and the top-level
ti-sgx package. Just make four different packages, directly under
package:

 - ti-sgx-km
 - ti-sgx-um
 - ti-sgx-libgbm
 - ti-sgx-demos

> diff --git a/package/ti-sgx/ti-sgx-km/Config.in b/package/ti-sgx/ti-sgx-km/Config.in
> new file mode 100644
> index 0000000..3e3b991
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-km/Config.in
> @@ -0,0 +1,4 @@
> +config BR2_PACKAGE_TI_SGX_KM
> +	bool "kernel module"

This should be

	bool "ti-sgx-km"

Missing dependency on BR2_LINUX_KERNEL.

> +	help
> +	  TI SGX kernel module

Would be good to mention what it is useful for, and add a reference to
the "upstream" project.

> diff --git a/package/ti-sgx/ti-sgx-km/ti-sgx-km.mk b/package/ti-sgx/ti-sgx-km/ti-sgx-km.mk
> new file mode 100644
> index 0000000..b738d40
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-km/ti-sgx-km.mk
> @@ -0,0 +1,48 @@
> +################################################################################
> +#
> +# ti-sgx-km
> +#
> +################################################################################
> +
> +# 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

Please use http:// download if available. It is more friendly to people
behind stupid company firewalls.

> +TI_SGX_KM_LICENSE = MIT / GPL License

Is this MIT *or* GPL, or some parts MIT and some parts GPL ?

Also, which version of the GPL ? GPLv2 ? GPLv2+ ? GPLv3 ? GPLv3+ ?

Since it's kernel code, I assume it's GPLv2.

> +TI_SGX_KM_LICENSE_FILES = GPL-COPYING MIT-COPYING
> +TI_SGX_KM_INSTALL_STAGING = YES

This last line is useless, you're not installing anything to staging.

> +
> +TI_SGX_KM_DEPENDENCIES = linux
> +
> +TI_SGX_KM_MAKE_OPTS = \
> +	$(LINUX_MAKE_FLAGS) \
> +	ARCH=arm \
> +	KERNELDIR=$(LINUX_DIR) \
> +	DISCIMAGE=$(TARGET_DIR) \
> +	PVR_NULLDRM=1

Have you tried to use the kernel-module package infrastructure ? I
haven't checked if it applies nicely or not to your package.

If it doesn't, your package should select BR2_LINUX_NEEDS_MODULES.

> +
> +ifeq ($(BR2_PACKAGE_TI_SGX_AM335X),y)
> +TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap335x_linux
> +endif
> +
> +ifeq ($(BR2_PACKAGE_TI_SGX_AM437X),y)
> +TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap437x_linux
> +endif
> +
> +ifeq ($(BR2_PACKAGE_TI_SGX_AM4430),y)
> +TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap4430_linux
> +endif
> +
> +ifeq ($(BR2_PACKAGE_TI_SGX_AM5430),y)
> +TI_SGX_KM_SUBDIRECTORY =  eurasia_km/eurasiacon/build/linux2/omap5430_linux
> +endif

This seems a bit redundant. What about:

ifeq ($(BR2_PACKAGE_TI_SGX_AM335X),y)
TI_SGX_KM_PLATFORM_NAME = omap335x
else ifeq ($(BR2_PACKAGE_TI_SGX_AM437X),y)
TI_SGX_KM_PLATFORM_NAME = omap437x
else ifeq ($(BR2_PACKAGE_TI_SGX_AM4430),y)
TI_SGX_KM_PLATFORM_NAME = omap4430
else ifeq ($(BR2_PACKAGE_TI_SGX_5430),y)
TI_SGX_KM_PLATFORM_NAME = omap5430
endif

TI_SGX_KM_SUBDIRECTORY = eurasia_km/eurasiacon/build/linux2/$(TI_SGX_KM_PLATFORM_NAME)_linux

> +define TI_SGX_KM_BUILD_CMDS
> +	$(MAKE) $(TI_SGX_KM_MAKE_OPTS) -C $(@D)/$(TI_SGX_KM_SUBDIRECTORY)
> +endef
> +
> +define TI_SGX_KM_INSTALL_TARGET_CMDS
> +	$(MAKE) $(TI_SGX_KM_MAKE_OPTS) kbuild_install \
> +		-C $(@D)/$(TI_SGX_KM_SUBDIRECTORY)
> +endef
> +
> +$(eval $(generic-package))

Thanks,

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

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

* [Buildroot] [PATCH 3/7] new package: ti-sgx/ti-sgx-um binary libraries SGX graphics accelerator
  2016-07-12  8:26 ` [Buildroot] [PATCH 3/7] new package: ti-sgx/ti-sgx-um binary libraries " Lothar Felten
@ 2016-07-12 14:46   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2016-07-12 14:46 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:26:24 +0200, Lothar Felten wrote:
> This package adds the binary libraries required to use the SGX graphics
> accelerator. It corresponds to the ti-sgx/ti-sgx-km kernel module package.

I'm not sure what you means by "it corresponds".

The title should be:

	ti-sgx-um: new package

Like ti-sgx-km, it should be right under package/ I believe.

> diff --git a/package/ti-sgx/ti-sgx-um/Config.in b/package/ti-sgx/ti-sgx-um/Config.in
> new file mode 100644
> index 0000000..b6d81bd
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-um/Config.in
> @@ -0,0 +1,4 @@
> +config BR2_PACKAGE_TI_SGX_UM
> +	bool "userspace libraries"

Should be "ti-sgx-um"

> +	help
> +	  TI SGX userspace libraries
> diff --git a/package/ti-sgx/ti-sgx-um/S80ti-sgx b/package/ti-sgx/ti-sgx-um/S80ti-sgx
> new file mode 100644
> index 0000000..8eb497e
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-um/S80ti-sgx
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +case "$1" in
> +  start)
> +

Unneeded empty line.

> +	echo "Initializing SGX graphics driver"

Should be:

	printf "Initializing SGX graphics driver: "

to avoid the newline.

> +	/usr/bin/pvrsrvinit
> +	echo " OK"

Please test the error:

	[ $? = 0 ] && echo "OK" || echo "FAIL"

> diff --git a/package/ti-sgx/ti-sgx-um/powervr.ini b/package/ti-sgx/ti-sgx-um/powervr.ini
> new file mode 100644
> index 0000000..1d0c5e9
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-um/powervr.ini
> @@ -0,0 +1,5 @@
> +[default]
> +WindowSystem=libpvrDRMWSEGL_FRONT.so
> +#WindowSystem=libpvrDRMWSEGL.so

Why is this commented? I guess because it's useful in some situations,
but it would be good to explain in which cases.

> +DisableHWTQTextureUpload=1
> +

Unneded empty line.

> +# 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

http download if possible.

> +TI_SGX_UM_LICENSE = TI TSPA License
> +TI_SGX_UM_LICENSE_FILES = OMAP5-Linux-Graphics-DDK-UM-Manifest.doc
> +TI_SGX_UM_INSTALL_STAGING = YES
> +
> +TI_SGX_UM_DEPENDENCIES = linux ti-sgx-km ti-sgx-libgbm

Do you really depend in ti-sgx-km in terms of build dependency? Also,
do you really depend on linux?

I'm making the assumption that ti-sgx-km is the kernel side, and
ti-sgx-um is the userspace side. If that is true, then there is no
reason for ti-sgx-um to depend on the kernel.

> +
> +TI_SGX_UM_MAKE_STAGING_OPTS = \
> +	$(LINUX_MAKE_FLAGS) \

This seems weird. Why do you need the kernel build flags for a
userspace library.

> +	DISCIMAGE=$(STAGING_DIR) 
> +
> +TI_SGX_UM_MAKE_OPTS = \
> +	$(LINUX_MAKE_FLAGS) \
> +	DISCIMAGE=$(TARGET_DIR) 

Do you need to pass DISCIMAGE at build time ? If not, I would prefer to
see DISCIMAGE= being passed directly in STAGING_CMDS and TARGET_CMDS.

> +define TI_SGX_UM_BUILD_CMDS
> +	$(MAKE) $(TI_SGX_UM_MAKE_OPTS) -C $(@D)
> +endef
> +
> +define TI_SGX_UM_INSTALL_STAGING_CMDS
> +	$(MAKE) $(TI_SGX_UM_MAKE_STAGING_OPTS) install -C $(@D)
> +endef
> +
> +define TI_SGX_UM_INSTALL_TARGET_CMDS
> +	$(MAKE) $(TI_SGX_UM_MAKE_OPTS) install -C $(@D)
> +endef
> +
> +define TI_SGX_UM_INSTALL_CONF_CMDS

This is never used, so the configuration file will never be installed.

> +        # libs use the following file for configuration.
> +        $(INSTALL) -D -m 0644 package/ti-sgx/ti-sgx-um/powervr.ini \
> +                $(TARGET_DIR)/etc/powervr.ini
> +endef
> +
> +define TI_SGX_UM_INSTALL_INIT_SYSV
> +        $(INSTALL) -D -m 0755 package/ti-sgx/ti-sgx-um/S80ti-sgx \
> +                $(TARGET_DIR)/etc/init.d/S80ti-sgx
> +        $(INSTALL) -D -m 0755 package/ti-sgx/ti-sgx-um/powervr.ini \
> +                $(TARGET_DIR)/etc/powervr.ini

Except here, but it shouldn't be done here since the configuration file
is not related to sysv init. So please keep your
TI_SGX_UM_INSTALL_CONF_CMDS, rename it TI_SGX_UM_INSTALL_CONF, and add
it to TI_SGX_UM_POST_INSTALL_TARGET_HOOKS.

Thanks!

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

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

* [Buildroot] [PATCH 4/7] new package: ti-sgx/ti-sgx-libgbm libgbm for SGX graphics accelerator
  2016-07-12  8:26 ` [Buildroot] [PATCH 4/7] new package: ti-sgx/ti-sgx-libgbm libgbm for " Lothar Felten
@ 2016-07-12 14:51   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2016-07-12 14:51 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:26:25 +0200, Lothar Felten wrote:
> This package adds a custom ti version of libgbm required by the binary
> libraries of the ti-sgx/ti-sgx-um package.
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>

Is this libgbm a TI-specific implementation of the libgm available in
Mesa ? If that's the case, then it's going to be complicated to
package, as we would have two implementations of the same API.

> ---
>  package/ti-sgx/ti-sgx-libgbm/Config.in          |  5 +++
>  package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash |  2 ++
>  package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk   | 41 +++++++++++++++++++++++++
>  3 files changed, 48 insertions(+)
>  create mode 100644 package/ti-sgx/ti-sgx-libgbm/Config.in
>  create mode 100644 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash
>  create mode 100644 package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk
> 
> diff --git a/package/ti-sgx/ti-sgx-libgbm/Config.in b/package/ti-sgx/ti-sgx-libgbm/Config.in
> new file mode 100644
> index 0000000..24427c8
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-libgbm/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_PACKAGE_TI_SGX_LIBGBM
> +        bool "libgbm, ti variant"

Indentation should be done with one tab. Also, this should be:

	bool "ti-sgx-libgm"

> +        help
> +	  TI SGX libgbm variant

More details + upstream link.

> diff --git a/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk b/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk
> new file mode 100644
> index 0000000..c92c8dc
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk
> @@ -0,0 +1,41 @@
> +################################################################################
> +#
> +# ti-sgx-libgbm
> +#
> +################################################################################
> +
> +# This correpsonds to SDK 02.00.00.00
> +TI_SGX_LIBGBM_VERSION = cb86a2f2cecd41023bf1bf12fbcf11be11220f31
> +TI_SGX_LIBGBM_SITE = git://git.ti.com/glsdk/libgbm.git
> +TI_SGX_LIBGBM_LICENSE = MIT License
> +TI_SGX_LIBGBM_LICENSE_FILES = gbm.h
> +TI_SGX_LIBGBM_INSTALL_STAGING = YES
> +
> +TI_SGX_LIBGBM_DEPENDENCIES = linux

Are you sure? Looking at the code, it surely doesn't depend on linux.
However, it depends on udev and libdrm, so those should be added as
dependencies (both in the Config.in file and here).

> +# This package uses autoconf, but not automake, so we need to call

This is wrong: the package is using automake, there is a Makefile.am in
the source tree.

> +# their special autogen.sh script, and have custom target and staging
> +# installation commands.
> +
> +define TI_SGX_LIBGBM_RUN_AUTOGEN
> +        cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
> +endef
> +TI_SGX_LIBGBM_PRE_CONFIGURE_HOOKS += TI_SGX_LIBGBM_RUN_AUTOGEN

Did you try <pkg>_AUTORECONF = YES ?

> +define TI_SGX_LIBGBM_INSTALL_TARGET_CMDS
> +        $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> +                PREFIX=/usr \
> +                STRIP=/bin/true \
> +                DESTDIR=$(TARGET_DIR) \
> +                install
> +endef
> +
> +define TI_SGX_LIBGBM_INSTALL_STAGING_CMDS
> +        $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> +                PREFIX=/usr \
> +                STRIP=/bin/true \
> +                DESTDIR=$(STAGING_DIR) \
> +                install
> +endef

Provided it's using autoamke, I believe those two variables should not
be needed.

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

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

* [Buildroot] [PATCH 5/7] new package: ti-sgx/ti-sgx-demos SGX binary demos
  2016-07-12  8:26 ` [Buildroot] [PATCH 5/7] new package: ti-sgx/ti-sgx-demos SGX binary demos Lothar Felten
@ 2016-07-12 14:55   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2016-07-12 14:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:26:26 +0200, Lothar Felten wrote:
> This package adds the SGX demos from Imagination Technologies.
> The demos are available as binaries only.
> 
> Signed-off-by: Lothar Felten <lothar.felten@gmail.com>

Commit title should be:

	ti-sgx-demos: new package

> diff --git a/package/ti-sgx/ti-sgx-demos/Config.in b/package/ti-sgx/ti-sgx-demos/Config.in
> new file mode 100644
> index 0000000..e4d4321
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-demos/Config.in
> @@ -0,0 +1,4 @@
> +config BR2_PACKAGE_TI_SGX_DEMOS
> +	bool "sgx powervr demo binaries"

	bool "ti-sgx-demos"

> +	help
> +	  TI SGX powervr demos

More details + upstream link.

> diff --git a/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk b/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk
> new file mode 100644
> index 0000000..04389f1
> --- /dev/null
> +++ b/package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# ti-sgx-demos
> +#
> +################################################################################
> +
> +# 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

http:// download if possible.

> +TI_SGX_DEMOS_LICENSE = Imagination Technogolies License Agreement 
> +TI_SGX_DEMOS_LICENSE_FILES = LegalNotice.txt
> +
> +TI_SGX_DEMOS_DEPENDENCIES =  ti-sgx-km ti-sgx-um 

Trailing space + one too many space after the =.

I guess those demos only work with the TI SGX OpenGL implementation,
and cannot be used with other OpenGL implementations.

> +define TI_SGX_DEMOS_INSTALL_TARGET_CMDS
> +	$(INSTALL) -m 0555 -t $(TARGET_DIR)/usr/bin \
> +                $(@D)/targetfs/Examples/Advanced/OGLES* 

Please use tabs to indent the second line.

> +endef

555 isn't good, 755 should be used instead. However, it is true that we
generally prefer to use cp -dpfr for such installations:

	cp -dpfr $(@D)/targetfs/Examples/Advanced/OGLES \
		$(TARGET_DIR)/usr/bin/

Thanks,

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

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

* [Buildroot] [PATCH 6/7] new package: ti-sgx top level package for SGX graphics accelerator
  2016-07-12  8:26 ` [Buildroot] [PATCH 6/7] new package: ti-sgx top level package for SGX graphics accelerator Lothar Felten
@ 2016-07-12 14:57   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2016-07-12 14:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 12 Jul 2016 10:26:27 +0200, Lothar Felten wrote:
> This is a virtual package that selects the packages required for SGX support:
> ti-sgx-km, ti-sgx-um, ti-sgx-libgbm and optionally ti-sgx-demos.

This is an improper use of a virtual package. A virtual package is
*not* a meta package that is meant to depend on a bunch of other
packages to simplify their selection.

A virtual package is a package that *provides* some kind of generic
API, which is implemented by various providers. This is not the case
here: the package that actually provides the OpenGL ES and EGL APIs is
ti-sgx-um.

So I believe this whole package should be removed, and instead the four
other packages be made independent packages.

You can have a look at package/freescale-imx/Config.in for an example.

Thanks,

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

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

end of thread, other threads:[~2016-07-12 14:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12  8:26 [Buildroot] [PATCH 0/7] new package: ti-sgx - SGX graphics acceleration for TI SoCs Lothar Felten
2016-07-12  8:26 ` [Buildroot] [PATCH 1/7] ti-gfx: config help text: list supported processors Lothar Felten
2016-07-12 14:35   ` Thomas Petazzoni
2016-07-12  8:26 ` [Buildroot] [PATCH 2/7] new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator Lothar Felten
2016-07-12 14:41   ` Thomas Petazzoni
2016-07-12  8:26 ` [Buildroot] [PATCH 3/7] new package: ti-sgx/ti-sgx-um binary libraries " Lothar Felten
2016-07-12 14:46   ` Thomas Petazzoni
2016-07-12  8:26 ` [Buildroot] [PATCH 4/7] new package: ti-sgx/ti-sgx-libgbm libgbm for " Lothar Felten
2016-07-12 14:51   ` Thomas Petazzoni
2016-07-12  8:26 ` [Buildroot] [PATCH 5/7] new package: ti-sgx/ti-sgx-demos SGX binary demos Lothar Felten
2016-07-12 14:55   ` Thomas Petazzoni
2016-07-12  8:26 ` [Buildroot] [PATCH 6/7] new package: ti-sgx top level package for SGX graphics accelerator Lothar Felten
2016-07-12 14:57   ` Thomas Petazzoni
2016-07-12  8:26 ` [Buildroot] [PATCH 7/7] add ti-sgx package to menu Lothar Felten

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.