Skip to contentSkip to conversation

Enable non-SGX build for AM3/AM4

PATCH In review Eric Ruei 2 participants 5 messages Dec 1, 2015 – Dec 3, 2015

lore
Share & tools
lore

Eric Ruei

author
#0 lore raw

v2 cover Enable non-SGX build for AM3/AM4

Enhance meta-ti (and meta-arago) recipes to enable SGX/software rendering graphics support based on whether SGX is included at Machine Feature list.

Major changes since V1:
- Invoke SGX DDK kernel module (omapdrm-pvr.ko) build recipe only if SGX is available

Eric Ruei (2):
conf/layer.conf: Build omapdrm-pvr only if SGX is included
omap5-sgx-ddk-um-linux: Configure DDK UM based on the availability of
SGX

 conf/layer.conf                                            |  2 +-
 .../libgles/omap5-sgx-ddk-um-linux_1.9.0.12.bb             | 14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 1/2 conf/layer.conf: Build omapdrm-pvr only if SGX is included

Enable non-SGX build for AM3/AM4:
Build SGX DDK kernel module (omapdrm-pvr.ko) only if SGX is not included at MACHINE_FEATURES.

---
 conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/layer.conf +1 -1
index 51da372..f471e72 100644
@@ -11,7 +11,7 @@ BBFILE_PRIORITY_meta-ti = "6"
 LICENSE_PATH += "${LAYERDIR}/licenses"
 
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
-    omapdrm-pvr \
+    ${@base_contains('MACHINE_FEATURES', 'sgx', 'omapdrm-pvr', ' ', d)} \
     omap5-sgx-ddk-um-linux \
     ti-ipc \
     cmem-mod \
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH V2 1/2] conf/layer.conf: Build omapdrm-pvr only if SGX is included

Quoted 5 lines · Eric Ruei

Enable non-SGX build for AM3/AM4:
Build SGX DDK kernel module (omapdrm-pvr.ko) only if SGX is not included at MACHINE_FEATURES.

^^^^ Still problems with gitconfig?

Quoted 9 lines
---
 conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/layer.conf +0 -0
index 51da372..f471e72 100644

conf/layer.conf BBFILE_PRIORITY_meta-ti = "6" · line 14

Quoted 5 lines
conf/layer.conf +1 -1
@@ -11,7 +11,7 @@ BBFILE_PRIORITY_meta-ti = "6"
 LICENSE_PATH += "${LAYERDIR}/licenses"
 
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
-    omapdrm-pvr \
+    ${@base_contains('MACHINE_FEATURES', 'sgx', 'omapdrm-pvr', ' ', d)} \

You don't really need to do this.

Quoted 11 lines
conf/layer.conf +0 -0
     omap5-sgx-ddk-um-linux \
     ti-ipc \
     cmem-mod \
Signature · 7 lines
1.9.1

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
author
#3 lore raw

PATCH v2 2/2 omap5-sgx-ddk-um-linux: Configure DDK UM based on the availability of SGX

In reply to Eric Ruei

From: Eric Ruei <a0850410@uda0850410>

Enable non-SGX build for AM3/AM4:
- Remove SGX init support if SGX is not included at MACHINE_FEATURES.
- For ti43x: Select DDK UM libaries based on whether SGX is available NullDRM libraries if SGX is not available DRM/Wayland libraries if SGX is available Select plugin lists based on whether SGX is available

Note: The nullDRM DDK libraries are still required for QT5 library and
application build for the non-SGX build, however, the SGX related APIs will not be invoked at the software rendering mode.

---
 .../libgles/omap5-sgx-ddk-um-linux_1.9.0.12.bb             | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
recipes-graphics/libgles/omap5-sgx-ddk-um-linux_1.9.0.12.bb +8 -6
index 8b032e3..0aefb33 100644
@@ -7,12 +7,12 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 BRANCH_omap-a15 = "master"
 BRANCH_ti33x = "am3/k4.1"
-BRANCH_ti43x = "am4/k4.1"
+BRANCH_ti43x = "${@base_contains('MACHINE_FEATURES', 'sgx', 'am4/k4.1', 'am3/k4.1', d)}"
 
 SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git;protocol=git;branch=${BRANCH}"
 SRCREV_omap-a15 = "d63cd6469fff610317a8e1c986f227bb3e7922f6"
 SRCREV_ti33x    = "84ae5444c7cbc3f4c65a226b9fea62d4a513f3e0"
-SRCREV_ti43x    = "fdf4c0b594ca142a68aabb4c3f82b75be50b46cc"
+SRCREV_ti43x    = "${@base_contains('MACHINE_FEATURES', 'sgx', 'fdf4c0b594ca142a68aabb4c3f82b75be50b46cc', '84ae5444c7cbc3f4c65a226b9fea62d4a513f3e0', d)}"
 
 INITSCRIPT_NAME = "pvr-init"
 INITSCRIPT_PARAMS = "defaults 8"
@@ -44,15 +44,17 @@ do_install () {
     install -m 0644 ${WORKDIR}/powervr.ini ${D}${sysconfdir}/
 }
 
-FILES_${PN} =  "${bindir}/*"
+FILES_${PN} =  "${@base_contains('MACHINE_FEATURES', 'sgx', '${bindir}/*', '', d)}"
 FILES_${PN} += " ${libdir}/*"
 FILES_${PN} +=  "${includedir}/* /usr/share/sgx-lib/"
