new package: ti-sgx - SGX graphics acceleration for TI SoCs
cover new package: ti-sgx - SGX graphics acceleration for TI SoCs
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
Signature · 1 line
1.9.1
PATCH 1/7 ti-gfx: config help text: list supported processors
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.
--- package/ti-gfx/Config.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/ti-gfx/Config.in +3 -1
@@ -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
PATCH 1/7 ti-gfx: config help text: list supported processors
Hello,
Quoted 8 lines · 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.
Signed-off-by Lothar Felten <[email protected]>--- package/ti-gfx/Config.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/7 new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator
In reply to Lothar FeltenThis package adds the kernel module for the SGX graphics accelerator of the following parts: AM335x, AM437x, AM4430, AM5430
--- 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
package/ti-sgx/ti-sgx-km/Config.in new file +4 -0
@@ -0,0 +1,4 @@ +config BR2_PACKAGE_TI_SGX_KM + bool "kernel module" + help + TI SGX kernel module
package/ti-sgx/ti-sgx-km/ti-sgx-km.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 47728ff8fc48827116cc042efa777a22a83dd4bd17c494e2a53b8c204ca59624 ti-sgx-km-2b7523d07a13ab704a24a7664749551f4a13ed32.tar.gz
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/7 new package: ti-sgx/ti-sgx-km kernel module SGX graphics accelerator
Hello,
Quoted 4 lines · Lothar Felten
This package adds the kernel module for the SGX graphics accelerator of the following parts: AM335x, AM437x, AM4430, AM5430
Signed-off-by Lothar Felten <[email protected]>
The title should be:
ti-sgx-km: new package
Quoted 3 lines
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
package/ti-sgx/ti-sgx-km/Config.in line 2
Quoted 8 lines
package/ti-sgx/ti-sgx-km/Config.in new file +2
-0@@ -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.
package/ti-sgx/ti-sgx-km/Config.in line 4
Quoted 2 lines
package/ti-sgx/ti-sgx-km/Config.in new file +2
-0+ help + TI SGX kernel module
Would be good to mention what it is useful for, and add a reference to the "upstream" project.
Quoted 6 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +0
-0
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk line 9
Quoted 9 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +9
-0@@ -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.
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk line 10
Quoted 1 line
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +1
-0+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.
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk line 12
Quoted 2 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +2
-0+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.
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk line 21
Quoted 9 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +9
-0+ +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.
Quoted 6 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +6
-0+ +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)
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk line 37
Quoted 10 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +10
-0+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
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk line 48
Quoted 10 lines
package/ti-sgx/ti-sgx-km/ti-sgx-km.mk new file +10
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/7 new package: ti-sgx/ti-sgx-um binary libraries SGX graphics accelerator
In reply to Lothar FeltenThis package adds the binary libraries required to use the SGX graphics accelerator. It corresponds to the ti-sgx/ti-sgx-km kernel module package.
--- 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
package/ti-sgx/ti-sgx-um/Config.in new file +4 -0
@@ -0,0 +1,4 @@ +config BR2_PACKAGE_TI_SGX_UM + bool "userspace libraries" + help + TI SGX userspace libraries
package/ti-sgx/ti-sgx-um/S80ti-sgx new file +16 -0
@@ -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
package/ti-sgx/ti-sgx-um/powervr.ini new file +5 -0
@@ -0,0 +1,5 @@ +[default] +WindowSystem=libpvrDRMWSEGL_FRONT.so +#WindowSystem=libpvrDRMWSEGL.so +DisableHWTQTextureUpload=1 +
package/ti-sgx/ti-sgx-um/ti-sgx-um.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 c17f23d255cff8fe72fc3f5cae3d7550e387af07d036954b4f08e573379406d0 ti-sgx-um-e15f1543bab4de9e8927a2c4934addf3fd16ffcb.tar.gz
package/ti-sgx/ti-sgx-um/ti-sgx-um.mk new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 3/7 new package: ti-sgx/ti-sgx-um binary libraries SGX graphics accelerator
Hello,
Quoted 2 lines · Lothar Felten
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.
package/ti-sgx/ti-sgx-um/Config.in line 2
Quoted 8 lines
package/ti-sgx/ti-sgx-um/Config.in new file +2
-0@@ -0,0 +1,4 @@ +config BR2_PACKAGE_TI_SGX_UM + bool "userspace libraries"
Should be "ti-sgx-um"
package/ti-sgx/ti-sgx-um/S80ti-sgx line 4
Quoted 12 lines
package/ti-sgx/ti-sgx-um/Config.in new file +2
-0+ help + TI SGX userspace librariespackage/ti-sgx/ti-sgx-um/S80ti-sgx new file +4
-0@@ -0,0 +1,16 @@ +#!/bin/sh +case "$1" in + start) +
Unneeded empty line.
package/ti-sgx/ti-sgx-um/S80ti-sgx line 5
Quoted 1 line
package/ti-sgx/ti-sgx-um/S80ti-sgx new file +1
-0+ echo "Initializing SGX graphics driver"
Should be:
printf "Initializing SGX graphics driver: "
to avoid the newline.
package/ti-sgx/ti-sgx-um/S80ti-sgx line 7
Quoted 2 lines
package/ti-sgx/ti-sgx-um/S80ti-sgx new file +2
-0+ /usr/bin/pvrsrvinit + echo " OK"
Please test the error:
[ $? = 0 ] && echo "OK" || echo "FAIL"
package/ti-sgx/ti-sgx-um/powervr.ini line 3
Quoted 9 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +3
-0@@ -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.
package/ti-sgx/ti-sgx-um/powervr.ini line 5
Quoted 2 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +2
-0+DisableHWTQTextureUpload=1 +
Unneded empty line.
package/ti-sgx/ti-sgx-um/powervr.ini
Quoted 3 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +3
-0+# 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.
package/ti-sgx/ti-sgx-um/powervr.ini
Quoted 5 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +5
-0+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.
package/ti-sgx/ti-sgx-um/powervr.ini
Quoted 3 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +3
-0+ +TI_SGX_UM_MAKE_STAGING_OPTS = \ + $(LINUX_MAKE_FLAGS) \
This seems weird. Why do you need the kernel build flags for a userspace library.
package/ti-sgx/ti-sgx-um/powervr.ini
Quoted 5 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +5
-0+ 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.
package/ti-sgx/ti-sgx-um/powervr.ini
Quoted 13 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +13
-0+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.
package/ti-sgx/ti-sgx-um/powervr.ini
Quoted 10 lines
package/ti-sgx/ti-sgx-um/powervr.ini new file +10
-0+ # 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 4/7 new package: ti-sgx/ti-sgx-libgbm libgbm for SGX graphics accelerator
In reply to Lothar FeltenThis package adds a custom ti version of libgbm required by the binary libraries of the ti-sgx/ti-sgx-um package.
--- 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
package/ti-sgx/ti-sgx-libgbm/Config.in new file +5 -0
@@ -0,0 +1,5 @@ +config BR2_PACKAGE_TI_SGX_LIBGBM + bool "libgbm, ti variant" + help + TI SGX libgbm variant +
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 ecf9848a5cdc46249b3bb6d1119118ab62e926e4826a1dcac6d927c247a26b57 ti-sgx-libgbm-cb86a2f2cecd41023bf1bf12fbcf11be11220f31.tar.gz
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 4/7 new package: ti-sgx/ti-sgx-libgbm libgbm for SGX graphics accelerator
Hello,
Quoted 4 lines · Lothar Felten
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 <[email protected]>
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.
Quoted 15 lines
--- 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.mkpackage/ti-sgx/ti-sgx-libgbm/Config.in new file +0
-0
package/ti-sgx/ti-sgx-libgbm/Config.in line 2
Quoted 2 lines
package/ti-sgx/ti-sgx-libgbm/Config.in new file +2
-0@@ -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"
package/ti-sgx/ti-sgx-libgbm/Config.in line 4
Quoted 2 lines
package/ti-sgx/ti-sgx-libgbm/Config.in new file +2
-0+ help + TI SGX libgbm variant
More details + upstream link.
Quoted 10 lines
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +4
-0@@ -0,0 +1,41 @@ +################################################################################ +# +# ti-sgx-libgbm +#
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk line 14
Quoted 10 lines
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +10
-0+################################################################################ + +# 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).
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk line 16
Quoted 1 line
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +1
-0+# 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.
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk line 23
Quoted 7 lines
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +7
-0+# 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 ?
Quoted 5 lines
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +5
-0+define TI_SGX_LIBGBM_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr \ + STRIP=/bin/true \ + DESTDIR=$(TARGET_DIR) \
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk line 39
Quoted 10 lines
package/ti-sgx/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +10
-0+ 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 5/7 new package: ti-sgx/ti-sgx-demos SGX binary demos
In reply to Lothar FeltenThis package adds the SGX demos from Imagination Technologies. The demos are available as binaries only.
--- 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
package/ti-sgx/ti-sgx-demos/Config.in new file +4 -0
@@ -0,0 +1,4 @@ +config BR2_PACKAGE_TI_SGX_DEMOS + bool "sgx powervr demo binaries" + help + TI SGX powervr demos
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 9d1d4da2c2b35303e239f99eb4003b8b206078a682aa083d5fb831ee4197f3bf ti-sgx-demos-f24650bc8243b25c23d6a0a502ed79fc472ac424.tar.gz
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk new file +20 -0
@@ -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))
Signature · 1 line
1.9.1
PATCH 5/7 new package: ti-sgx/ti-sgx-demos SGX binary demos
Hello,
Quoted 4 lines · Lothar Felten
This package adds the SGX demos from Imagination Technologies. The demos are available as binaries only.
Signed-off-by Lothar Felten <[email protected]>
Commit title should be:
ti-sgx-demos: new package
package/ti-sgx/ti-sgx-demos/Config.in line 2
Quoted 8 lines
package/ti-sgx/ti-sgx-demos/Config.in new file +2
-0@@ -0,0 +1,4 @@ +config BR2_PACKAGE_TI_SGX_DEMOS + bool "sgx powervr demo binaries"
bool "ti-sgx-demos"
package/ti-sgx/ti-sgx-demos/Config.in line 4
Quoted 2 lines
package/ti-sgx/ti-sgx-demos/Config.in new file +2
-0+ help + TI SGX powervr demos
More details + upstream link.
Quoted 6 lines
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk new file +0
-0
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk line 9
Quoted 9 lines
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk new file +9
-0@@ -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.
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk line 13
Quoted 4 lines
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk new file +4
-0+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.
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk line 17
Quoted 3 lines
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk new file +3
-0+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.
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk line 18
Quoted 1 line
package/ti-sgx/ti-sgx-demos/ti-sgx-demos.mk new file +1
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 6/7 new package: ti-sgx top level package for SGX graphics accelerator
In reply to Lothar FeltenThis 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.
--- 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
package/ti-sgx/Config.in new file +71 -0
@@ -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
package/ti-sgx/ti-sgx.mk new file +8 -0
@@ -0,0 +1,8 @@ +################################################################################ +# +# ti-sgx (virtual) +# +################################################################################ +include $(sort $(wildcard package/ti-sgx/*/*.mk)) +#$(eval $(virtual-package)) +#$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH 6/7 new package: ti-sgx top level package for SGX graphics accelerator
Hello,
Quoted 2 lines · Lothar Felten
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 7/7 add ti-sgx package to menu
In reply to Lothar FeltenAdd the ti-sgx package to the Target Packages / Hardware handling menu
--- package/Config.in | 1 + 1 file changed, 1 insertion(+)
package/Config.in +1 -0
@@ -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"
Signature · 1 line
1.9.1