From b13fda0a2de3bcd7536d014ce06a8231554d823a Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 29 Jul 2025 18:20:32 +0200 Subject: [PATCH] x-linux-ai: update support for new X-LINUX-AI v6.1.0 release This commit introduces the necessary changes in the Digi Embedded Yocto layer to support the X-LINUX-AI v6.1.0 software package from the meta-st-x-linux-ai layer. https://onedigi.atlassian.net/browse/DEL-9734 Signed-off-by: Arturo Buzarra --- meta-digi-arm/conf/layer.conf | 4 +--- ...-mpu_6.0.1.bbappend => stai-mpu_6.1.0.bbappend} | 0 ...ification-remove-weston-user-check-from-l.patch | 4 ++-- ...ction-remove-weston-user-check-from-launc.patch | 4 ++-- ...tion-remove-weston-user-check-from-launch.patch | 4 ++-- ...gmentation-remove-weston-user-check-from-.patch | 7 ++++--- ...gmentation-reduce-font-size-for-big-scree.patch | 14 +++++++++++--- 7 files changed, 22 insertions(+), 15 deletions(-) rename meta-digi-dey/dynamic-layers/x-linux-ai/recipes-frameworks/stai-mpu/{stai-mpu_6.0.1.bbappend => stai-mpu_6.1.0.bbappend} (100%) diff --git a/meta-digi-arm/conf/layer.conf b/meta-digi-arm/conf/layer.conf index 5e71ab783..e6e938408 100644 --- a/meta-digi-arm/conf/layer.conf +++ b/meta-digi-arm/conf/layer.conf @@ -52,9 +52,7 @@ BBMASK += " \ # Tweak x-linux-ai dependencies to use ST's machine learning packages LAYERDEPENDS_x-linux-ai:remove = "st-openstlinux" BBMASK += " \ - meta-st-x-linux-ai/recipes-st/images/st-image-ai-npu-userfs.bb \ - meta-st-x-linux-ai/recipes-st/images/st-image-ai-npu.bb \ - meta-st-x-linux-ai/recipes-st/images/st-image-ai-cpu.bb \ + meta-st-x-linux-ai/recipes-st/images/st-image-ai.bb \ " # Digi's General and Open Source license agreements diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-frameworks/stai-mpu/stai-mpu_6.0.1.bbappend b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-frameworks/stai-mpu/stai-mpu_6.1.0.bbappend similarity index 100% rename from meta-digi-dey/dynamic-layers/x-linux-ai/recipes-frameworks/stai-mpu/stai-mpu_6.0.1.bbappend rename to meta-digi-dey/dynamic-layers/x-linux-ai/recipes-frameworks/stai-mpu/stai-mpu_6.1.0.bbappend diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/image-classification/files/patches/0001-image-classification-remove-weston-user-check-from-l.patch b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/image-classification/files/patches/0001-image-classification-remove-weston-user-check-from-l.patch index 07953017a..2cf572fd1 100644 --- a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/image-classification/files/patches/0001-image-classification-remove-weston-user-check-from-l.patch +++ b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/image-classification/files/patches/0001-image-classification-remove-weston-user-check-from-l.patch @@ -10,7 +10,7 @@ Signed-off-by: David Escalona 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/stai-mpu/launch_python_image_classification.sh b/stai-mpu/launch_python_image_classification.sh -index 3cb5259..afbedf8 100755 +index efd5b19..f3e25aa 100755 --- a/stai-mpu/launch_python_image_classification.sh +++ b/stai-mpu/launch_python_image_classification.sh @@ -5,18 +5,12 @@ @@ -24,7 +24,7 @@ index 3cb5259..afbedf8 100755 echo "stai wrapper used : "$FRAMEWORK CONFIG=$(find /usr/local/x-linux-ai -name "config_board_*.sh") source $CONFIG - cmd="python3 /usr/local/x-linux-ai/image-classification/stai_mpu_image_classification.py -m /usr/local/x-linux-ai/image-classification/models/$IMAGE_CLASSIFICATION_MODEL -l /usr/local/x-linux-ai/image-classification/models/$IMAGE_CLASSIFICATION_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $OPTIONS" + cmd="python3 /usr/local/x-linux-ai/image-classification/stai_mpu_image_classification.py -m /usr/local/x-linux-ai/image-classification/models/$IMAGE_CLASSIFICATION_MODEL -l /usr/local/x-linux-ai/image-classification/models/$IMAGE_CLASSIFICATION_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT --camera_src $CAMERA_SRC" -if [ "$weston_user" != "root" ]; then - echo "user : "$weston_user diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/object-detection/files/patches/0001-object-detection-remove-weston-user-check-from-launc.patch b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/object-detection/files/patches/0001-object-detection-remove-weston-user-check-from-launc.patch index aa3a07f8f..df7d164cb 100644 --- a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/object-detection/files/patches/0001-object-detection-remove-weston-user-check-from-launc.patch +++ b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/object-detection/files/patches/0001-object-detection-remove-weston-user-check-from-launc.patch @@ -9,7 +9,7 @@ Signed-off-by: David Escalona 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/stai-mpu/launch_python_object_detection.sh b/stai-mpu/launch_python_object_detection.sh -index e460fb3..b595f7f 100755 +index aad8d53..046fb01 100755 --- a/stai-mpu/launch_python_object_detection.sh +++ b/stai-mpu/launch_python_object_detection.sh @@ -5,18 +5,12 @@ @@ -23,7 +23,7 @@ index e460fb3..b595f7f 100755 echo "stai_mpu wrapper used : "$FRAMEWORK CONFIG=$(find /usr/local/x-linux-ai -name "config_board_*.sh") source $CONFIG - cmd="/usr/local/x-linux-ai/object-detection/stai_mpu_object_detection.py -m /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL -l /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $OPTIONS" + cmd="/usr/local/x-linux-ai/object-detection/stai_mpu_object_detection.py -m /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL -l /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT --camera_src $CAMERA_SRC" -if [ "$weston_user" != "root" ]; then - echo "user : "$weston_user diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/pose-estimation/files/patches/0001-pose-estimation-remove-weston-user-check-from-launch.patch b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/pose-estimation/files/patches/0001-pose-estimation-remove-weston-user-check-from-launch.patch index 27b56f469..2df5aeae8 100644 --- a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/pose-estimation/files/patches/0001-pose-estimation-remove-weston-user-check-from-launch.patch +++ b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/pose-estimation/files/patches/0001-pose-estimation-remove-weston-user-check-from-launch.patch @@ -9,7 +9,7 @@ Signed-off-by: David Escalona 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/stai-mpu/launch_python_pose_estimation.sh b/stai-mpu/launch_python_pose_estimation.sh -index 61952cf..6c8b5b8 100644 +index c1cefd4..43e7892 100644 --- a/stai-mpu/launch_python_pose_estimation.sh +++ b/stai-mpu/launch_python_pose_estimation.sh @@ -5,17 +5,11 @@ @@ -22,7 +22,7 @@ index 61952cf..6c8b5b8 100644 FRAMEWORK=$1 echo "stai wrapper used : "$FRAMEWORK source /usr/local/x-linux-ai/resources/config_board_npu.sh - cmd="python3 /usr/local/x-linux-ai/pose-estimation/stai_mpu_pose_estimation.py -m /usr/local/x-linux-ai/pose-estimation/models/$POSE_ESTIMATION_MODEL --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $OPTIONS" + cmd="python3 /usr/local/x-linux-ai/pose-estimation/stai_mpu_pose_estimation.py -m /usr/local/x-linux-ai/pose-estimation/models/$POSE_ESTIMATION_MODEL --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT --camera_src $CAMERA_SRC" -if [ "$weston_user" != "root" ]; then - echo "user : "$weston_user diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0001-semantic-segmentation-remove-weston-user-check-from-.patch b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0001-semantic-segmentation-remove-weston-user-check-from-.patch index 8910c2339..dea854aa8 100644 --- a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0001-semantic-segmentation-remove-weston-user-check-from-.patch +++ b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0001-semantic-segmentation-remove-weston-user-check-from-.patch @@ -10,10 +10,10 @@ Signed-off-by: David Escalona 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/stai-mpu/launch_python_semantic_segmentation.sh b/stai-mpu/launch_python_semantic_segmentation.sh -index a1c2479..94cd540 100755 +index e5bcb26..dee9b2c 100755 --- a/stai-mpu/launch_python_semantic_segmentation.sh +++ b/stai-mpu/launch_python_semantic_segmentation.sh -@@ -5,17 +5,11 @@ +@@ -5,18 +5,12 @@ # # This software is licensed under terms that can be found in the LICENSE file # in the root directory of this software component. @@ -22,8 +22,9 @@ index a1c2479..94cd540 100755 -weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}') FRAMEWORK=$1 echo "stai-mpu wrapper used : "$FRAMEWORK + source /usr/local/x-linux-ai/resources/config_board_npu.sh - cmd="python3 /usr/local/x-linux-ai/semantic-segmentation/stai_mpu_semantic_segmentation.py -m /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_MODEL -l /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $OPTIONS" + cmd="python3 /usr/local/x-linux-ai/semantic-segmentation/stai_mpu_semantic_segmentation.py -m /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_MODEL -l /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT --camera_src $CAMERA_SRC" -if [ "$weston_user" != "root" ]; then - echo "user : "$weston_user diff --git a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0002-semantic-segmentation-reduce-font-size-for-big-scree.patch b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0002-semantic-segmentation-reduce-font-size-for-big-scree.patch index faca2235b..f22187d21 100644 --- a/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0002-semantic-segmentation-reduce-font-size-for-big-scree.patch +++ b/meta-digi-dey/dynamic-layers/x-linux-ai/recipes-samples/semantic-segmentation/files/patches/0002-semantic-segmentation-reduce-font-size-for-big-scree.patch @@ -8,10 +8,12 @@ Signed-off-by: David Escalona 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stai-mpu/stai_mpu_semantic_segmentation.py b/stai-mpu/stai_mpu_semantic_segmentation.py -index 0c0f242..35b8bea 100644 +index 8252e1c..d0ee636 100644 --- a/stai-mpu/stai_mpu_semantic_segmentation.py +++ b/stai-mpu/stai_mpu_semantic_segmentation.py -@@ -475,8 +475,8 @@ class MainWindow(Gtk.Window): +@@ -347,12 +347,12 @@ class MainWindow(Gtk.Window): + self.ui_icon_exit_size = '50' + self.ui_icon_st_size = '160' self.ui_icon_label_size = '64' elif window_constraint <= 1080: #Display 1920x1080 @@ -22,7 +24,11 @@ index 0c0f242..35b8bea 100644 self.ui_icon_exit_size = '50' self.ui_icon_st_size = '160' self.ui_icon_label_size = '64' -@@ -711,8 +711,8 @@ class OverlayWindow(Gtk.Window): + + def main_ui_creation(self,args): +@@ -583,12 +583,12 @@ class OverlayWindow(Gtk.Window): + self.ui_icon_exit_size = '50' + self.ui_icon_st_size = '160' self.ui_icon_label_size = '64' elif window_constraint <= 1080: #Display 1920x1080 @@ -33,3 +39,5 @@ index 0c0f242..35b8bea 100644 self.ui_icon_exit_size = '50' self.ui_icon_st_size = '160' self.ui_icon_label_size = '64' + + def overlay_ui_creation(self,args):