Skip to contentSkip to conversation

all: Graphics recipe overhaul

PATCH In review Randolph Sapp 2 participants 3 messages Jan 19, 2023 – Jan 20, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 all: Graphics recipe overhaul

Leverage the graphics changes introduced in meta-ti by the patch with the same name as this one. The following logic is applied:
1. oe-core sees the inclusion of opengl as a distro feature to be an invitation to build all graphics toolkits and libraries. We now follow suit. Remove opengl as a distro feature if you do not wish to have any graphics tools.
2. Rogue and SGX graphics libraries are out of tree modules and should be treated as such. Inclusion of them is optional through the use of powervr-rogue-graphics and powervr-sgx-graphics distro features and the appropriate packages will be selected based on the matching machine features.
3. The gpu machine feature was removed to assist with the inclusion of the two previously mentioned points. Anything wishing to build off of Arago with piecemeal graphics components should introduce their own package groups to do so.

---
 meta-arago-distro/conf/distro/arago.conf             |  2 +-
 .../conf/distro/include/branding-mainline.inc        |  4 ++--
 .../conf/distro/include/branding-next.inc            |  2 +-
 .../recipes-core/images/tisdk-core-bundle.inc        |  4 ++--
 .../recipes-core/images/tisdk-default-image.bb       | 12 +++++-------
 .../recipes-core/images/tisdk-thinlinux-image.bb     |  4 +---
 .../packagegroup-arago-tisdk-addons-sdk-target.bb    |  2 +-
 .../packagegroups/packagegroup-arago-tisdk-addons.bb |  2 +-
 .../packagegroup-arago-tisdk-graphics-sdk-target.bb  |  4 +---
 .../packagegroup-arago-tisdk-graphics.bb             |  4 +---
 .../packagegroup-arago-tisdk-gtk-sdk-target.bb       |  4 +---
 .../packagegroups/packagegroup-arago-tisdk-gtk.bb    |  4 +---
 .../packagegroups/packagegroup-arago-tisdk-hmi.bb    |  4 +---
 .../packagegroups/packagegroup-arago-tisdk-matrix.bb | 10 +++++-----
 ...packagegroup-arago-tisdk-multimedia-sdk-target.bb |  2 +-
 .../packagegroup-arago-tisdk-multimedia.bb           |  4 ++--
 .../packagegroups/packagegroup-arago-tisdk-qte.bb    |  4 +---
 .../packagegroup-arago-toolchain-tisdk-target.bb     |  6 +++---
 .../recipes-core/packagegroups/ti-analytics.bb       |  2 +-
 .../recipes-core/packagegroups/ti-demos.bb           |  2 +-
 .../recipes-core/packagegroups/ti-world.bb           | 10 +++++-----
 .../recipes-graphics/cairo/cairo_%.bbappend          |  3 ---
 .../gstreamer/gstreamer1.0-plugins-%.bbappend        |  6 ------
 .../matrix/matrix-gui-machinevision-demos_2.0.bb     |  2 +-
 .../matrix/matrix-gui-video-analytics-demos_2.0.bb   |  2 +-
 .../recipes-core/matrix/matrix-gui_2.0.bb            |  2 +-
 26 files changed, 41 insertions(+), 66 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/cairo/cairo_%.bbappend
 delete mode 100644 meta-arago-distro/recipes-multimedia/gstreamer/gstreamer1.0-plugins-%.bbappend
meta-arago-distro/conf/distro/arago.conf +1 -1
index d675b077..fde30cfe 100644
@@ -82,7 +82,7 @@ DISTRO_FEATURES = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
 DISTRO_FEATURES:remove = "x11"
 
 # Add additional distro features
-DISTRO_FEATURES:append = " pam wayland opengl"
+DISTRO_FEATURES:append = " pam wayland opengl powervr-sgx-graphics powervr-rogue-graphics"
 #DISTRO_FEATURES:append = " opencl"
 DISTRO_FEATURES:append = " opencv"
 DISTRO_FEATURES:append = " openmp"
