* [Buildroot] [PATCH v2 2/5] package/ti-sgx-um: new package
2016-07-13 20:13 [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Lothar Felten
@ 2016-07-13 20:13 ` Lothar Felten
2016-07-13 20:13 ` [Buildroot] [PATCH v2 3/5] package/ti-sgx-demos: " Lothar Felten
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Lothar Felten @ 2016-07-13 20:13 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
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 ++++++++++++++++++++++++++++++++++++++
5 files changed, 89 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
diff --git a/package/ti-sgx-um/Config.in b/package/ti-sgx-um/Config.in
new file mode 100644
index 0000000..5bfb8b6
--- /dev/null
+++ b/package/ti-sgx-um/Config.in
@@ -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
diff --git a/package/ti-sgx-um/S80ti-sgx b/package/ti-sgx-um/S80ti-sgx
new file mode 100644
index 0000000..8cae52f
--- /dev/null
+++ b/package/ti-sgx-um/S80ti-sgx
@@ -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
diff --git a/package/ti-sgx-um/powervr.ini b/package/ti-sgx-um/powervr.ini
new file mode 100644
index 0000000..fc92d45
--- /dev/null
+++ b/package/ti-sgx-um/powervr.ini
@@ -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
diff --git a/package/ti-sgx-um/ti-sgx-um.hash b/package/ti-sgx-um/ti-sgx-um.hash
new file mode 100644
index 0000000..a6a0566
--- /dev/null
+++ b/package/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-um/ti-sgx-um.mk b/package/ti-sgx-um/ti-sgx-um.mk
new file mode 100644
index 0000000..f5d2327
--- /dev/null
+++ b/package/ti-sgx-um/ti-sgx-um.mk
@@ -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))
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 3/5] package/ti-sgx-demos: new package
2016-07-13 20:13 [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Lothar Felten
2016-07-13 20:13 ` [Buildroot] [PATCH v2 2/5] package/ti-sgx-um: " Lothar Felten
@ 2016-07-13 20:13 ` Lothar Felten
2016-07-13 20:13 ` [Buildroot] [PATCH v2 4/5] package/ti-gfx: config help text: list SoCs Lothar Felten
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Lothar Felten @ 2016-07-13 20:13 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
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 ++++++++++++++++++
3 files changed, 30 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
diff --git a/package/ti-sgx-demos/Config.in b/package/ti-sgx-demos/Config.in
new file mode 100644
index 0000000..52c58e5
--- /dev/null
+++ b/package/ti-sgx-demos/Config.in
@@ -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
diff --git a/package/ti-sgx-demos/ti-sgx-demos.hash b/package/ti-sgx-demos/ti-sgx-demos.hash
new file mode 100644
index 0000000..43acf91
--- /dev/null
+++ b/package/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-demos/ti-sgx-demos.mk b/package/ti-sgx-demos/ti-sgx-demos.mk
new file mode 100644
index 0000000..6891282
--- /dev/null
+++ b/package/ti-sgx-demos/ti-sgx-demos.mk
@@ -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))
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 4/5] package/ti-gfx: config help text: list SoCs
2016-07-13 20:13 [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Lothar Felten
2016-07-13 20:13 ` [Buildroot] [PATCH v2 2/5] package/ti-sgx-um: " Lothar Felten
2016-07-13 20:13 ` [Buildroot] [PATCH v2 3/5] package/ti-sgx-demos: " Lothar Felten
@ 2016-07-13 20:13 ` Lothar Felten
2016-07-13 20:13 ` [Buildroot] [PATCH v2 5/5] package/Config: ti-sgx-km, ti-sgx-um, ti-sgx-demos Lothar Felten
2016-07-14 8:39 ` [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Thomas Petazzoni
4 siblings, 0 replies; 7+ messages in thread
From: Lothar Felten @ 2016-07-13 20:13 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 to the help text.
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] 7+ messages in thread
* [Buildroot] [PATCH v2 5/5] package/Config: ti-sgx-km, ti-sgx-um, ti-sgx-demos
2016-07-13 20:13 [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Lothar Felten
` (2 preceding siblings ...)
2016-07-13 20:13 ` [Buildroot] [PATCH v2 4/5] package/ti-gfx: config help text: list SoCs Lothar Felten
@ 2016-07-13 20:13 ` Lothar Felten
2016-07-14 8:36 ` Thomas Petazzoni
2016-07-14 8:39 ` [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Thomas Petazzoni
4 siblings, 1 reply; 7+ messages in thread
From: Lothar Felten @ 2016-07-13 20:13 UTC (permalink / raw)
To: buildroot
Add the ti-sgx-km, ti-sgx-um and ti-sgx-demos packages to the Target Packages
/ Hardware handling menu.
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
package/Config.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/Config.in b/package/Config.in
index 1910251..e24aac1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -451,6 +451,9 @@ 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"
source "package/ti-utils/Config.in"
source "package/triggerhappy/Config.in"
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 5/5] package/Config: ti-sgx-km, ti-sgx-um, ti-sgx-demos
2016-07-13 20:13 ` [Buildroot] [PATCH v2 5/5] package/Config: ti-sgx-km, ti-sgx-um, ti-sgx-demos Lothar Felten
@ 2016-07-14 8:36 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2016-07-14 8:36 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 13 Jul 2016 22:13:39 +0200, Lothar Felten wrote:
> 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"
These three lines should go in each patch adding each of those packages.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package
2016-07-13 20:13 [Buildroot] [PATCH v2 1/5] package/ti-sgx-km: new package Lothar Felten
` (3 preceding siblings ...)
2016-07-13 20:13 ` [Buildroot] [PATCH v2 5/5] package/Config: ti-sgx-km, ti-sgx-um, ti-sgx-demos Lothar Felten
@ 2016-07-14 8:39 ` Thomas Petazzoni
4 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2016-07-14 8:39 UTC (permalink / raw)
To: buildroot
Hello,
Thanks for the respin. Looks much better! There are a few things that
remain.
On Wed, 13 Jul 2016 22:13:35 +0200, Lothar Felten wrote:
> +# 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
> +TI_SGX_KM_LICENSE = GPLv2 License
Just "GPLv2".
> +TI_SGX_KM_LICENSE_FILES = GPL-COPYING
> +
> +TI_SGX_KM_DEPENDENCIES = linux
> +
> +TI_SGX_KM_MAKE_OPTS = \
> + $(LINUX_MAKE_FLAGS) \
> + ARCH=arm \
ARCH is already in LINUX_MAKE_FLAGS.
> + KERNELDIR=$(LINUX_DIR) \
> + DISCIMAGE=$(TARGET_DIR) \
Why do you set DISCIMAGE here? It is nicer to only set is in the target
installation command, as it's only needed here.
> + PVR_NULLDRM=1
> +
> +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
You could use SUBDIR instead of SUBDIRECTORY.
> +
> +define TI_SGX_KM_BUILD_CMDS
> + $(MAKE) $(TI_SGX_KM_MAKE_OPTS) -C $(@D)/$(TI_SGX_KM_SUBDIRECTORY)
Please pass $(TARGET_MAKE_ENV) in the environment, i.e:
$(TARGET_MAKE_ENV) $(MAKE) ...
> +endef
> +
> +define TI_SGX_KM_INSTALL_TARGET_CMDS
> + $(MAKE) $(TI_SGX_KM_MAKE_OPTS) kbuild_install \
> + -C $(@D)/$(TI_SGX_KM_SUBDIRECTORY)
Ditto.
> +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] 7+ messages in thread