Skip to contentSkip to conversation

package/ti-sgx-km: new package

PATCH New Lothar Felten 2 participants 8 messages Jul 14, 2016 – Jul 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/4 package/ti-sgx-km: new package

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

---
 package/Config.in                |  1 +
 package/ti-sgx-km/Config.in      | 42 +++++++++++++++++++++++++++++++++++++++
 package/ti-sgx-km/ti-sgx-km.hash |  2 ++
 package/ti-sgx-km/ti-sgx-km.mk   | 43 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 88 insertions(+)
 create mode 100644 package/ti-sgx-km/Config.in
 create mode 100644 package/ti-sgx-km/ti-sgx-km.hash
 create mode 100644 package/ti-sgx-km/ti-sgx-km.mk
package/Config.in +1 -0
index 7d6924c..592a880 100644
@@ -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-km/Config.in"
 	source "package/ti-uim/Config.in"
 	source "package/ti-utils/Config.in"
 	source "package/triggerhappy/Config.in"
package/ti-sgx-km/Config.in new file +42 -0

42 lines not on this page · raw message

package/ti-sgx-km/ti-sgx-km.hash new file +2 -0
new file mode 100644
index 0000000..7f7e0ac
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 47728ff8fc48827116cc042efa777a22a83dd4bd17c494e2a53b8c204ca59624 ti-sgx-km-2b7523d07a13ab704a24a7664749551f4a13ed32.tar.gz
package/ti-sgx-km/ti-sgx-km.mk new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 2/4 package/ti-sgx-um: new package

This package adds the userspace libraries for the SGX graphics accelerator of the following Texas Instruments SoCs: AM335x, AM437x, AM4430, AM5430 It also adds a config file for the libraries and a System-V init script.

---
 package/Config.in                |  1 +
 package/ti-sgx-um/Config.in      | 29 +++++++++++++++++++++++++++++
 package/ti-sgx-um/S80ti-sgx      | 14 ++++++++++++++
 package/ti-sgx-um/powervr.ini    |  6 ++++++
 package/ti-sgx-um/ti-sgx-um.hash |  2 ++
 package/ti-sgx-um/ti-sgx-um.mk   | 38 ++++++++++++++++++++++++++++++++++++++
 6 files changed, 90 insertions(+)
 create mode 100644 package/ti-sgx-um/Config.in
 create mode 100644 package/ti-sgx-um/S80ti-sgx
 create mode 100644 package/ti-sgx-um/powervr.ini
 create mode 100644 package/ti-sgx-um/ti-sgx-um.hash
 create mode 100644 package/ti-sgx-um/ti-sgx-um.mk
package/Config.in +1 -0
index 592a880..91109f5 100644
@@ -452,6 +452,7 @@ endmenu
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
 	source "package/ti-sgx-km/Config.in"
+	source "package/ti-sgx-um/Config.in"
 	source "package/ti-uim/Config.in"
 	source "package/ti-utils/Config.in"
 	source "package/triggerhappy/Config.in"
package/ti-sgx-um/Config.in new file +29 -0
new file mode 100644
index 0000000..5bfb8b6
@@ -0,0 +1,29 @@
+config BR2_PACKAGE_TI_SGX_UM
+	bool "ti-sgx-um"
+	depends on BR2_PACKAGE_TI_SGX_KM
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBDRM_OMAP
+	select BR2_PACKAGE_HAS_LIBEGL
+	select BR2_PACKAGE_HAS_LIBGLES
+	select BR2_PACKAGE_HAS_POWERVR
+	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.
+	 
+	  http://git.ti.com/graphics/omap5-sgx-ddk-um-linux
+
+if BR2_PACKAGE_TI_SGX_UM
+
+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"
+
+endif
package/ti-sgx-um/S80ti-sgx new file +14 -0
new file mode 100644
index 0000000..8cae52f
@@ -0,0 +1,14 @@
+#!/bin/sh
+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
+  ;;
+esac
package/ti-sgx-um/powervr.ini new file +6 -0
new file mode 100644
index 0000000..fc92d45
@@ -0,0 +1,6 @@
+[default]
+#defaul library without double buffering:
+WindowSystem=libpvrDRMWSEGL_FRONT.so
+#alternative library, slower but with double buffering
+#WindowSystem=libpvrDRMWSEGL.so
+DisableHWTQTextureUpload=1
package/ti-sgx-um/ti-sgx-um.hash new file +2 -0
new file mode 100644
index 0000000..a6a0566
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 c17f23d255cff8fe72fc3f5cae3d7550e387af07d036954b4f08e573379406d0 ti-sgx-um-e15f1543bab4de9e8927a2c4934addf3fd16ffcb.tar.gz
package/ti-sgx-um/ti-sgx-um.mk new file +38 -0
new file mode 100644
index 0000000..f5d2327
@@ -0,0 +1,38 @@
+################################################################################
+#
+# ti-sgx-um
+#
+################################################################################
+
+# This correpsonds to SDK 02.00.00.00
+TI_SGX_UM_VERSION = e15f1543bab4de9e8927a2c4934addf3fd16ffcb
+TI_SGX_UM_SITE = http://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 is a egl/gles provider only if libdrm is installed
+TI_SGX_UM_DEPENDENCIES = libdrm
+
+define TI_SGX_UM_INSTALL_STAGING_CMDS
+	$(MAKE) DISCIMAGE=$(STAGING_DIR) install -C $(@D)
+endef
+
+define TI_SGX_UM_INSTALL_TARGET_CMDS
+	$(MAKE) DISCIMAGE=$(TARGET_DIR) install -C $(@D)
+endef
+
+define TI_SGX_UM_INSTALL_CONF
+        # libs use the following file for configuration.
+        $(INSTALL) -D -m 0644 package/ti-sgx-um/powervr.ini \
+                $(TARGET_DIR)/etc/powervr.ini
+endef
+
+TI_SGX_UM_POST_INSTALL_TARGET_HOOKS += TI_SGX_UM_INSTALL_CONF
+
+define TI_SGX_UM_INSTALL_INIT_SYSV
+        $(INSTALL) -D -m 0755 package/ti-sgx-um/S80ti-sgx \
+                $(TARGET_DIR)/etc/init.d/S80ti-sgx
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
#3 lore raw