meta-arago-distro/conf/distro/include/branding-mainline.inc +2 -2
index 2fc9dc5f..2e6198d3 100644
@@ -3,5 +3,5 @@ PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-mainline"
 PREFERRED_PROVIDER_u-boot = "u-boot-ti-mainline"
 SRCREV_ti-upstream-tools:pn-linux-ti-mainline = "${AUTOREV}"
 
-# GPU support requires out-of-tree SGX and RGX drivers not available in mainline
-MACHINE_FEATURES:remove = "gpu"
+# GPU support requires out-of-tree SGX and RGX rivers not available in mainline
+DISTRO_FEATURES:remove = "powervr-sgx-graphics powervr-rogue-graphics"
meta-arago-distro/conf/distro/include/branding-next.inc +1 -1
index a4fe66dc..e27db11a 100644
@@ -5,4 +5,4 @@ SRCREV:pn-linux-ti-next = "${AUTOREV}"
 SRCREV:pn-u-boot-ti-mainline = "${AUTOREV}"
 
 # GPU support requires out-of-tree SGX and RGX drivers not available in next
-MACHINE_FEATURES:remove = "gpu"
+DISTRO_FEATURES:remove = "powervr-sgx-graphics powervr-rogue-graphics"
meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc +2 -2
index 9da4b0d0..c7bd9629 100644
@@ -31,8 +31,8 @@ DTB_FILTER:j721s2 = "j721s2"
 # List of target side images to build for the SDK
 TARGET_IMAGES = "tisdk-base-image tisdk-default-image tisdk-thinlinux-image tisdk-bootstrap-image"
 
-TISDK_TOOLCHAIN = "${@bb.utils.contains('MACHINE_FEATURES','gpu','meta-toolchain-arago-tisdk','meta-toolchain-arago-tisdk-server',d)}"
-TOOLCHAIN_SUFFIX = "${@bb.utils.contains('MACHINE_FEATURES','gpu','-tisdk','-tisdk-server',d)}"
+TISDK_TOOLCHAIN = "${@bb.utils.contains('DISTRO_FEATURES','opengl','meta-toolchain-arago-tisdk','meta-toolchain-arago-tisdk-server',d)}"
+TOOLCHAIN_SUFFIX = "${@bb.utils.contains('DISTRO_FEATURES','opengl','-tisdk','-tisdk-server',d)}"
 
 IMAGE_INSTALL = "\
     packagegroup-arago-tisdk-amsdk-sdk-host \
meta-arago-distro/recipes-core/images/tisdk-default-image.bb +5 -7
index 8cd10429..ffe78ec9 100644
@@ -5,16 +5,14 @@ DESCRIPTION = "Complete Arago TI SDK filesystem image containing complete\
 
 require arago-image.inc
 
-SPLASH = "${@bb.utils.contains('MACHINE_FEATURES','gpu','psplash','',d)}"
-
 IMAGE_INSTALL += "\
     packagegroup-arago-base \
     packagegroup-arago-console \
     packagegroup-arago-base-tisdk \
     ti-test \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-graphics','',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-gtk','',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-qte','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-graphics','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-gtk','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-qte','',d)} \
     ${@['','packagegroup-arago-tisdk-opencl'][oe.utils.all_distro_features(d, 'opencl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]} \
     packagegroup-arago-tisdk-connectivity \
     packagegroup-arago-tisdk-crypto \
@@ -24,7 +22,7 @@ IMAGE_INSTALL += "\
     packagegroup-arago-tisdk-amsdk \
     packagegroup-arago-tisdk-addons \
     packagegroup-arago-tisdk-addons-extra \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-hmi','packagegroup-arago-base-tisdk-server-extra',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-hmi','packagegroup-arago-base-tisdk-server-extra',d)} \
     ti-analytics \
     ti-demos \
 "
@@ -51,7 +49,7 @@ EXTRABROWSERS = " \
 "
 
 PYTHON2APPS = " \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${EXTRABROWSERS}",'',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl',"${EXTRABROWSERS}",'',d)} \
     ${@bb.utils.contains("BBFILE_COLLECTIONS","browser-layer",bb.utils.contains('DISTRO_FEATURES','wayland',"${CHROMIUM}",'',d),'',d)} \
 "
 
meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bb +1 -3
index 8827ac16..1574fca3 100644
@@ -5,8 +5,6 @@ DESCRIPTION = "Minimal bootable image with container to start the next\
 
 require arago-image.inc
 
-SPLASH = "${@bb.utils.contains('MACHINE_FEATURES','gpu','psplash','',d)}"
-
 # Allow users to tack on additional packages as interesting.
 ARAGO_THIN_IMAGE_EXTRA_INSTALL ?= ""
 
@@ -14,7 +12,7 @@ IMAGE_INSTALL += "\
     packagegroup-arago-base \
     packagegroup-arago-console \
     packagegroup-arago-base-tisdk \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-graphics','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-graphics','',d)} \
     docker \
     ${ARAGO_THIN_IMAGE_EXTRA_INSTALL} \
 "
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons-sdk-target.bb +1 -1
index b6fe62ab..0cd1b540 100644
@@ -32,7 +32,7 @@ EXTRA_LIBS:append:dra7xx = " libulm-dev \
 "
 
 PDM_ANOMALY_PKG_DEV = "\
-    ${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'pdm-anomaly-detection-dev', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'pdm-anomaly-detection-dev', '', d)} \
 "
 
 
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb +1 -1
index 07ae8b07..cb972078 100644
@@ -66,7 +66,7 @@ UTILS:append:omapl138 = " ti-ipc-rtos-fw"
 
 UTILS:append:dra7xx = " \
                         ${UTILS_DSP} \
-                        ${@bb.utils.contains('MACHINE_FEATURES','gpu','glsdk-example-apps','',d)} \
+                        ${@bb.utils.contains('DISTRO_FEATURES','opengl','glsdk-example-apps','',d)} \
 "
 
 EXTRA_PACKAGES = " \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics-sdk-target.bb +1 -3
index 093b2d3f..acb06558 100644
@@ -4,9 +4,7 @@ PR = "r10"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit packagegroup features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
+inherit packagegroup
 
 RDEPENDS:${PN} = "\
     libegl-dev \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb +1 -3
index 1d450600..381fa950 100644
@@ -4,9 +4,7 @@ PR = "r26"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit packagegroup features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
+inherit packagegroup
 
 GFX_WAYLAND = "\
     weston-init \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-gtk-sdk-target.bb +1 -3
index 0bf3530d..030583e3 100644
@@ -4,9 +4,7 @@ PR = "r2"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit packagegroup features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
+inherit packagegroup
 
 RDEPENDS:${PN} = "\
     gtk+3-dev \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-gtk.bb +1 -3
index 59b0461d..c2208380 100644
@@ -4,9 +4,7 @@ PR = "r2"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit packagegroup features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
+inherit packagegroup
 
 RDEPENDS:${PN} = "\
     gtk+3 \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-hmi.bb +1 -3
index e16727c4..a8261bf2 100644
@@ -4,9 +4,7 @@ PR = "r0"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit packagegroup features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
+inherit packagegroup
 
 HMI = " \
 "
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-matrix.bb +5 -5
index 3d9ebdf3..c683c477 100644
@@ -65,7 +65,7 @@ MATRIX_QT_APPS:append:ti43x = " \
 "
 
 MATRIX_TOUCH_APPS = " \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','matrix-gui-touch-demos','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','matrix-gui-touch-demos','',d)} \
 "
 
 MATRIX_GPU_DEMOS = " \
@@ -151,7 +151,7 @@ MATRIX_APPS:append:omap-a15 = "     \
     matrix-gui-pm-demos-governor    \
 "
 
-#    ${@['','matrix-gui-browser-demos'][bb.utils.contains('MACHINE_FEATURES','gpu',True,False,d) and bb.utils.contains('DISTRO_FEATURES','wayland',True,False,d)]} \
+#    ${@['','matrix-gui-browser-demos'][bb.utils.contains('DISTRO_FEATURES','opengl',True,False,d) and bb.utils.contains('DISTRO_FEATURES','wayland',True,False,d)]} \
 #                                \
 #
 
@@ -184,9 +184,9 @@ RDEPENDS:${PN} = "        \
     ${MATRIX_APPS}        \
     ${MATRIX_COMMON_APPS} \
     ${@bb.utils.contains('MACHINE_FEATURES','touchscreen',"${MATRIX_TOUCH_APPS}",'',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${MATRIX_GUI}",'',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${MATRIX_QT_APPS}",'',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${MATRIX_GPU_DEMOS}",'',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl',"${MATRIX_GUI}",'',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','qt',"${MATRIX_QT_APPS}",'',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl',"${MATRIX_GPU_DEMOS}",'',d)} \
     ${@['',"${MATRIX_OPENCL_APPS}"][oe.utils.all_distro_features(d, 'opencl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]} \
 "
 
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-multimedia-sdk-target.bb +1 -1
index 62bcc0ea..8baab290 100644
@@ -13,7 +13,7 @@ BARCODE_PKG = ""
 
 MULTIMEDIA = ""
 
-#    ${@['','qt-opencv-opencl-opengl-multithreaded-dev'][oe.utils.all_distro_features(d, 'opencv opencl opengl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'gpu dsp', True, False, d)]}
+#    ${@['','qt-opencv-opencl-opengl-multithreaded-dev'][oe.utils.all_distro_features(d, 'opencv opencl opengl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]}
 MULTIMEDIA:append:dra7xx = " \
     hevc-arm-decoder-dev \
     hevc-arm-decoder-staticdev \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-multimedia.bb +2 -2
index 9d6767b0..d06fbb6f 100644
@@ -12,8 +12,8 @@ MULTIMEDIA = " \
 
 MULTIMEDIA:omapl138 = ""
 
-DUAL_CAMERA_DEMO = "${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'dual-camera-demo', '', d)}"
-IMAGE_GALLERY_DEMO = "${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'image-gallery', '', d)}"
+DUAL_CAMERA_DEMO = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dual-camera-demo', '', d)}"
+IMAGE_GALLERY_DEMO = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'image-gallery', '', d)}"
 
 MULTIMEDIA:append:ti43x = " \
     ${DUAL_CAMERA_DEMO} \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-qte.bb +1 -3
index 60d6e63c..a133e7e7 100644
@@ -4,9 +4,7 @@ PR = "r22"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit packagegroup features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
+inherit packagegroup
 
 #    qtdeclarative-examples
 RDEPENDS:${PN} = "\
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-toolchain-tisdk-target.bb +3 -3
index c64e1727..7fb2aba3 100644
@@ -18,11 +18,11 @@ TISDK_TOOLCHAIN_EXTRA_TARGET = "\
 TISDK_TOOLCHAIN_EXTRA_TARGET:omapl138 = ""
 
 RDEPENDS:${PN} = "\
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-qte-toolchain-target','',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-gtk-sdk-target','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','qt','packagegroup-arago-qte-toolchain-target','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','gtk','packagegroup-arago-tisdk-gtk-sdk-target','',d)} \
     ${TISDK_TOOLCHAIN_BASE_TARGET} \
     ${TISDK_TOOLCHAIN_EXTRA_TARGET} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-graphics-sdk-target','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-graphics-sdk-target','',d)} \
     ${@['','packagegroup-arago-tisdk-opencl-sdk-target'][oe.utils.all_distro_features(d, 'opencl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]} \
     packagegroup-arago-tisdk-addons-sdk-target \
 "
meta-arago-distro/recipes-core/packagegroups/ti-analytics.bb +1 -1
index e16e4d51..4c686c00 100644
@@ -16,7 +16,7 @@ TENSORFLOW_DEMO = ""
 ANALYTICS = ""
 #ANALYTICS = " \
 #    ${TENSORFLOW_DEMO} \