-FILES_${PN} += "${sysconfdir}/init.d/pvr-init"
-FILES_${PN} += "${sysconfdir}/powervr.ini"
+FILES_${PN} += "${@base_contains('MACHINE_FEATURES', 'sgx', '${sysconfdir}/init.d/pvr-init', '', d)}"
+FILES_${PN} += "${@base_contains('MACHINE_FEATURES', 'sgx', '${sysconfdir}/powervr.ini', '', d)}"
 
 PACKAGES =+ "${PN}-plugins"
+SGX_PLUGINS_FILES_NULLDRM = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrDRMWSEGL.so ${libdir}/libpvrDRMWSEGL_FRONT.so "
+SGX_PLUGINS_FILES_DRM = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrws_WAYLAND.so ${libdir}/libpvrws_KMS.so "
 FILES_${PN}-plugins = ""
-FILES_${PN}-plugins_ti43x = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrws_WAYLAND.so ${libdir}/libpvrws_KMS.so "
+FILES_${PN}-plugins_ti43x = "${@base_contains('MACHINE_FEATURES', 'sgx', SGX_PLUGINS_FILES_DRM, SGX_PLUGINS_FILES_NULLDRM, d)}"
 FILES_${PN}-plugins_ti33x = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrDRMWSEGL.so ${libdir}/libpvrDRMWSEGL_FRONT.so "
 RDEPENDS_${PN} += "${PN}-plugins"
 
Signature · 1 line
1.9.1
#4 lore raw

Re: [PATCH V2 2/2] omap5-sgx-ddk-um-linux: Configure DDK UM based on the availability of SGX

Quoted 9 lines · Eric Ruei

From: Eric Ruei <a0850410@uda0850410>

Enable non-SGX build for AM3/AM4:
- Remove SGX init support if SGX is not included at MACHINE_FEATURES.
- For ti43x: Select DDK UM libaries based on whether SGX is available NullDRM libraries if SGX is not available DRM/Wayland libraries if SGX is available Select plugin lists based on whether SGX is available

Quoted 3 lines

Note: The nullDRM DDK libraries are still required for QT5 library and
application build for the non-SGX build, however, the SGX related APIs will not be invoked at the software rendering mode.

Why not use Mesa instead? Why do you need to patch libgles libraries for siftware rendering?

Quoted 1 line

^^^^

Quoted 53 lines
---
 .../libgles/omap5-sgx-ddk-um-linux_1.9.0.12.bb             | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
recipes-graphics/libgles/omap5-sgx-ddk-um-linux_1.9.0.12.bb +8 -6
index 8b032e3..0aefb33 100644
@@ -7,12 +7,12 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 BRANCH_omap-a15 = "master"
 BRANCH_ti33x = "am3/k4.1"
-BRANCH_ti43x = "am4/k4.1"
+BRANCH_ti43x = "${@base_contains('MACHINE_FEATURES', 'sgx', 'am4/k4.1', 'am3/k4.1', d)}"
 
 SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git;protocol=git;branch=${BRANCH}"
 SRCREV_omap-a15 = "d63cd6469fff610317a8e1c986f227bb3e7922f6"
 SRCREV_ti33x    = "84ae5444c7cbc3f4c65a226b9fea62d4a513f3e0"
-SRCREV_ti43x    = "fdf4c0b594ca142a68aabb4c3f82b75be50b46cc"
+SRCREV_ti43x    = "${@base_contains('MACHINE_FEATURES', 'sgx', 'fdf4c0b594ca142a68aabb4c3f82b75be50b46cc', '84ae5444c7cbc3f4c65a226b9fea62d4a513f3e0', d)}"
 
 INITSCRIPT_NAME = "pvr-init"
 INITSCRIPT_PARAMS = "defaults 8"
@@ -44,15 +44,17 @@ do_install () {
     install -m 0644 ${WORKDIR}/powervr.ini ${D}${sysconfdir}/
 }
 
-FILES_${PN} =  "${bindir}/*"
+FILES_${PN} =  "${@base_contains('MACHINE_FEATURES', 'sgx', '${bindir}/*', '', d)}"
 FILES_${PN} += " ${libdir}/*"
 FILES_${PN} +=  "${includedir}/* /usr/share/sgx-lib/"
-FILES_${PN} += "${sysconfdir}/init.d/pvr-init"
-FILES_${PN} += "${sysconfdir}/powervr.ini"
+FILES_${PN} += "${@base_contains('MACHINE_FEATURES', 'sgx', '${sysconfdir}/init.d/pvr-init', '', d)}"
+FILES_${PN} += "${@base_contains('MACHINE_FEATURES', 'sgx', '${sysconfdir}/powervr.ini', '', d)}"
 
 PACKAGES =+ "${PN}-plugins"
+SGX_PLUGINS_FILES_NULLDRM = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrDRMWSEGL.so ${libdir}/libpvrDRMWSEGL_FRONT.so "
+SGX_PLUGINS_FILES_DRM = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrws_WAYLAND.so ${libdir}/libpvrws_KMS.so "
 FILES_${PN}-plugins = ""
-FILES_${PN}-plugins_ti43x = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrws_WAYLAND.so ${libdir}/libpvrws_KMS.so "
+FILES_${PN}-plugins_ti43x = "${@base_contains('MACHINE_FEATURES', 'sgx', SGX_PLUGINS_FILES_DRM, SGX_PLUGINS_FILES_NULLDRM, d)}"
 FILES_${PN}-plugins_ti33x = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libpvrDRMWSEGL.so ${libdir}/libpvrDRMWSEGL_FRONT.so "
 RDEPENDS_${PN} += "${PN}-plugins"
 
Signature · 7 lines
1.9.1

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti