# 编译并安装 Qualcomm IM SDK 插件

本节以 `mlvdetection` 插件为例，说明如何编译 Qualcomm IM SDK 插件并将其安装在设备上。

1. 搭建环境：

cd $ESDK_ROOT
        Copy to clipboard

source environment-setup-armv8-2a-qcom-linux
        Copy to clipboard

SDK environment now set up; additionally you may now run devtool to perform development tasks.
        Run devtool --help for further details.
        [/local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gst-ai-classification]$
        Copy to clipboard
2. 下载 Qualcomm IM SDK 插件源代码。

cd $ESDK_ROOT
        Copy to clipboard

devtool modify qcom-gstreamer1.0-plugins-oss-mlvdetection
        Copy to clipboard

    其中 `qcom-gstreamer1.0-plugins-oss-mlvdetection` 是下载插件源代码的 BitBake 配方。

NOTE: Starting bitbake server...
        Loading cache: 100% |######################################| Time: 0:00:00
        Loaded 9816 entries from dependency cache.
        Parsing recipes: 100% |####################################| Time: 0:00:01
        Parsing of 6700 .bb  files complete (6678 cached, 22 parsed). 9838 targets, 842 skipped, 0 masked, 0 errors.
        NOTE: Resolving any missing task queue dependencies
        Initialising tasks: 100% |#################################| Time: 0:00:55
        Sstate summary: Wanted 10 local 0 mirrors 0 Missed 10 Current 10 (0% match, 50% complete)
        NOTE: Executing Tasks
        NOTE: Tasks Summary: Attempted 93 tasks of which 90 didn't need to be rerun and all succeeded.
        INFO: Source tree extracted to /local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection
        INFO: Recipe qcom-gstreamer1.0-plugins-oss-mlvdetection now setup to build from /local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection
        Copy to clipboard

    将插件源代码下载到 `$ESDK_ROOT/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection`。

[/local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection]$ ls
        CMakeLists.txt    config.h.in    mlvdetection.h    modules
        [/local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection]$
        Copy to clipboard
3. 定制完成后，使用以下命令重新编译插件。

devtool build qcom-gstreamer1.0-plugins-oss-mlvdetection
        Copy to clipboard

NOTE: Starting bitbake server...
        Loading cache: 100% |################################################| Time: 0:00:00
        Loaded 9816 entries from dependency cache.
        Parsing recipes: 100% |##############################################| Time: 0:00:01
        Parsing of 6700 .bb  files complete (6678 cached, 22 parsed). 9838 targets, 842 skipped, 0 masked, 0 errors.
        NOTE: Resolving any missing task queue dependencies
        Initialising tasks: 100% |###########################################| Time: 0:00:55
        Checking sstate mirror object availability: 100% |###################| Time: 0:01:06
        Sstate Summary: Wanted 264 Local 0 Mirrors 0 Missed 264 Current 255 (0% match, 49% complete)
        Removing 1 stale sstate objects for arch qcs6490_rb3gen2_vision_kit: 100% |################################################| Time: 0:00:12
        Removing 1 stale sstate objects for arch armv8-2a: 100% |##################################################################| Time: 0:00:16
        NOTE: Executing Tasks
        NOTE: qcom-gstreamer1.0-plugins-oss-mlvdetection: compiling from external source tree /local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection
        NOTE: Task Summary: Attempted 1836 tasks of which 1827 didn't need to be rerun and all succeeded.
        Copy to clipboard
4. 生成插件安装程序 (`.ipk`) 以在设备上安装应用程序。

devtool package qcom-gstreamer1.0-plugins-oss-mlvdetection
        Copy to clipboard

    确认可安装软件包已位于以下路径。

ls $ESDK_ROOT/tmp/deploy/ipk/armv8-2a | grep qcom-gstreamer1.0-plugins-oss- mlvdetection
        Copy to clipboard

qcom-gstreamer1.0-plugins-oss-mlvdetection_1.0-r0_armv8-2a.ipk
        qcom-gstreamer1.0-plugins-oss-mlvdetection_dbg_1.0-r0_armv8-2a.ipk
        qcom-gstreamer1.0-plugins-oss-mlvdetection_dev_1.0-r0_armv8-2a.ipk
        qcom-gstreamer1.0-plugins-oss-mlvdetection_src_1.0-r0_armv8-2a.ipk
        [/local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-mlvdetection]$
        Copy to clipboard
5. 按照[使用 SSH 登录](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh)中提供的步骤，建立与设备的 SSH 连接。

    连接后，即可通过为 RB3 Gen 2 设备配置的 IP 地址访问该设备。
6. 将 `qcom-gstreamer1.0-plugins-oss-mlvdetection_1.0-r0_armv8-2a.ipk` 复制到 RB3 Gen 2 设备以安装编译的参考应用。
7. 通过 SSH shell 连接到设备：

ssh root@<IP addr of the target device>
        Copy to clipboard

Note

如果出现提示，请输入 `oelinux123` 作为 SSH shell 的密码。
8. 在目标设备上运行以下命令。

mount -o remount,rw /
        exit
        Copy to clipboard
9. 在主机上运行以下命令：

cd $ESDK_ROOT/tmp/deploy/ipk/armv8-2a/
        Copy to clipboard

scp qcom-gstreamer1.0-plugins-oss-mlvdetection_1.0-r0_armv8-2a.ipk root@<IP addr of the target device>:/opt
        Copy to clipboard
10. 通过 SSH shell 连接到设备：

ssh root@<IP addr of the target device>
        Copy to clipboard
11. 在目标设备上运行以下命令：

opkg --force-depends --force-reinstall --force-overwrite install /opt/qcom- gstreamer1.0-plugins-oss-mlvdetection_1.0-r0_armv8-2a.ipk
        Copy to clipboard
12. 验证 IPK 安装是否成功，如下所示。

Installing qcom-gstreamer1.0-plugins-oss-mlvdetection (1.0) on root
        Configuring qcom-gstreamer1.0-plugins-oss-mlvdetection.
        Copy to clipboard

Last Published: Feb 06, 2026

[Previous Topic
定制已有示例应用程序](https://docs.qualcomm.com/bundle/publicresource/80-70018-51SC/topics/customize-sample-applications.md) [Next Topic
创建您的 Qualcomm IM SDK 插件](https://docs.qualcomm.com/bundle/publicresource/80-70018-51SC/topics/create-your-imsdk-plugin.md)