From 216cfd53e3aad8c8e4641769bdb4fcc659406201 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Fri, 31 Jan 2025 11:46:53 +0100 Subject: [PATCH] ccmp25: x-linux-ai: create custom ML packagegroup for webkit images The default ML packagegroup provided by the x-linux-ai layer isn't very flexible when it comes to including a subset of the packagegroups it provides: even if you include just one of them, the others will get built anyway, pulling in several dependencies that aren't even used for the final image's contents. Also, a lot of the runtime dependencies are duplicated in several of the packages in the dependency chain, making it confusing to manage dependencies efficiently. Create a new packagegroup specifically tailored for our ccmp25 webkit images, using packagegroup-x-linux-ai as reference, removing any duplicated dependencies and applying the same changes as the ones we apply in the reference's .bbappend. At the moment, this packagegroup and the old one are equivalent, but we can now modify ours while leaving the old one intact in case anyone wants to use it. Signed-off-by: Gabriel Valcazar --- .../recipes-core/images/dey-image-webkit.bb | 4 +- .../packagegroup-dey-x-linux-ai.bb | 44 +++++++++++++++++++ .../packagegroup-x-linux-ai.bbappend | 32 -------------- 3 files changed, 46 insertions(+), 34 deletions(-) create mode 100644 meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-dey-x-linux-ai.bb delete mode 100644 meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-x-linux-ai.bbappend diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb index b552fef7c..1425dbe84 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb @@ -1,5 +1,5 @@ # -# Copyright (C) 2020-2024, Digi International Inc. +# Copyright (C) 2020-2025, Digi International Inc. # require recipes-core/images/dey-image-graphical.inc @@ -7,6 +7,6 @@ DESCRIPTION = "DEY image with WebKit browser engine support" GRAPHICAL_CORE = "webkit" -IMAGE_INSTALL:append:ccmp25 = " packagegroup-x-linux-ai" +IMAGE_INSTALL:append:ccmp25 = " packagegroup-dey-x-linux-ai" COMPATIBLE_MACHINE = "(ccimx6$|ccimx8m|ccimx8x|ccimx93|ccmp15|ccmp2)" diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-dey-x-linux-ai.bb b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-dey-x-linux-ai.bb new file mode 100644 index 000000000..dd096fe12 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-dey-x-linux-ai.bb @@ -0,0 +1,44 @@ +# Copyright (C) 2025, Digi International Inc. +SUMMARY = "X-LINUX-AI subset used for ConnectCore Demo" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup python3-dir + +COMMON_PACKAGES = " \ + stai-mpu-tools \ + tim-vx-tools \ +" + +TFLITE_PACKAGES = " \ + stai-mpu-image-classification-cpp-tfl \ + stai-mpu-image-classification-python-tfl \ + stai-mpu-object-detection-cpp-tfl \ + stai-mpu-object-detection-python-tfl \ + tflite-vx-delegate-example \ +" + +ONNX_PACKAGES = " \ + onnxruntime-tools \ + stai-mpu-image-classification-cpp-ort \ + stai-mpu-image-classification-python-ort \ + stai-mpu-object-detection-python-ort \ + stai-mpu-object-detection-cpp-ort \ +" + +OPENVX_PACKAGES = " \ + nbg-benchmark \ + stai-mpu-image-classification-cpp-ovx \ + stai-mpu-image-classification-python-ovx \ + stai-mpu-object-detection-cpp-ovx \ + stai-mpu-object-detection-python-ovx \ + stai-mpu-semantic-segmentation-python-ovx \ + stai-mpu-pose-estimation-python-ovx \ + stai-mpu-face-recognition-cpp-ovx \ +" + +RDEPENDS:${PN} += " \ + ${COMMON_PACKAGES} \ + ${TFLITE_PACKAGES} \ + ${OPENVX_PACKAGES} \ +" diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-x-linux-ai.bbappend b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-x-linux-ai.bbappend deleted file mode 100644 index 8a7437a2e..000000000 --- a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-st/packagegroups/packagegroup-x-linux-ai.bbappend +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2023,2024 Digi International Inc. - -RDEPENDS:packagegroup-x-linux-ai-tflite:remove:ccmp13 = " \ - tflite-cv-apps-image-classification-c++ \ - tflite-cv-apps-object-detection-c++ \ -" - -RDEPENDS:packagegroup-x-linux-ai-tflite-edgetpu:remove:ccmp13 = " \ - tflite-cv-apps-edgetpu-image-classification-c++ \ - tflite-cv-apps-edgetpu-object-detection-c++ \ -" - -RDEPENDS:packagegroup-x-linux-ai:remove:ccmp25 = " \ - packagegroup-x-linux-ai-onnxruntime \ -" - -RDEPENDS:packagegroup-x-linux-ai-tflite:remove:ccmp25 = " \ - x-linux-ai-tool \ - x-linux-ai-application \ -" - -RDEPENDS:packagegroup-x-linux-ai-onnxruntime:remove:ccmp25 = " \ - x-linux-ai-tool \ - x-linux-ai-application \ -" - -RDEPENDS:packagegroup-x-linux-ai-npu:remove:ccmp25 = " \ - x-linux-ai-tool \ - x-linux-ai-application \ - ort-vsinpu-ep-example-cpp \ - ort-vsinpu-ep-example-python \ -"