# 编译并安装 Qualcomm IM SDK 插件

Source: [https://docs.qualcomm.com/doc/80-70014-15BY/topic/esdk-compile-qimsdk-plugins.html](https://docs.qualcomm.com/doc/80-70014-15BY/topic/esdk-compile-qimsdk-plugins.html)

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

1. 搭建环境：

        cd $ESDK_ROOT
        source environment-setup-armv8-2a-qcom-linuxCopy 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
        devtool modify qcom-gstreamer1.0-plugins-oss-mlvdetectionCopy 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-mlvdetectionCopy 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 module 
        [/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-mlvdetectionCopy 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-mlvdetectionCopy to clipboard

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

        ls $ESDK_ROOT/tmp/deploy/ipk/armv8-2a | grep qcom-gstreamer1.0-plugins-oss-mlvdetectionCopy 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-gstrseamer1.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. 按照 [此处](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-254/how_to.html#use-ssh)所述步骤，与设备建立 SSH 连接。连接后，即可通过 RB3Gen2 设备的
                IP 地址访问该设备。
6. 复制
                    qcom-gstreamer1.0-plugins-oss-mlvdetection\_1.0-r0\_armv8-2a.ipk
                到 RB3Gen2 设备以安装完成编译的参考应用程序。
7. 登录 SSH shell：

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

Note: 如果提示输入密码，则输入 oelinux123 作为 SSH shell 的密码。

    在目标设备上运行以下命令。

        mount -o remount,rw /
        exit Copy to clipboard

    在主机上执行以下操作：

        cd $ESDK_ROOT/tmp/deploy/ipk/armv8-2a/
        scp qcom-gstreamer1.0-plugins-oss-mlvdetection_1.0-r0_armv8-2a.ipk root@<IP addr of the target device>:/optCopy to clipboard

    登录
                    SSH
                    shell：

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

    在目标设备上执行以下操作：

        opkg --force-depends --force-reinstall --force-overwrite install /opt/qcom-gstreamer1.0-plugins-oss-mlvdetection_1.0-r0_armv8-2a.ipkCopy to clipboard

    确认
                    IPK
                已经安装成功，如下所示：

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

Last Published: Jan 26, 2026

[Previous Topic
编译并安装示例程序](https://docs.qualcomm.com/bundle/publicresource/80-70014-15BY/topics/compile-reference-apps-esdk.md) [Next Topic
创建自己的应用程序](https://docs.qualcomm.com/bundle/publicresource/80-70014-15BY/topics/esdk-create-own-app.md)