-#    ${@['','qt-opencv-opencl-opengl-multithreaded'][oe.utils.all_distro_features(d, 'opencv opencl opengl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'gpu dsp', True, False, d)]} \
+#    ${@['','qt-opencv-opencl-opengl-multithreaded'][oe.utils.all_distro_features(d, 'opencv opencl opengl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]} \
 #    ${@['','barcode-roi'][oe.utils.all_distro_features(d, 'opencv', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]} \
 #"
 ANALYTICS:j7 = ""
meta-arago-distro/recipes-core/packagegroups/ti-demos.bb +1 -1
index 3fbf4199..7bccb4de 100644
@@ -5,7 +5,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
 
-PDM_ANOMALY_PKG = "${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'pdm-anomaly-detection', '', d)}"
+PDM_ANOMALY_PKG = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'pdm-anomaly-detection', '', d)}"
 
 PDM_ANOMALY = ""
 PDM_ANOMALY:ti33x = "${PDM_ANOMALY_PKG}"
meta-arago-distro/recipes-core/packagegroups/ti-world.bb +5 -5
index 323d88ae..ec22d72e 100644
@@ -22,7 +22,7 @@ EXTRABROWSERS = " \
 "
 
 PYTHON2APPS = " \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu',"${EXTRABROWSERS}",'',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl',"${EXTRABROWSERS}",'',d)} \
     ${@bb.utils.contains("BBFILE_COLLECTIONS","browser-layer",bb.utils.contains('DISTRO_FEATURES','wayland',"${CHROMIUM}",'',d),'',d)} \
 "
 
@@ -43,9 +43,9 @@ RDEPENDS:${PN} = "\
     packagegroup-arago-console \
     packagegroup-arago-base-tisdk \
     ti-test \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-graphics','',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-gtk','',d)} \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-qte qt3d-examples','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-graphics','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-gtk','',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-qte qt3d-examples','',d)} \
     ${@oe.utils.all_distro_features(d, "opencl", "${OPENCL}")} \
     packagegroup-arago-tisdk-connectivity \
     packagegroup-arago-tisdk-crypto \
@@ -55,7 +55,7 @@ RDEPENDS:${PN} = "\
     packagegroup-arago-tisdk-amsdk \
     packagegroup-arago-tisdk-addons \
     packagegroup-arago-tisdk-addons-extra \
-    ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-hmi','packagegroup-arago-base-tisdk-server-extra',d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES','opengl','packagegroup-arago-tisdk-hmi','packagegroup-arago-base-tisdk-server-extra',d)} \
     ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "${PYTHON2APPS}", "", d)} \
     ${DEVTOOLS} \
     ${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 'valgrind', '', d)} \
meta-arago-distro/recipes-graphics/cairo/cairo_%.bbappend deleted +0 -3
deleted file mode 100644
index 1de9aebb..00000000
@@ -1,3 +0,0 @@
-PR:append = ".arago1"
-
-PACKAGECONFIG:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'egl glesv2', '', d)}"
meta-arago-distro/recipes-multimedia/gstreamer/gstreamer1.0-plugins-%.bbappend deleted +0 -6
deleted file mode 100644
index 4a4986c3..00000000
@@ -1,6 +0,0 @@
-# Remove all GFX PACKAGECONFIGs for platforms w/o GPU
-PACKAGECONFIG:remove = "${@bb.utils.contains('MACHINE_FEATURES','gpu','','x11 wayland gl egl gles2 qt5',d)}"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-PR:append = ".0"
meta-arago-extras/recipes-core/matrix/matrix-gui-machinevision-demos_2.0.bb +1 -1
index 16482003..6cb9ba6d 100644
@@ -29,7 +29,7 @@ RDEPENDS:matrix-machinevision-demo-dlp3dscanner = " \
 "
 
 RDEPENDS:matrix-machinevision-demo-dlp3dscanner:append:dra7xx = " \
-    ${@['','point-cloud-viewer'][oe.utils.all_distro_features(d, 'opencv', True, False) and bb.utils.contains('MACHINE_FEATURES', 'gpu', True, False, d)]} \
+    ${@['','point-cloud-viewer'][oe.utils.all_distro_features(d, 'opencv', True, False) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d)]} \
 "
 
 RDEPENDS:matrix-machinevision-demo-barcoderoi = " \
meta-arago-extras/recipes-core/matrix/matrix-gui-video-analytics-demos_2.0.bb +1 -1
index d0cf5233..73fc4661 100644
@@ -17,7 +17,7 @@ VIDEO_ANALYTICS_DEMO_RDEPENDS += " \
 PACKAGES = "matrix-video-analytics-opencv-opencl-opengl-demo \
 "
 
