# Develop a custom plugin for the Qualcomm IM SDK

Tab Qualcomm Linux
Tab Ubuntu

- *class* tabincludedirectiv

    - This section explains how to create a new plugin and compile it as part of the Qualcomm IM SDK.
Each machine learning plugin is integrated into an independent BitBake recipe.

## Update BitBake files for custom plugin compilation

1. Set up the environment.

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/Platform_eSDK_plus_QIM]$
        Copy to clipboard
2. Add a new BitBake file under
`$ESDK_ROOT/layers/meta-qcom-qim-product-sdk/recipes-gst/gstreamer/`

    For example, `$ESDK_ROOT/layers/meta-qcom-qim-product-sdk/recipes-gst/gstreamer/qcom-gstreamer1.0-plugins-oss-sample-mlvclassification.bb`

    1. Copy the contents from an existing plugin like
`$ESDK_ROOT/layers/meta-qcom-qim-product-sdk/recipes-gst/gstreamer/qcom-gstreamer1.0-plugins-oss-mlvclassification.bb` to this new file.
    2. Update the following variables as shown below.

SUMMARY = "My custom plugin for ML image categorization"
            SRC_URI = "file://gst-plugin-sample-mlvclassification"
            S = "${WORKDIR}/gst-plugin-sample-mlvclassification"
            Copy to clipboard

...
            inherit cmake pkgconfig
            
            SUMMARY = "My custom plugin for ML image categorization"**
            SECTION= "multimedia"
            
            LICENSE = "BSD-3-Clause-Clear"
            LIC_FILES_CHKSUM - "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=7a43440b65lf4a472ca93716d01033a"
            
            # Dependencies.
            DEPENDS := "gstreamer1.0"
            DEPENDS += "gstreamer1.0-plugins-base"
            DEPENDS += "qcom-gstreamer1.0-plugins-oss-base" DEPENDS += "cairo"
            
            SRC_URI += "file://gst-plugin-sample-mlvclassification"
            S ="${WORKDIR}/gst-plugin-sample-mlvclassification"
            
            # Install directories.
            INSTALL_INCDIR := "${includedir}"
            ...
            Copy to clipboard
3. Create a directory named files in `$ESDK_ROOT/layers/meta-qcom-qim-product-sdk/recipes-gst/gstreamer/`.
4. Create the `gst-plugin-sample-mlvclassification` directory under the files directory and copy the
Qualcomm IM SDK plugin source code inside the directory.

files/
        |
        +-- gst-plugin-sample-mlvclassification/
           |
           +-- CMakeLists.txt
           +-- config.h.in
           +-- mlvclassification.c
           +-- mlvclassification.h
           +-- modules/
              |
              +-- CMakeLists.txt
              +-- ml-vclassification-ocr.c
              +-- ml-vclassification-qfr.c
              +-- README
        Copy to clipboard

Note

This assumes that source code is available for the `sample-mlvclassification` plugin.
5. Update `$ESDK_ROOT/layers/meta-qcom-qim-product-sdk/recipes-gst/packagegroups/packagegroup-qcom-gst.bb` to add
`qcom-gstreamer1.0-plugins-oss-sample-mlvclassification` in `RDEPENDS`.

RDEPENDS:${PN}:qcom-custom-bsp = " \
           ${PN}-dependencies \
           ${PN}-basic \
           ...
           qcom-gstreamer1.0-plugins-oss-sample-mlvclassification \
        "
        Copy to clipboard
6. Update `$ESDK_ROOT/layers/meta-qcom-qim-product-sdk/classes/qimsdk-pkg.bbclass` to add `qcom-gstreamer1.0-plugins-oss-sample-mlvclassification:do_package_write_ipk`.

GST_PLUGINS = " \
           gstd:do_package_write_ipk \
           gstreamer1.0:do_package_write_ipk \
           ...
           qcom-gstreamer1.0-plugins-oss-sample-mlvclassification:do_package_write_ipk \
        "
        Copy to clipboard
7. Download the Qualcomm IM SDK plugin source code.

cd $ESDK_ROOT
        Copy to clipboard

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

Where `qcom-gstreamer1.0-plugins-oss-sample-mlvclassification` is the
BitBake recipe that downloads the plugin source code.

NOTE: Starting bitbake server ...
        Loading cache: 100% |###################################################################################| Time 0:00:02
        Loaded 9814 entries from dependency cache.
        Parsing recipes: 100% |#################################################################################| Time 0:00:03
        Parsing of 6702 .bb files complete (6670 cached, 32 parsed). 9840 targets, 842 skipped, 0 masked, 0 errors.
        
        Summary: There were 0 WARNING messages.
        NOTE: Resolving any missing task queue dependencies
        Initialising tasks: 100% |##############################################################################| Time 0:00:08
        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-sample-mlvclassification
        INFO: Recipe qcom-gstreamer1.0-plugins-oss-sample-mlvclassification now set up to build from /local/mnt/workspace/QIMSDK_ESDK_6490/workspace/sources/qcom-gstreamer1.0-plugins-oss-sample-mlvclassification
        Copy to clipboard
8. After customizing, use the following command to rebuild the plugin.

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

NOTE: Starting bitbake server ...
        Loading cache: 100% |                                      | ETA -:--:--
        Loaded 0 entries from dependency cache.
        ...
        Copy to clipboard
9. Generate the plugin installer (.ipk) to install the application on
the device.

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

NOTE: Starting bitbake server ...
        Loading cache: 100% |###################################################################| ETA 0:00:14
        Loaded 9812 entries from dependency cache.
        Parsing recipes: 100% |#################################################################################| Time 0:00:03
        Parsing of 6702 .bb files complete (6674 cached, 28 parsed). 9840 targets, 842 skipped, 0 masked, 0 errors.
        NOTE: Resolving any missing task queue dependencies
        Initialising tasks: 100% |##############################################################################| Time 0:00:10
        Checking sstate mirror object availability: 100% |######################################################| Time 0:00:00
        Sstate summary: Wanted 262 Local 0 Mirrors 0 Missed 262 Current 259 (0% match, 49% complete)
        NOTE: Executing Tasks
        NOTE: Tasks Summary: Attempted 1847 tasks of which 1847 didn't need to be rerun and all succeeded.
        
        Summary: There were 0 WARNING messages.
        INFO: Your packages are in /local/mnt/workspace/QIMSDK_ESDK_6490/tmp/deploy/ipk
        Copy to clipboard
10. Verify that the installable package is present at the following path.

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

qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_1.0-r0_armv8-2a.ipk
        qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_dbg_1.0-r0_armv8-2a.ipk
        qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_dev_1.0-r0_armv8-2a.ipk
        qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_src_1.0-r0_armv8-2a.ipk
        [/local/mnt/workspace/Platform_eSDK_plus_QIM]$
        Copy to clipboard
11. Set up an SSH connection with the device by following the steps provided in
[Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-254/how_to.html#use-ssh).

    When successful, the Dragonwing RB3 Gen 2 device is accessible through its configured IP address.
12. Copy the `qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_1.0-r0_armv8-2a.ipk`
to the Dragonwing RB3 Gen 2 device to install the compiled reference applications.
13. Connect to the device through the SSH shell:

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

Note

If prompted, enter `oelinux123` as the password for the SSH shell.
14. Run the following command on the target device.

mount -o remount,rw /
        exit
        Copy to clipboard
15. Run the following commands on the host machine:

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

scp qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_1.0-r0_armv8-2a.ipk root@< IP addr of the target device>:/opt/
        Copy to clipboard
16. Connect to the device through the SSH shell:

ssh root@<IP addr of the target device>
        Copy to clipboard
17. Run the following command on the target device:

opkg --force-depends --force-reinstall --force-overwrite install /opt/qcom-gstreamer1.0-plugins-oss-sample-mlvclassification_1.0-r0_armv8-2a.ipk
        Copy to clipboard

The new plugin is installed and ready for use by applications that require it.

## Next steps

- [Qualcomm Linux build guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-254/build_landing_page.html)
- [Build multimedia applications](https://docs.qualcomm.com/doc/80-70022-51/topic/application-development.html#application-development)
- [Create a sample application](https://docs.qualcomm.com/doc/80-70022-51/topic/content-develop-your-first-application.html#content-develop-your-first-application)
- [Customize an existing sample application](https://docs.qualcomm.com/doc/80-70022-51/topic/customize-sample-applications.html#customize-sample-applications)
- [Develop custom plugins](https://docs.qualcomm.com/doc/80-70022-51/topic/create-your-imsdk-plugin.html#create-your-imsdk-plugin)
- [Troubleshooting guide](https://docs.qualcomm.com/doc/80-70022-51/topic/troubleshooting.html#troubleshooting)

- *class* tabincludedirectiv

    - This section will be updated in a later version of the document.

Last Published: Jan 04, 2026

[Previous Topic
Compile and install a Qualcomm IM SDK plugin](https://docs.qualcomm.com/bundle/publicresource/80-70022-51/topics/compile-install-imsdk-plugins.md) [Next Topic
Troubleshoot common errors in the Qualcomm IM SDK environment](https://docs.qualcomm.com/bundle/publicresource/80-70022-51/topics/troubleshooting.md)