PATCH v3 3/4 package/ti-sgx-demos: new package

In reply to Lothar Felten

This package adds the SGX demos from Imagination Technologies, they are available as binaries only.
This package contains binaries compiled for the SGX graphics accelerator used in the following Texas Instruments SoCs: AM335x, AM437x, AM4430, AM5430.

---
 package/Config.in                      |  1 +
 package/ti-sgx-demos/Config.in         | 10 ++++++++++
 package/ti-sgx-demos/ti-sgx-demos.hash |  2 ++
 package/ti-sgx-demos/ti-sgx-demos.mk   | 18 ++++++++++++++++++
 4 files changed, 31 insertions(+)
 create mode 100644 package/ti-sgx-demos/Config.in
 create mode 100644 package/ti-sgx-demos/ti-sgx-demos.hash
 create mode 100644 package/ti-sgx-demos/ti-sgx-demos.mk
package/Config.in +1 -0
index 91109f5..0f05c3b 100644
@@ -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-demos/Config.in"
 	source "package/ti-sgx-km/Config.in"
 	source "package/ti-sgx-um/Config.in"
 	source "package/ti-uim/Config.in"
package/ti-sgx-demos/Config.in new file +10 -0
new file mode 100644
index 0000000..52c58e5
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_TI_SGX_DEMOS
+	bool "ti-sgx-demos"
+	select BR2_PACKAGE_TI_SGX_KM
+	select BR2_PACKAGE_TI_SGX_UM
+	help
+	  These SGX powervr demo applications from Imagination Technologies are
+	  availabe as binaries only.
+	  The binaries are compiled for the TI SGX implementation.
+	
+	  http://git.ti.com/graphics/img-pvr-sdk
package/ti-sgx-demos/ti-sgx-demos.hash new file +2 -0
new file mode 100644
index 0000000..43acf91
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 9d1d4da2c2b35303e239f99eb4003b8b206078a682aa083d5fb831ee4197f3bf ti-sgx-demos-f24650bc8243b25c23d6a0a502ed79fc472ac424.tar.gz
package/ti-sgx-demos/ti-sgx-demos.mk new file +18 -0
new file mode 100644
index 0000000..6891282
@@ -0,0 +1,18 @@
+################################################################################
+#
+# ti-sgx-demos
+#
+################################################################################
+
+# This correpsonds to SDK 02.00.00.00
+TI_SGX_DEMOS_VERSION = f24650bc8243b25c23d6a0a502ed79fc472ac424
+TI_SGX_DEMOS_SITE = http://git.ti.com/graphics/img-pvr-sdk.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* \
+		$(TARGET_DIR)/usr/bin/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
#5 lore raw

PATCH v3 4/4 package/ti-gfx: config help text: list SoCs

In reply to Lothar Felten

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 to the help text.

---
 package/ti-gfx/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/ti-gfx/Config.in +3 -1
index 39b0a93..e4a102f 100644
@@ -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/
 
Signature · 1 line
1.9.1
#7 lore raw

PATCH v3 1/4 package/ti-sgx-km: new package

In reply to Lothar Felten

Hello,

package/ti-sgx-km/Config.in line 3