-#    ${@['','qt-opencv-opencl-opengl-multithreaded'][oe.utils.all_distro_features(d, 'opencv opencl opengl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'gpu dsp', True, False, d)]}
+#    ${@['','qt-opencv-opencl-opengl-multithreaded'][oe.utils.all_distro_features(d, 'opencv opencl opengl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]}
 RDEPENDS:matrix-video-analytics-opencv-opencl-opengl-demo = " \
     ${VIDEO_ANALYTICS_DEMO_RDEPENDS} \
 "
meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb +1 -1
index 047e9dbd..cc446fc8 100644
@@ -58,7 +58,7 @@ do_install(){
 	install -m 0644 ${WORKDIR}/matrix-gui-2.0.service ${D}${systemd_system_unitdir}
 }
 
-GUIDEPS = "${@bb.utils.contains('MACHINE_FEATURES','gpu',"matrix-gui-browser refresh-screen",'',d)}"
+GUIDEPS = "${@bb.utils.contains('DISTRO_FEATURES','wayland',"matrix-gui-browser refresh-screen",'',d)}"
 
 RDEPENDS:${PN} += "matrix-lighttpd-config lighttpd lighttpd-module-cgi lighttpd-module-deflate lighttpd-module-expire php php-cgi php-cli ${GUIDEPS}"
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 11 lines · Randolph Sapp via lists.yoctoproject.org

Leverage the graphics changes introduced in meta-ti by the patch with the same name as this one. The following logic is applied:
1. oe-core sees the inclusion of opengl as a distro feature to be an invitation to build all graphics toolkits and libraries. We now follow suit. Remove opengl as a distro feature if you do not wish to have any graphics tools.
2. Rogue and SGX graphics libraries are out of tree modules and should be treated as such. Inclusion of them is optional through the use of powervr-rogue-graphics and powervr-sgx-graphics distro features and the appropriate packages will be selected based on the matching machine features.

I thought these (powervr-*-graphics) were MACHINE features, not DISTRO..

Quoted 55 lines

3. The gpu machine feature was removed to assist with the inclusion of the two previously mentioned points. Anything wishing to build off of Arago with piecemeal graphics components should introduce their own package groups to do so.

---
  meta-arago-distro/conf/distro/arago.conf             |  2 +-
  .../conf/distro/include/branding-mainline.inc        |  4 ++--
  .../conf/distro/include/branding-next.inc            |  2 +-
  .../recipes-core/images/tisdk-core-bundle.inc        |  4 ++--
  .../recipes-core/images/tisdk-default-image.bb       | 12 +++++-------
  .../recipes-core/images/tisdk-thinlinux-image.bb     |  4 +---
  .../packagegroup-arago-tisdk-addons-sdk-target.bb    |  2 +-
  .../packagegroups/packagegroup-arago-tisdk-addons.bb |  2 +-
  .../packagegroup-arago-tisdk-graphics-sdk-target.bb  |  4 +---
  .../packagegroup-arago-tisdk-graphics.bb             |  4 +---
  .../packagegroup-arago-tisdk-gtk-sdk-target.bb       |  4 +---
  .../packagegroups/packagegroup-arago-tisdk-gtk.bb    |  4 +---
  .../packagegroups/packagegroup-arago-tisdk-hmi.bb    |  4 +---
  .../packagegroups/packagegroup-arago-tisdk-matrix.bb | 10 +++++-----
  ...packagegroup-arago-tisdk-multimedia-sdk-target.bb |  2 +-
  .../packagegroup-arago-tisdk-multimedia.bb           |  4 ++--
  .../packagegroups/packagegroup-arago-tisdk-qte.bb    |  4 +---
  .../packagegroup-arago-toolchain-tisdk-target.bb     |  6 +++---
  .../recipes-core/packagegroups/ti-analytics.bb       |  2 +-
  .../recipes-core/packagegroups/ti-demos.bb           |  2 +-
  .../recipes-core/packagegroups/ti-world.bb           | 10 +++++-----
  .../recipes-graphics/cairo/cairo_%.bbappend          |  3 ---
  .../gstreamer/gstreamer1.0-plugins-%.bbappend        |  6 ------
  .../matrix/matrix-gui-machinevision-demos_2.0.bb     |  2 +-
  .../matrix/matrix-gui-video-analytics-demos_2.0.bb   |  2 +-
  .../recipes-core/matrix/matrix-gui_2.0.bb            |  2 +-
  26 files changed, 41 insertions(+), 66 deletions(-)

