# Build TelAF standalone

Source: [https://docs.qualcomm.com/doc/80-41102-1/topic/build_telaf_standalone.html](https://docs.qualcomm.com/doc/80-41102-1/topic/build_telaf_standalone.html)

1. Before building standalone, SA525m SDK toolchain
              (oecore-x86\_64-armv7at2hf-neon-toolchain-nodistro.0.sh) should be
            installed to the location /opt/qct/sa525m/.

    The SDK Toolchain is available in
              build-qti-distro-tele-debug/tmp-glibc/deploy/images/sa525m/sdk.
2. Default mksquashfs linux utility is not generated with XATTR, so this needs to be replaced in /usr/local/bin.

        $ cp build-qti-distro-tele-debug/tmp-glibc/sysroots-components/x86_64/squashfs-tools-native/usr/sbin/mksquashfs /usr/local/binCopy to clipboard
3. Set the environment:

        cd sa525m/telaf
        source set_af_env.sh sa525mCopy to clipboard
4. Run the build command:

        build-distclean-af; build-sa525m-afCopy to clipboard

    If the build compiles successfully, then TelAF images will be generated in the
            directory, build/sa525m/telaf\_ro.squashfs, and the telaf-sdk patch
            tarball will also be generated in the same directory as
              telaf-sdk-&lt;TelAF-Version&gt;.tar.bz2.

## Patch the TelAF application building dependencies to the SDK toolchain

With the TelAF SDK patch tarball generated in the TelAF building process, the user can patch the SDK toolchain with the TelAF application dependencies.

**Decompress the telaf-sdk-&lt;TelAF-Version&gt;.tar.bz2**

tar xjf telaf-sdk-telaf.lnx.1.1-230301.tar.bz2Copy to clipboard

The patchsdk script and telaf-tools-x86\_64-telaf.lnx.1.1-230301.tar.bz2 will be extracted to the current directory.

**Patch TelAF to SDK toolchain**

The patchsdk script is the tool to query the current patched TelAF version in the toolchain if there is, patch TelAF to SDK toolchain, and unpatch TelAF from SDK toolchain.

Run the following command to get the help information of the script tool:

    $ ./patchsdk
    Patch tool for adding and removing TelAF application building dependencies
    to the toolchain.
     
    Syntax: ./patchsdk [-h|V|p|r]
    options:
    h     Print this Help.
    V     Print TelAF version installed in given toolchain path and exit.
          Syntax: -V toolchain-path
    p     Patch TelAF application building dependencies to the SDK toolchain
          with given telaf tools tarball and toolchain path and exit.
          Syntax: -p telaf-tools-tarball toolchain-path
    r     Remove the patched TelAF application building dependencies from the
          SDK toolchain and exit.
          Syntax: -r toolchain-pathCopy to clipboard

Run the following command to patch the extracted telaf-tool tarball to the SDK toolchain:

    $ ./patchsdk -p telaf-tools-x86_64-telaf.lnx.1.1-230301.tar.bz2 /opt/qct/sa525mCopy to clipboard

Under the toolchain path, /opt/qct/sa525m, there is now a generated
        environment setup script dedicated for the TelAF application building process named
          *environment-setup-telaf-app*.

The user can directly source the environment-setup-telaf-app script and then all TelAF application building dependencies will be set up.

**Parent Topic:** [Setup the application environment](https://docs.qualcomm.com/doc/80-41102-1/topic/setup_the_application_environment.html)

Last Published: May 12, 2026

[Previous Topic
Build Yocto Platform SDK using CodeLinaro (CLO) / open source](https://docs.qualcomm.com/bundle/publicresource/80-41102-1/topics/build_yocto_platform_sdk.md) [Next Topic
Tutorials](https://docs.qualcomm.com/bundle/publicresource/80-41102-1/topics/tutorials.md)