Quoted 3 lines · Lothar Felten
package/ti-sgx-km/Config.in new file +3 -0
+config BR2_PACKAGE_TI_SGX_KM
+	bool "ti-sgx-km"
+	depends on BR2_LINUX_KERNEL && BR2_arm

When there is a dependency on BR2_LINUX_KERNEL, we normally add a Config.in comment about this, so I've added that.

package/ti-sgx-km/Config.in line 9

Quoted 6 lines
package/ti-sgx-km/Config.in new file +6 -0
+	select BR2_LINUX_NEEDS_MODULES
+	help
+	  Kernel modules for TI CPUs with SGX 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.

I tried building with a vanilla Linux kernel, and it failed due to some missing SGX specific headers. A TI specific kernel is needed, so I've extended the help text with this information.

package/ti-sgx-km/ti-sgx-km.mk line 9

Quoted 3 lines
package/ti-sgx-km/ti-sgx-km.mk new file +3 -0
+# This correpsonds to SDK 02.00.00.00
+TI_SGX_KM_VERSION = 2b7523d07a13ab704a24a7664749551f4a13ed32
+TI_SGX_KM_SITE = http://git.ti.com/graphics/omap5-sgx-ddk-linux.git

Fetching over http:// doesn't work, it seems like you didn't test this properly (you still add the tarball in your BR2_DL_DIR cache). So I've reverted back to fetching from git://.

Applied with those changes.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v3 2/4 package/ti-sgx-um: new package

In reply to Lothar Felten

Hello,

Quoted 5 lines · Lothar Felten

This package adds the userspace libraries for the SGX graphics accelerator of the following Texas Instruments SoCs: AM335x, AM437x, AM4430, AM5430 It also adds a config file for the libraries and a System-V init script.

Quoted 13 lines
---
 package/Config.in                |  1 +
 package/ti-sgx-um/Config.in      | 29 +++++++++++++++++++++++++++++
 package/ti-sgx-um/S80ti-sgx      | 14 ++++++++++++++
 package/ti-sgx-um/powervr.ini    |  6 ++++++
 package/ti-sgx-um/ti-sgx-um.hash |  2 ++
 package/ti-sgx-um/ti-sgx-um.mk   | 38 ++++++++++++++++++++++++++++++++++++++
 6 files changed, 90 insertions(+)
 create mode 100644 package/ti-sgx-um/Config.in
 create mode 100644 package/ti-sgx-um/S80ti-sgx
 create mode 100644 package/ti-sgx-um/powervr.ini
 create mode 100644 package/ti-sgx-um/ti-sgx-um.hash
 create mode 100644 package/ti-sgx-um/ti-sgx-um.mk

Applied, with the following changes:

[Thomas:
- Add Config.in comment about the ti-sgx-km dependency.
- Add dependency on glibc since the package consists of pre-built libraries that can only work with glibc.
- Add Config.in comment about thread and glibc dependencies
- Use tabs for indentation everywhere.
- Use git:// instead of http:// to clone, since http:// doesn't work.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v3 4/4 package/ti-gfx: config help text: list SoCs

In reply to Lothar Felten

Hello,

package/ti-gfx/Config.in config BR2_PACKAGE_TI_GFX · line 13

Quoted 1 line · Lothar Felten
package/ti-gfx/Config.in +1 -0
+	  For newer CPUs or kernels use the ti-sgx package.

There is no such thing as the ti-sgx package anymore, so I've updated that, and applied your patch.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v3 3/4 package/ti-sgx-demos: new package

In reply to Lothar Felten

Hello,

package/ti-sgx-demos/Config.in line 4

Quoted 10 lines · Lothar Felten
package/ti-sgx-demos/Config.in new file +4 -0
new file mode 100644
index 0000000..52c58e5
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_TI_SGX_DEMOS
+	bool "ti-sgx-demos"
+	select BR2_PACKAGE_TI_SGX_KM
+	select BR2_PACKAGE_TI_SGX_UM

I've replaced that with:

depends on BR2_PACKAGE_TI_SGX_UM

otherwise with a "select" you would have to replicate all the depends on from ti-sgx-um and ti-sgx-km. Also, it's pretty obvious that the demos for SGX will be only available if SGX is enabled.

package/ti-sgx-demos/Config.in line 7

Quoted 3 lines
package/ti-sgx-demos/Config.in new file +3 -0
+# This correpsonds to SDK 02.00.00.00
+TI_SGX_DEMOS_VERSION = f24650bc8243b25c23d6a0a502ed79fc472ac424
+TI_SGX_DEMOS_SITE = http://git.ti.com/graphics/img-pvr-sdk.git

Moved back to git://, which actually works.

Applied with those changes.

Thanks!

Thomas

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