delete mode 100644 meta-arago-distro/recipes-graphics/cairo/cairo_%.bbappend delete mode 100644 meta-arago-distro/recipes-multimedia/gstreamer/gstreamer1.0-plugins-%.bbappend

meta-arago-distro/conf/distro/arago.conf +1 -1
index d675b077..fde30cfe 100644
@@ -82,7 +82,7 @@ DISTRO_FEATURES = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
  DISTRO_FEATURES:remove = "x11"
 
  # Add additional distro features
-DISTRO_FEATURES:append = " pam wayland opengl"
+DISTRO_FEATURES:append = " pam wayland opengl powervr-sgx-graphics powervr-rogue-graphics"
  #DISTRO_FEATURES:append = " opencl"
  DISTRO_FEATURES:append = " opencv"
  DISTRO_FEATURES:append = " openmp"
meta-arago-distro/conf/distro/include/branding-mainline.inc +0 -0
index 2fc9dc5f..2e6198d3 100644

meta-arago-distro/conf/distro/include/branding-mainline.inc PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-mainline" · line 6

Quoted 6 lines
meta-arago-distro/conf/distro/include/branding-mainline.inc +1 -2
@@ -3,5 +3,5 @@ PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-mainline"
  PREFERRED_PROVIDER_u-boot = "u-boot-ti-mainline"
  SRCREV_ti-upstream-tools:pn-linux-ti-mainline = "${AUTOREV}"
 
-# GPU support requires out-of-tree SGX and RGX drivers not available in mainline
-MACHINE_FEATURES:remove = "gpu"
+# GPU support requires out-of-tree SGX and RGX rivers not available in mainline

s/rivers/drivers

meta-arago-distro/conf/distro/include/branding-mainline.inc PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-mainline" · line 7

Quoted 1 line
meta-arago-distro/conf/distro/include/branding-mainline.inc +1 -0
+DISTRO_FEATURES:remove = "powervr-sgx-graphics powervr-rogue-graphics"

This should be MACHINE_FEATURES and be moved out of meta-arago and down into the meta-ti layer where we define the mainline kernel if we can.

If mainline kernel is selected, then we should fallback to regular mesa/swrast. This way the distro does not have to concern itself which what kernel supports what GPU.

All the rest of the DISTRO_FEATURES/opengl stuff in this patch looks good to me.

Andrew

#2 lore raw
Quoted 2 lines · Andrew Davis

This should be MACHINE_FEATURES and be moved out of meta-arago and down into the meta-ti layer where we define the mainline kernel if we can.

Ha, you haven't seen the full notes on my other patch have you?
https://lists.yoctoproject.org/g/meta-ti/topic/96386295#15613

I switched these to be COMBINED_FEATURES. Like alsa, they require both a machine feature and a distro feature to be present to actually patch the packages we need. In this way patches become opt-in and software rendering becomes the default unless someone specifically wants a distro with powervr-rogue-graphics patches.

In addition if they have a distro that wants powervr-rogue-graphics and they are compiling for a machine that doesn't have that feature then it will also fall back to software rendering.

The only issue this doesn't solve is when someone wants to hack recipes like gstreamer to introduce pseudo graphics support or bundle random pieces of the graphics stack without including all of it, but arguably that should be a specialized package group or new layer anyway.